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

Improve design implementation accuracy of dropdown menus #2734

Open
6 tasks
Tracked by #2670 ...
martenbjork opened this issue Jul 18, 2023 · 3 comments
Open
6 tasks
Tracked by #2670 ...

Improve design implementation accuracy of dropdown menus #2734

martenbjork opened this issue Jul 18, 2023 · 3 comments
Labels
ui concerns graphical user interface

Comments

@martenbjork
Copy link
Collaborator

martenbjork commented Jul 18, 2023

Implementation:

image

Design system:

Figma link

image

Behind the scenes:

Frame 125 (1)

TODO

  • Reduce the padding around the list items to 4px horizontally and 8px vertically
  • Increase the padding around individual list items to 6px horizontally
  • Set the height of each list item to 20px
  • Use the tickmark icon to signify the current selection
  • Use the down arrow icon in Figma for the closed state
  • click down on the menu opens it, click up on an item selects it
@Wumpf Wumpf added the ui concerns graphical user interface label Jul 18, 2023
@martenbjork martenbjork changed the title Improve padding in dropdown menus Improve implementation of dropdown menus Jul 18, 2023
@abey79
Copy link
Member

abey79 commented Jul 27, 2023

@martenbjork The usual "egui" way of doing this is to use checkboxes instead of regular buttons as it's currently done. This is visible, e.g., in the rerun menu:

image

What immediately stands out is:

  1. the "v" check mark shapes (which comes from egui) is different from that of sigma
  2. the default background of the checkbox is ever so slightly different of the menu's background, so we can see it

How do you feel about (1)? Note that this is the same checkmark for regular, non-menu checkbox:

image

As for (2), I'll fix the checkbox color to match the menu, let me know if I should go the other way round.

@martenbjork
Copy link
Collaborator Author

  1. I think having consistent iconography across the UI is pretty important. Using the icons from Figma will ensure that.
  2. I find the EGUI way of doing "checkable menu items" not great. As a rule, when hovering an interactive item, the entire item should respond as one big interactive surface. That feels predictable and reliable. In constrast, when you hover one thing and another thing changes visually, the UI feels very finicky and unreliable. (What should I click? The menu item? The checkbox? Will clicking the checkbox close the menu?)

Rerun:

checkboxes.mov

Mac OS:

macos-checkboxes.mov

Figma:

figma-checkboxes.mov

@martenbjork martenbjork changed the title Improve implementation of dropdown menus Improve design implementation accuracy of dropdown menus Jul 28, 2023
@martenbjork
Copy link
Collaborator Author

An example from Rerun getting this right. Look how big, trustworthy and predictable this toggle feels. Super solid! (Especially when we get rid of the scaling of the arrow, then it will just be one big hover area reacting predictably.)

toggle.mov

@abey79 abey79 self-assigned this Aug 7, 2023
abey79 added a commit that referenced this issue Sep 1, 2023
### What

Use `ListItem` in the Stream Tree UI.

- Consistent UI in the stream tree (vs. stuff in the left panel)
- Revamped look of the selection/hovered state in the timeline itself.
- Cleaned up the code for the "Entity/instance hover cards". Now
hovering instances in the blueprint tree _also_ displays storage use
from #2997
- Improved `ListItem`
- New attribute to control the width allocation mode (currently: max
width or fit to label)
- Improved click/hover sensing to cover the full span area (= hover
highlight), not just the actually allocated space (icon + label). That
improves the behaviour of the left panel trees too.

Fixes #3045
Fixes #2738 (if we accept that dropdown button are "close enough" and
will be improved with #2734 anyways)
Fixes #2860

<img width="1817" alt="image"
src="https://github.com/rerun-io/rerun/assets/49431240/5492ae03-0da0-4417-b7a1-2bedd4da4e8c">


### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/3153) (if
applicable)

- [PR Build Summary](https://build.rerun.io/pr/3153)
- [Docs
preview](https://rerun.io/preview/2c54fda5373adf90d1407dc161f65f2242dcd4a3/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/2c54fda5373adf90d1407dc161f65f2242dcd4a3/examples)
<!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW--><!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://ref.rerun.io/dev/bench/)
- [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
@abey79 abey79 removed their assignment Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui concerns graphical user interface
Projects
None yet
Development

No branches or pull requests

3 participants