Skip to content

fix(fuselage-hooks): preserve axes in horizontal position fallback - #2266

Open
YashAnand69 wants to merge 1 commit into
RocketChat:mainfrom
YashAnand69:fix/horizontal-position-fallback
Open

YashAnand69 wants to merge 1 commit into
RocketChat:mainfrom
YashAnand69:fix/horizontal-position-fallback

Conversation

@YashAnand69

@YashAnand69 YashAnand69 commented Sep 27, 2026 •

Copy link
Copy Markdown

Proposed changes (including videos or screenshots)

Correct left/right popup fallback coordinates when no placement fits. The fallback now assigns horizontal and vertical positions to their proper axes and uses the resulting top coordinate for vertical overflow detection.

Issue(s)

Closes #2265. This is independent of #2260, which handles document-scroll updates.

Further comments

Three cases fail before the fix and pass afterward: left/right fallbacks with an offset container, plus vertical overflow in a horizontal fallback. All 50 hooks suites / 142 tests pass; package lint, TypeScript, formatting and diff checks pass. Pure positioning tests use explicit rectangle geometry. Browser visual regression was not run, so popup placement still needs visual review. Existing fallback selection and overflow policy are preserved. Includes a patch changeset. AI-assisted implementation and validation.

@changeset-bot

changeset-bot Bot commented Sep 27, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0be6af1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@rocket.chat/fuselage-hooks Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
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.

usePosition swaps coordinates in left/right fallback placement

1 participant