-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Global shortcuts: use React events (portal bubbles & contextual) #34539
Merged
Conversation
This file contains 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
Size Change: +626 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
ellatrix
force-pushed
the
try/shortcut-refactor
branch
5 times, most recently
from
September 6, 2021 17:49
5b99ec3
to
aa78fef
Compare
ellatrix
force-pushed
the
try/shortcut-refactor
branch
from
September 7, 2021 16:27
aa78fef
to
827c309
Compare
ellatrix
requested review from
adamziel,
ajitbohra,
draganescu,
getdave,
kevin940726,
nerrad,
noisysocks,
ntwb,
talldan and
tellthemachines
as code owners
September 7, 2021 18:17
7 tasks
This was referenced Sep 30, 2021
1 task
Merged
7 tasks
costasovo
added a commit
to mailpoet/mailpoet
that referenced
this pull request
Jan 4, 2022
After refactoring shortcuts from native event to react events, we need to wrap the editor into <ShortcutProvider> Related PR WordPress/gutenberg#34539 [MAILPOET-4029]
costasovo
added a commit
to mailpoet/mailpoet
that referenced
this pull request
Jan 17, 2022
After refactoring shortcuts from native event to react events, we need to wrap the editor into <ShortcutProvider> Related PR WordPress/gutenberg#34539 [MAILPOET-4029]
costasovo
added a commit
to mailpoet/mailpoet
that referenced
this pull request
Jan 18, 2022
After refactoring shortcuts from native event to react events, we need to wrap the editor into <ShortcutProvider> Related PR WordPress/gutenberg#34539 [MAILPOET-4029]
costasovo
added a commit
to mailpoet/mailpoet
that referenced
this pull request
Jan 19, 2022
After refactoring shortcuts from native event to react events, we need to wrap the editor into <ShortcutProvider> Related PR WordPress/gutenberg#34539 [MAILPOET-4029]
veljkho
pushed a commit
to mailpoet/mailpoet
that referenced
this pull request
Jan 19, 2022
After refactoring shortcuts from native event to react events, we need to wrap the editor into <ShortcutProvider> Related PR WordPress/gutenberg#34539 [MAILPOET-4029]
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.
Description
Hide whitespace changes for a clean diff.
Moves shortcut handlers from native events to React events for two reasons:
In order to preserve the
useShortcut
API, context can be added to which theuseShortcut
can add callbacks. The context layer can listen to the React event and call all callbacks added to this context. We're already doing something similar in RichText, which could now also use theuseShortcut
API instead of its own API.If we encounter any issues as a result of this PR, it's most likely because of focus loss, which should be fixed anyway.
How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).