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

Make Position2D components editable in selection panel #8357

Merged
merged 7 commits into from
Dec 9, 2024

Conversation

grtlr
Copy link
Contributor

@grtlr grtlr commented Dec 9, 2024

Related

What

This adds a simple single line edit for position 2D. There is no speed_fn because I think in most applications UI coordinates are probably good unit (for example in graphs).

Screen.Recording.2024-12-09.at.10.14.30.mov

@grtlr grtlr added ui concerns graphical user interface include in changelog labels Dec 9, 2024
@grtlr grtlr requested a review from Wumpf December 9, 2024 09:15
Copy link

github-actions bot commented Dec 9, 2024

Web viewer built successfully. If applicable, you should also test it:

  • I have tested the web viewer
Result Commit Link
2630bf1 https://rerun.io/viewer/pr/8357

Note: This comment is updated whenever you push a commit.

@grtlr grtlr changed the title Add singleline_edit_position2d Make Position2D components editable in selection panel Dec 9, 2024
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.

those brackets are a bit of a stylistic break. Which I don't actually mind, but this should be integrated & aligned with https://github.com/rerun-io/rerun/blob/main/crates/viewer/re_component_ui/src/datatype_uis/vec.rs

I.e. that file should be extended with vec2 and then used instead

@Wumpf
Copy link
Member

Wumpf commented Dec 9, 2024

oh interesting, so actually it preserves the style of non-editable better than what's there in vec.rs
It's just that for edit boxes we so far didn't want to spend so much horiztonal space 🤔

@Wumpf Wumpf closed this Dec 9, 2024
@Wumpf Wumpf reopened this Dec 9, 2024
@Wumpf
Copy link
Member

Wumpf commented Dec 9, 2024

oops sorry mouse slipped and clicked the wrong button

@Wumpf Wumpf self-requested a review December 9, 2024 12:46
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.

looking good, thanks for unifying things! :)

image

crates/viewer/re_component_ui/src/datatype_uis/vec.rs Outdated Show resolved Hide resolved
@grtlr grtlr merged commit 067c637 into main Dec 9, 2024
31 checks passed
@grtlr grtlr deleted the grtlr/position2d-single-line-edit branch December 9, 2024 15:54
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