Skip to content

Fix tooltips sometimes being way too big#11190

Merged
emilk merged 11 commits intomainfrom
emilk/debug-tooltips
Sep 15, 2025
Merged

Fix tooltips sometimes being way too big#11190
emilk merged 11 commits intomainfrom
emilk/debug-tooltips

Conversation

@emilk
Copy link
Member

@emilk emilk commented Sep 12, 2025

Related

What

During a egui sizing pass, we allow widgets to inform the parent ui how large they would like to be.
Unfortunately this meant that tooltips could grow without bounds.
This PR fixes this.

To help debug this now and in the future I added ui.sanity_check(); calls here and there.
The plan is to remove those explicit calls in the future and have egui call that for us instead:

@emilk emilk added 🪳 bug Something isn't working ui concerns graphical user interface egui Requires egui/eframe work labels Sep 12, 2025
@github-actions
Copy link

github-actions bot commented Sep 12, 2025

Web viewer built successfully.

Result Commit Link Manifest
e8d05e3 https://rerun.io/viewer/pr/11190 +nightly +main

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

@emilk emilk marked this pull request as ready for review September 12, 2025 08:51
@emilk emilk changed the title Add debug statements to try pinpoint source of huge tooltips Fix tooltips sometimes being way too big Sep 12, 2025
@abey79 abey79 self-requested a review September 12, 2025 11:29
Copy link
Member

@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.

lgtm. would be great to have a snapshot test or two if it's easy enough.

Copy link
Member

@grtlr grtlr left a comment

Choose a reason for hiding this comment

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

I was able to cause a panic on this branch. It happens when hovering over the pointcloud entity in autoware_all_sensors.mcap.

Does this need another branch to run?

I can provide the backtrace in a bit.

@emilk
Copy link
Member Author

emilk commented Sep 15, 2025

So sometimes tooltips with ListItems in them will still be larger (by 100-150 points) than the set tooltip_width, because of complicated layout reasons.

The proper fix will have to wait (maybe after Lucas finishes up all the “intrinsic size” work in egui),
so I’ll just increate the threshold (by 10x) before we panic, for now. It only panics in debug builds btw.

@emilk emilk merged commit 1cf64bb into main Sep 15, 2025
40 checks passed
@emilk emilk deleted the emilk/debug-tooltips branch September 15, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🪳 bug Something isn't working egui Requires egui/eframe work include in changelog ui concerns graphical user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants