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

Emoji picker portaling #7217

Merged
merged 7 commits into from
Dec 20, 2024
Merged

Emoji picker portaling #7217

merged 7 commits into from
Dec 20, 2024

Conversation

estrattonbailey
Copy link
Member

@estrattonbailey estrattonbailey commented Dec 20, 2024

The emoji picker within the composer wasn't allowing users to focus the input, although the individual buttons still worked. This was due to the FocusScope wrapping the Composer, which prevents focus from leaving the composer dialog.

In #7146, I wrapped the picker in Portal so that its positioning was independent of wrapping elements and their styles. This had the unintentional result of portal-ing the picker outside the FocusScope, meaning focus couldn't be applied to the picker's search input.

The fix here is to wrap the picker in Portal only when needed, which is currently just on the Conversation screen. Instead of doing this in situ (first commit), I've added a portal?: boolean prop to the picker that optionally wraps it in a Portal. We fixed this an explicit nested FocusScope instead.

Testing: make sure all features of picker are accessible in both the composer and the conversation screen.

Copy link

github-actions bot commented Dec 20, 2024

Old size New size Diff
6.84 MB 6.84 MB 544 B (0.01%)

@arcalinea arcalinea temporarily deployed to emoji-picker-portaling - social-app PR #7217 December 20, 2024 19:41 — with Render Destroyed
@gaearon gaearon merged commit 8116d12 into main Dec 20, 2024
7 checks passed
@gaearon gaearon deleted the emoji-picker-portaling branch December 20, 2024 20:02
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.

3 participants