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

WPCOM Block Editor: hide Gutenberg preview button #41528

Merged
merged 3 commits into from
Apr 29, 2020

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Apr 28, 2020

Changes proposed in this Pull Request

We hide the Gutenberg preview dropdown list because the style overrides don't work on WordPress.com. See: #40388

In v8.0.0-rc.1 the class name for this element has changed. Let's update the class and keep hiding it!

Testing instructions

Check out this branch and build it:

npx lerna run build --scope='@automattic/wpcom-block-editor' -- -- --watch

Upload the files in apps/wpcom-block-editor/dist to your sandbox.

  1. YOUR_TEST_SITE_URL should be running Gutenberg Edge (8.0.0-rc.1)
  2. YOUR_TEST_SITE_URL should be sandboxed
  3. 80s glam rock will make a come back one day, you'll see 🎸

Try creating a post:

https://wordpress.com/block-editor/post/[YOUR_TEST_SITE_URL]

Check that the preview button in the editor always defaults always to the mobile version

Screen Shot 2020-04-28 at 7 58 54 pm

Fixes #41519

@ramonjd ramonjd added [Type] Bug [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Maintenance [Goal] Gutenberg Working towards full integration with Gutenberg labels Apr 28, 2020
@ramonjd ramonjd requested review from a team as code owners April 28, 2020 10:00
@ramonjd ramonjd self-assigned this Apr 28, 2020
@matticbot
Copy link
Contributor

@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

@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.

Looking good! Thanks for picking this one up, works correctly for me on an Edge site and without the Edge sticker, once sandboxed. 👍

ramonjd and others added 3 commits April 29, 2020 10:06
…es don't work on WordPress.com. In v8.0 the class for these element has changed. Let's update the class and keep hiding it!
Keep the existing class for compatibility with older Gutenberg versions
@ramonjd ramonjd force-pushed the update/hide-gutenberg-8.0-preview-button branch from fae411b to 11ffaa6 Compare April 29, 2020 00:06
@ramonjd
Copy link
Member Author

ramonjd commented Apr 29, 2020

Backend diff D42601-code

@ramonjd ramonjd merged commit faf6888 into master Apr 29, 2020
@ramonjd ramonjd deleted the update/hide-gutenberg-8.0-preview-button branch April 29, 2020 01:15
@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 Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Goal] Gutenberg Working towards full integration with Gutenberg Maintenance [Type] Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gutenberg v8.0.0: duplicate Preview links appearing in the header
4 participants