Fix changing widget IDs and false-positive ID change warnings across passes - #8316
Open
vlansco wants to merge 7 commits into
Open
Fix changing widget IDs and false-positive ID change warnings across passes#8316vlansco wants to merge 7 commits into
vlansco wants to merge 7 commits into
Conversation
- expand virtual row buffers without registering hover widgets - preserve scroll extent without consuming automatic widget ids - cover spacer extent and id behavior with a regression test - stabilize table container ids - stabilize table cell ui ids
|
Preview is being built... Preview will be available at https://egui-pr-preview.github.io/pr/8316-stable-table-cell-ids View snapshot changes at kitdiff |
- suppress rect/id warnings when the new id existed in the previous pass - retain diagnostics for genuinely new ids replacing widgets in place - cover both cases with focused regression tests
- add a pass-local API for intentional widget-set replacements - exclude only widgets contained by explicitly marked rects - preserve duplicate-id checks and normal interaction behavior
vlansco
marked this pull request as draft
July 17, 2026 11:52
vlansco
marked this pull request as ready for review
July 17, 2026 12:54
vlansco
marked this pull request as draft
July 20, 2026 10:58
vlansco
marked this pull request as ready for review
July 20, 2026 11:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Virtualized tables could shift the parent UI's automatic ID sequence between sizing and rendering passes.
StripLayout::skip_spacerepresented non-visible rows usingallocate_rect(..., Sense::hover()). This preserved the scroll extent, but also registered a hover widget and consumed an automatic widget ID. When virtual buffers differed between passes, subsequent table widget IDs changed and triggered warnings such as:Multi-pass and data-driven layouts can also legitimately move existing widgets into vacated rects or intentionally replace all widgets within a region. These cases could produce the same warning even though the widget IDs were stable or the replacement was intentional.
This PR:
expand_to_include_rectfor virtual row buffers, preserving the scroll extent without registering a widget or consuming an automatic ID;Context::allow_widget_id_changes_inas a pass-local, rect-scoped exclusion for regions that intentionally replace their widget set;There are no intended visual changes. The only public API change is
Context::allow_widget_id_changes_in, which affects this diagnostic only; it does not change duplicate-ID checks or widget interaction.Testing
cargo test -p egui -p egui_extrascargo clippy -p egui -p egui_extras --all-targets --all-features -- -D warningscargo fmt --all -- --checkScreenshots are not applicable because these changes do not affect visual output.