Fix "Expand map" tooltip overlapping message composer#33679
Open
Tamajit-005 wants to merge 2 commits into
Open
Fix "Expand map" tooltip overlapping message composer#33679Tamajit-005 wants to merge 2 commits into
Tamajit-005 wants to merge 2 commits into
Conversation
matrix-js-sdk ships raw TypeScript source, but was excluded from Jest's transform allowlist, causing SyntaxError in test runs.
Replace compound-web Tooltip with a custom FloatingUI implementation that flips above the map near the composer and hides when outside the visible room boundary.
Author
|
The CI Preview Changelog check is failing because this PR needs a T-Defect label. Could a maintainer add it? |
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.
Fixes #21619
Summary
The "Expand map" tooltip on location messages was rendered through a
FloatingPortal, allowing it to overlap UI elements outside the visible message panel, including the message composer while scrolling.The existing compound-web
<Tooltip>component does not expose the Floating UI middleware required to implement boundary-aware positioning and visibility behavior.This change replaces the tooltip with a custom
BoundaryAwareTooltipbuilt on@floating-ui/reactthat:Before
The tooltip remains visible and can overlap the message composer when the timeline is scrolled.
After
The tooltip flips above the map when space below becomes constrained and becomes hidden when it escapes the visible message panel boundary.
Demonstration
Screencast.from.2026-05-30.18-15-20.mp4
A short screen recording is attached to demonstrate the scrolling behavior, tooltip flipping, and boundary-aware hiding. The issue and fix are easier to observe in motion than through static screenshots.
Testing
Expected result:
Notes
@floating-ui/reactas a direct dependency (previously only available transitively through@vector-im/compound-web)matrix-js-sdkto Jest'stransformIgnorePatternsChecklist
public/exportedsymbols have accurate TSDoc documentation.