Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lexical-react] menu positioning: Unrevert PR6510 but with gating #6566

Merged
merged 2 commits into from
Aug 28, 2024

Conversation

potatowagon
Copy link
Contributor

Description

#6510 is correct but it broke implementations internally

hence it got reverted to mitigate the internal emergency: #6558

here, #6510 is reintroduced but gated behind the shouldIncludePageYOffset option to aid investigations internally and to fix internal to be compatible

Test plan

shouldIncludePageYOffset = true

Screen.Recording.2024-08-28.at.12.56.41.AM.mov

shouldIncludePageYOffset = false

Screen.Recording.2024-08-28.at.12.56.27.AM.mov

Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 2:07am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 2:07am

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 27, 2024
Copy link

github-actions bot commented Aug 27, 2024

size-limit report 📦

Path Size
lexical - cjs 29.38 KB (0%)
lexical - esm 29.22 KB (0%)
@lexical/rich-text - cjs 37.87 KB (0%)
@lexical/rich-text - esm 31.08 KB (0%)
@lexical/plain-text - cjs 36.45 KB (0%)
@lexical/plain-text - esm 28.44 KB (0%)
@lexical/react - cjs 39.61 KB (0%)
@lexical/react - esm 32.5 KB (0%)

zurfyx
zurfyx previously approved these changes Aug 27, 2024
@@ -482,6 +482,7 @@ export function useMenuAnchorRef(
setResolution: (r: MenuResolution | null) => void,
className?: string,
parent: HTMLElement = document.body,
shouldIncludePageYOffset: boolean = true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prob just fine for a temporary use case but otherwise I'd be keen a suffix __EXPERIMENTAL or __DEPRECATED so that it doesn't leak into product code in OSS which is harder to deprecate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suffixed with __EXPERIMENTAL

@potatowagon potatowagon added this pull request to the merge queue Aug 28, 2024
Merged via the queue into main with commit cd934af Aug 28, 2024
43 of 44 checks passed
@potatowagon potatowagon deleted the unrevert-menu branch September 11, 2024 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants