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

A lot of table improvements #420

Merged
merged 8 commits into from
Nov 30, 2022
Merged

A lot of table improvements #420

merged 8 commits into from
Nov 30, 2022

Conversation

emilk
Copy link
Member

@emilk emilk commented Nov 30, 2022

Closes #341

Closes a lot of #370

Based on emilk/egui#2369

This gives most tables auto-sized columns, and lets us double-click columns-separators to reset the column sizes.

It improves the scroll-to-time behavior of the text log.

I also took a pass over all Table uses and just generally improved it.

Screenshots

auto-size-table-rerun-columns

Nice default columns widths:
Screen Shot 2022-11-30 at 20 01 59

Nicer looking annotation context:
Screen Shot 2022-11-30 at 20 02 52

Nicer annotation context tables:
Screen Shot 2022-11-30 at 20 05 45

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I've added a line to CHANGELOG.md (if this is a big enough change to warrant it)

@emilk emilk marked this pull request as ready for review November 30, 2022 18:56
Comment on lines +597 to +599
ui.weak("(auto)").on_hover_text(
"Color chosen automatically, since it was not logged.",
);
Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, putting this last works now @Wumpf @teh-cmc

@Wumpf Wumpf self-requested a review November 30, 2022 19:07
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.

🚢 so much better!!

scrollbars height made me stop for a bit, but yeah makes sense - we want the outer selection panel scrollbar only if the "number of elements including tables" gets too big (or your screen too small). How does this behave with on-hover though which uses the same table? 🤔

crates/re_viewer/src/ui/data_ui.rs Outdated Show resolved Hide resolved

egui_extras::TableBuilder::new(ui)
TableBuilder::new(ui)
Copy link
Member

Choose a reason for hiding this comment

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

might apply to others but I got it to be tricked into displaying neither horiztonal nor vertical scrollbars when it should have some. To repro open the text_logging example and resize the window a bit until the top log frame (3rd_party_logs) doesn't get enough space anymore
(they are still there and mouse wheel(s) work)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good repro. Got me this:

Screen Shot 2022-11-30 at 20 38 36

Not ideal

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess I'm stuck in this Table-shaped hell for a while longer

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed!

Copy link
Member

Choose a reason for hiding this comment

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

partially confirmed! Right scroll bar shows up only if I scroll all the way to the right which isn't optimal imho

image
image

Copy link
Member Author

@emilk emilk Nov 30, 2022

Choose a reason for hiding this comment

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

Fix nr2 coming in emilk/egui#2371

Copy link
Member Author

Choose a reason for hiding this comment

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

Fix pushed

Screen Shot 2022-11-30 at 23 01 27

@emilk
Copy link
Member Author

emilk commented Nov 30, 2022

Bonus: I made the tables in the Text Space Views expand to use up all available space, thus moving the horizontal scroll to the bottom:

Screen Shot 2022-11-30 at 23 02 22

@emilk emilk merged commit 975f6a6 into main Nov 30, 2022
@emilk emilk deleted the emilk/table-improvements branch November 30, 2022 22:17
@emilk emilk mentioned this pull request Nov 30, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No way to see text log body that doesn't fit on screen
2 participants