Rework AdaptiveLayoutView#148
Merged
Merged
Conversation
yulnr
commented
Sep 20, 2024
kevinaboos
previously approved these changes
Sep 20, 2024
Member
kevinaboos
left a comment
There was a problem hiding this comment.
Phenomenal work, thanks! All looks good.
kevinaboos
approved these changes
Sep 21, 2024
alanpoon
pushed a commit
to alanpoon/robrix
that referenced
this pull request
May 25, 2026
…project-robius#148) * sync: backport upstream low-conflict fixes (batches 1-2) * sync: backport upstream medium-conflict UI/event-source fixes (batch 3) * sync: backport upstream room pill/cache/tooltip fixes (batch 4) Backport upstream commits: 63f01d9, 22efa4f, c1a78b0, 6027ee2.\n\nIncludes full room_preview_cache integration, @room mention pill support,\nlink preview widget caching, blurhash decode cost reduction, and tooltip\naction handling shift to tooltip widget itself. * sync: align packaging/icon pipeline with upstream robrix (batch 5) Backport upstream packaging/icon behavior so Robrix2 uses the same app icon pipeline as Robrix, including makepad bundle env, icon assets, build.rs icon embedding, and packaging directory parity. * sync: migrate upstream batch (badge/add-room/password-focus/tsp/verification settings) * sync: migrate upstream app settings batch and zoom/view-mode parity
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.
This PR introduces significant changes to our adaptive layout system, moving away from the previous DSL-heavy approach to a more flexible solution. It also introduces a new CachedWidget to optimize widget reuse across UI updates.
Key Changes
Reworked AdaptiveViewLayout into AdaptiveView:
CachedWidgetto avoid re-initializing and porting state between instances.Introduced CachedWidget:
Improved flexibility
AdaptiveViews that for example adapt to their parent size instead of just the screen size.Limitations and Future Work
Please refer to the inline documentation in
adaptive_view.rsandcached_widget.rsfor usage instructions and current limitations.