Skip to content

fix(fuselage-hooks): react to position option changes - #2268

Open
YashAnand69 wants to merge 1 commit into
RocketChat:mainfrom
YashAnand69:fix/position-options-update
Open

YashAnand69 wants to merge 1 commit into
RocketChat:mainfrom
YashAnand69:fix/position-options-update

Conversation

@YashAnand69

@YashAnand69 YashAnand69 commented Sep 27, 2026 •

Copy link
Copy Markdown

Proposed changes (including videos or screenshots)

Recalculate overlay placement when placement or margin props change. When the container changes, reattach observation to the replacement element so the next measurement uses its geometry.

Issue(s)

Closes #2267. Independent of #2260 (document scroll) and #2266 (fallback coordinate mapping).

Further comments

Three hook regressions fail before the fix and pass afterward: placement update, margin update and replacement-container observation. All 51 hooks suites / 142 tests pass, as do package lint, TypeScript, formatting and diff checks. Uses existing debounced measurement, with no new API or dependency. Geometry and observer tests are simulated; browser visual regression was not run. 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: 4d8da3c

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 does not react to placement, margin or container changes

1 participant