Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Icons as suffix in form fields #121

Open
timschoch opened this issue Jul 31, 2019 · 8 comments
Open

Feature request: Icons as suffix in form fields #121

timschoch opened this issue Jul 31, 2019 · 8 comments
Labels
comp: lean Issues related to @sbb-esta/angular lean design effort2: days enhancement New feature or request prio4: low Should be done after all higher priorities are done

Comments

@timschoch
Copy link

Is your feature request related to a problem? Please describe.
We have multiple autocompletes next to each other in our filter panel and all look similar. They are grouped to help with understanding and orientation, but it's still hard distinguish them as the list grows. Adding an icon would let the user know at a glance what they are searching (waggon icon, station, people, ...)

Describe the solution you'd like
Set an optional icon for the autocomplete, styled like the search box

Describe alternatives you've considered
Using the label helps a bit, but still forces the user to read

Additional context
grafik

grafik

@timschoch timschoch added the enhancement New feature or request label Jul 31, 2019
@kyubisation
Copy link
Collaborator

If I understand correctly, you would like to use a random (appropriate) icon to appear in the autocomplete input.
I assume text behind the icon should be hidden?

@timschoch
Copy link
Author

Exactly. It would work like the search, just without the red background:
https://angular.app.sbb.ch/latest/content/search

Maybe even inappropriate icons too... harrharr...

@kyubisation kyubisation added comp: lean Issues related to @sbb-esta/angular lean design comp: standard Issues related to @sbb-esta/angular standard design effort2: days prio4: low Should be done after all higher priorities are done labels Sep 9, 2019
@timschoch
Copy link
Author

Can I bump this up again and challenge the low priority?
We're building relatively complex order forms where our users have to add several different type of information. This is a snippet:
grafik
To help the user comprehend what is expected from them, we want to add a distinct icon per autocomplete data type. (eg. to add contacts we'll use a user+magnifying glass).

@kyubisation
Copy link
Collaborator

The solution to this is relatively simple.
Implement a CSS class (e.g. sbb-icon-hint, which can be placed on the input. This class sets the padding-right to an appropriate size and moves a following icon to the left.

<input sbbInput [sbbAutocomplete]="autocomplete" class="sbb-icon-hint"><sbb-icon-random-icon></sbb-icon-random-icon>

However, I'm currently busy with refactoring the header and afterwards I will be busy with bugs.
The low priority is due to the fact, that this can be implemented by consumers themselves.
If you can provide a contribution to the business typography, I will certainly have a look at it.

@Frenggi This seems to be a reasonable addition to the design system. Do you agree?

@timschoch
Copy link
Author

@kyubisation Since we're using this in several places (filter panels too) I'll have a chat with our devs and see if we can provide a PR - provided @Frenggi decides this should be in the design system.

What do you mean by contributing to the business typography? (sorry, if we've talked about this. I'm tired and can't remember... ;) )

@kyubisation
Copy link
Collaborator

Don't worry about it. I'm sorry for the limited support at the moment. I hope to improve this next year.

In regards to "business typography"; This was a technical categorization. But that might have been wrong. Sorry about that.
It should be implemented in autocomplete.component.scss, wrapped in a @include businessOnly() { ... }.

@timschoch
Copy link
Author

No worries about the support, I know you're giving it your best and - judging from the release times - doing it in your spare time. Let's wait for a UX feedback, and we'll see how we can take it from there.

@kyubisation kyubisation added ux approved and removed comp: standard Issues related to @sbb-esta/angular standard design under consideration ux approved labels Nov 11, 2019
@kyubisation
Copy link
Collaborator

@Frenggi fyi

@jeripeierSBB jeripeierSBB changed the title Feature request: Add Icon to Autocomplete Feature request: Icons as suffix in form fields Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: lean Issues related to @sbb-esta/angular lean design effort2: days enhancement New feature or request prio4: low Should be done after all higher priorities are done
Projects
None yet
Development

No branches or pull requests

2 participants