Implements column auto-sizing for PropertyContent. The current heuristics is rather simple and will likely need improvement when it's battle tested. Currently, the content requests a minimum width of 200px (there really isn't a way to properly deal with two-column-plus-button neatly all the way to 0 width), and allocate a maximum of 70% of the available width to the label column.
Improves the way ListItem handles content capturing the hover state (which happen for interactive content). There is no longer a requirement for ListItemContent::ui() to return an Option<Response>, which simplifies a bunch of things.
Updates re_ui_example accordingly
Note: still no change applied to the actual viewer code base so far.
Part of #6075
Follow-up to #6174
Limitations and todo
Improved heuristics for column sizing, when we have a better idea of the need.
More helpers are needed for various kinds of values.
There can be only 0 or 1 action button. This should be extended by using a … button with some kind of popup with all available actions in a future PR.
Right gutter space is reserved for the action button even if no list item in scope use them. The list_item_scope could track this and skip reserving that space if it's never used (e.g. component list in entity path selection panel): https://github.com/rerun-io/rerun/issues/6179
What
This PR:
PropertyContent
. The current heuristics is rather simple and will likely need improvement when it's battle tested. Currently, the content requests a minimum width of 200px (there really isn't a way to properly deal with two-column-plus-button neatly all the way to 0 width), and allocate a maximum of 70% of the available width to the label column.ListItem
handles content capturing the hover state (which happen for interactive content). There is no longer a requirement forListItemContent::ui()
to return anOption<Response>
, which simplifies a bunch of things.re_ui_example
accordinglyNote: still no change applied to the actual viewer code base so far.
Limitations and todo
…
button with some kind of popup with all available actions in a future PR.list_item_scope
could track this and skip reserving that space if it's never used (e.g. component list in entity path selection panel): https://github.com/rerun-io/rerun/issues/6179Checklist
[x] I have read and agree to Contributor Guide and the Code of Conduct
[x] I've included a screenshot or gif (if applicable)
[x] I have tested the web demo (if applicable):
main
build: rerun.io/viewernightly
build: rerun.io/viewer[x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
[x] If applicable, add a new check to the release checklist!
PR Build Summary
Recent benchmark results
Wasm size tracking
To run all checks from
main
, comment on the PR with@rerun-bot full-check
.