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

Gutenboarding: remove save text node override in the block editor #42508

Merged
merged 1 commit into from
May 21, 2020

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented May 21, 2020

Changes proposed in this Pull Request

Create a site with Gutenboarding at /new

Now try to create and publish a new post or page.

You can't, can you?

Do you see this?

Screen Shot 2020-05-21 at 10 14 50 am

It's because we're manipulating the buttons in the editor's header, specifically the text node in the publish button.

Screen Shot 2020-05-21 at 10 02 16 am

Let's not replace the text node as React does not like it at all. I'm not sure of the mechanism behind the error, but the page fails when React attempt to unmount components. It's looking for a precise node tree it appears.

props to @ianstewart for finding this bug and giving us something do

Testing instructions

Code to patch in D43745-code

… not sure of the mechanism behind the error, but the page fails when React attempt to unmount components. It's looking for a precise node tree it appears.
@ramonjd ramonjd added [Type] Bug When a feature is broken and / or not performing as intended [Feature] Post/Page Editor The editor for editing posts and pages. [Goal] New Onboarding previously called Gutenboarding labels May 21, 2020
@ramonjd ramonjd requested a review from a team May 21, 2020 00:16
@matticbot
Copy link
Contributor

@ramonjd ramonjd self-assigned this May 21, 2020
@ramonjd ramonjd added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 21, 2020
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Member

@p-jackson p-jackson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Saving, publishing and launch flows working as expected.

We have other things we should fix up about the editor overrides for unpublished posts (e.g. we're changing the publish confirmation button to a tertiary style) but this fixes the crash.

And leaving the button as "Update" for published posts isn't too bad. I know it was a very conscious decision to change it to save, but at least "Update" isn't completely wrong.

Copy link
Member

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! This resolves the issue for me, and the launch flow is still working as expected.

@ramonjd
Copy link
Member Author

ramonjd commented May 21, 2020

Thank you, @p-jackson and @andrewserong once again for your continued service to the cause

they-sucked-his-brains-out

@ramonjd ramonjd merged commit a0a1945 into master May 21, 2020
@ramonjd ramonjd deleted the remove/gutenboarding-replace-save-textnode branch May 21, 2020 00:55
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Goal] New Onboarding previously called Gutenboarding [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Saving a new page/post/block in an unlaunched site causes an editor crash
4 participants