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

ListItem 2.0 (part 6): split full-span range management to a dedicated module #6211

Merged
merged 5 commits into from
May 6, 2024

Conversation

abey79
Copy link
Member

@abey79 abey79 commented May 3, 2024

What

So far, the full span x coordinate rang needed for highlighting was maintained by LayoutInfo and list_item_scope. However, other widgets also need this mechanism. This PR splits of full-span management to a dedicated module, and deploys it both in re_ui_example and where list_item2 is currently used.

Other changes:

  • This PR also improves the sanity checks regarding both list_item_scope and full_span_scope. When missing, debug build will panic and release build will emit warnings.
  • Both scopes are now ui.scope(), so it's safe to modify ui.style() from the closure.
  • list_item_scope now sets ui.spacing().item_spacing.y = 0, since this is required anyway for ListItems to look good.

Follow-up PR will be needed to deploy full_span to all relevant widgets and their use in the viewer (#6156).

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

To run all checks from main, comment on the PR with @rerun-bot full-check.

@abey79 abey79 added ui concerns graphical user interface include in changelog labels May 3, 2024
Base automatically changed from antoine/li5-viz-ovrd-ui to main May 3, 2024 14:48
@abey79 abey79 force-pushed the antoine/li6-split-full-span branch from 49d2405 to 490a3c1 Compare May 3, 2024 14:50
@abey79 abey79 merged commit 0dfe602 into main May 6, 2024
34 checks passed
@abey79 abey79 deleted the antoine/li6-split-full-span branch May 6, 2024 08:32
abey79 added a commit that referenced this pull request May 8, 2024
### What

Migrate all widgets to the "full span scope" mechanism introduced in
#6211, including the legacy `ListItem`. This completes the migration
away from the clip rect hack, but does highlight a number of issues and
improvements:
- #6245 
- #6246

Showcase of `full_span_scope()` nestability:

<img width="324" alt="image"
src="https://github.com/rerun-io/rerun/assets/49431240/be8e72b1-7f1d-4533-a456-870a8c51572d">
<br/> <br/>


- Fixes #6156

### 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 the web demo (if applicable):
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/6248?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/6248?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [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](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/6248)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog ui concerns graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants