-
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
onWriting Flow: Remove the provisional block behavior #8706
Conversation
* | ||
* @return {?string} Provisional block client ID, if set. | ||
*/ | ||
export function getProvisionalBlockClientId( state ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hesitated to keep this selector fo BC but the probability for it to be used outside Gutenberg is 0 IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could keep the function, and have it return null
(the default reducer state) so it would at least not throw an error and be as close as possible to a real value with the state no longer existing.
But I'd probably agree it's unlikely that this is used.
b0e0632
to
faeab9d
Compare
faeab9d
to
3c05051
Compare
I want my badge @tofumatt 😄 |
Thoughts ahead of my review: I agree this has added complexity and therefore caused fragility. It's interesting to consider this as the cause for #8678. Usage-wise, I'm trying to remember back to #5417 / #5396 and the issues this was meant to address:
|
There's still one instance of the phrase "provisional" in the codebase in gutenberg/test/e2e/specs/writing-flow.test.js Lines 151 to 153 in ee6060f
|
* | ||
* @return {?string} Provisional block client ID, if set. | ||
*/ | ||
export function getProvisionalBlockClientId( state ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could keep the function, and have it return null
(the default reducer state) so it would at least not throw an error and be as close as possible to a real value with the state no longer existing.
But I'd probably agree it's unlikely that this is used.
closes #8678
I admit I never been fan of the provisional block behavior: The fact to remove an empty paragraph right upon its creation if it's unselected though I understood it was useful when it was too easy to create in between paragraphs which is not the case anymore.
I think it's better to remove it to avoid any unwanted side effect it can create like #8678. Thoughts @jasmussen @aduth
Testing instructions
Repeat instructions in #8678 and check that it works properly.