-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mobile] Copy/Paste improvement (#27242)
* Mobile - Notice - Use notices package * Mobile - Clipboard refactor * Mobile - ClipboardProvider - Use state * Mobile - Move Clipboard context/provider into a singleton * Mobile - Remove unused action and selector from the editor store. Add comment to explain getItems in the inserter menu * Mobile - Block Actions Menu - Move function to consts, add local state to handle clipboard change
- Loading branch information
Gerardo Pacheco
authored
Jan 4, 2021
1 parent
64729ac
commit e073409
Showing
8 changed files
with
104 additions
and
145 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const createClipboard = () => { | ||
let currentClipboard; | ||
|
||
const setClipboard = ( clipboard ) => { | ||
currentClipboard = clipboard; | ||
}; | ||
|
||
const getClipboard = () => currentClipboard; | ||
|
||
return { | ||
setClipboard, | ||
getClipboard, | ||
}; | ||
}; | ||
|
||
const clipboard = createClipboard(); | ||
|
||
export const { setClipboard, getClipboard } = clipboard; |
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
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
Oops, something went wrong.