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 how the root container is displayed and handled in the blueprint tree #4989

Merged
merged 4 commits into from
Feb 1, 2024

Conversation

abey79
Copy link
Member

@abey79 abey79 commented Jan 31, 2024

What

This PR changes how the root container is displayed and handled:

  • It's labeled as "Viewport", since it defines the top-level organisation of the viewport.
  • It's not collapsible, so it doesn't have a triangle. This reduces the right-ward drift.
  • It (still) cannot be dragged (but now the difference with other containers is more obvious). It now behaves better when dragged over though.
  • It cannot be removed.

Other than that, it still behaves mostly as other containers (in particular, it can be selected and edited).

Some changes were needed in the drag-and-drop code, making the "if-statement-of-death" incrementally more complicated, sadly.

image

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

@abey79 abey79 added ui concerns graphical user interface include in changelog labels Jan 31, 2024
@Wumpf Wumpf self-requested a review February 1, 2024 10:13
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

I'm new to this code and I must say these are some really pretty ascii arts explaining me what's going on. Very newcomer friendly!

This design makes way more sense and execution looks solid!

crates/re_ui/src/drag_and_drop.rs Show resolved Hide resolved
crates/re_viewport/src/viewport_blueprint_ui.rs Outdated Show resolved Hide resolved
@abey79 abey79 merged commit a1a4df2 into main Feb 1, 2024
40 checks passed
@abey79 abey79 deleted the antoine/better-blueprint-tree-root branch February 1, 2024 17:21
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.

Present the root container as the top-level viewport container and differentiate it from other container
2 participants