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

Allow resetting view property components from gui for all generically implemented property ui #6417

Merged
merged 10 commits into from
May 28, 2024

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented May 23, 2024

What

See title :)

This allows to reset the value either to the default blueprint or - via context menu - to empty!

Screen.Recording.2024-05-23.at.17.09.04.mov

Future work:

  • write this value to the default blueprint (via context menu as well for now!)
  • some visual language indicating the difference between from-active-only/from-default/unset

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.

@Wumpf Wumpf added 📺 re_viewer affects re_viewer itself include in changelog labels May 23, 2024
@Wumpf Wumpf requested a review from abey79 May 23, 2024 11:23
@Wumpf Wumpf marked this pull request as draft May 23, 2024 11:31
@Wumpf Wumpf marked this pull request as ready for review May 23, 2024 15:18
@Wumpf Wumpf requested a review from jleibs May 23, 2024 15:18
Copy link
Contributor

@abey79 abey79 left a comment

Choose a reason for hiding this comment

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

very nice, I like where this is going

crates/re_space_view/src/view_property_ui.rs Outdated Show resolved Hide resolved
@Wumpf Wumpf force-pushed the andreas/generic-view-property-reset-buttons branch from 05223ea to 2525b4a Compare May 27, 2024 13:17
ui.close_menu();
}
ui.add_enabled_ui(component_results.contains_non_empty(*component_name), |ui| {
if ui.button("Reset to empty.")
Copy link
Member

Choose a reason for hiding this comment

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

Nit: we need a better name for this

Copy link
Member Author

Choose a reason for hiding this comment

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

agreed, but don't know what to pick :/

@Wumpf Wumpf merged commit b54e619 into main May 28, 2024
34 of 35 checks passed
@Wumpf Wumpf deleted the andreas/generic-view-property-reset-buttons branch May 28, 2024 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants