Skip to content

feat: possible solution to description display in combobox #11876

Open
Sembauke wants to merge 2 commits intoopenstreetmap:developfrom
Sembauke:feat/possible-solution-description-display
Open

feat: possible solution to description display in combobox #11876
Sembauke wants to merge 2 commits intoopenstreetmap:developfrom
Sembauke:feat/possible-solution-description-display

Conversation

@Sembauke
Copy link

@Sembauke Sembauke commented Feb 14, 2026

There are two solutions for displaying descriptions in the combo-box. Solution one is the more straightforward approach. Solution two is more comprehensive, but would require disabling the tooltip to avoid redundancy, since by the time a user clicks the information button, the tooltip has already appeared.

The code currently provides the second solution, I can apply my stash any-time.

Below the two different options:

Image Image

ref #10613

@Sembauke Sembauke marked this pull request as ready for review February 14, 2026 20:03
@k-yle k-yle linked an issue Feb 16, 2026 that may be closed by this pull request
@tyrasd tyrasd added usability An issue with ease-of-use or design field An issue with a field in the user interface labels Feb 18, 2026
Copy link
Member

@tyrasd tyrasd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think the "solution one" might actually be better: I tried out the branch (solution two) and it happened to me regularly that i slightly misclicked the small ℹ️ icon, thus accidentally selecting the wrong option. For touch devices it might be even more tricky to press the icon. Sure, the icon could be enlarged, but I think that the benefit of having the descriptions collapsible is not really worth the added UI complexity and visual noise.

The only downside for "solution one" would be that there are significantly fewer options visible at once when there are many values available (the parking field is with 13 options currently the one with the most tags that have a description). Maybe this could be counteracted a little by making the maximum height of the dropdown a little larger when the options have descriptions to fit roughly the same number of tags at once (e.g. assuming a single line description for each option).

PS: I also checked how it looks like when the options also have individual icons, and it looks great:


// enter/update
options.enter()
var entered = options.enter()
Copy link
Member

@tyrasd tyrasd Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS: Two minor nit-picks:

  • Normally we simple use enter as the variable name for a d3 enter() selection.
  • Consider using const (or let) instead of var in new or refactored code.

@Sembauke
Copy link
Author

Sembauke commented Feb 19, 2026

Seems like we are on an impasse.

One other idea would be to display the description outside of the combo-box itself. (I believe that is what you call it.)

So, make the information button which is displayed on the top-right toggle-able, so descriptions are updated on hover or on focus.

It will make more sense to display this particular widget (shown in the image below), above the combo-box.

image

At last, I think it's hard to improve any of the user experience with these three suggested solutions.

A reach would be to add an extra panel which the user can enable in the settings. Something like 'Tag Guide' or 'Extra Info'.

image

Let me know what you think, if it's worth continuing or we should abandon this idea completely.

@tyrasd
Copy link
Member

tyrasd commented Feb 19, 2026

Seems like we are on an impasse.
Let me know what you think, if it's worth continuing or we should abandon this idea completely.

Why do you think so? In my opinion "Solution one" should work quite well, with the minor tweak that the combobox has a slightly larger max-height CSS1 value when there are descriptions to be displayed.

Can you try this out in the PR? 😊

Footnotes

  1. should be relatively easy to implement in CSS by just adding a dedicated class to the combobox dropdown for this case

@Sembauke
Copy link
Author

Sembauke commented Feb 19, 2026

Hey @tyrasd,
Sure we can try this out. I hope you like it.

I have applied my stash and updated the max combo-box height.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

field An issue with a field in the user interface usability An issue with ease-of-use or design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve how we show the description of field values

2 participants