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

Shadow: revert shadow default presets opt-in to opt-out #60204

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

madhusudhand
Copy link
Member

@madhusudhand madhusudhand commented Mar 26, 2024

What?

This change reverts part of changes from #58766 and #59499.
It is to sync changes from WordPress/wordpress-develop#6309 back to Gutenberg.

Why?

Previous fix causing regression as mentioned here

How?

Restores defaultPresets to true and removes it from appearanceTools.

Testing Instructions

Block theme:

  1. Activate a block theme
  2. try applying shadow to blocks (button, image) from global styles
  3. try applying a shadow from block editor settings to a block (button, image)
  4. It should work as expected.
  5. add a custom shadow with slug same as core preset (ex: deep) and it should not appear in the list of shadows.

Classic themes:

  1. Activate a classic theme
  2. Shadow tools should not appear in the block settings panel.
  3. Label of the panel should be "Border"

Also, test this regression scenario.

Screenshots or screencast

Fixes: #59989

@madhusudhand madhusudhand force-pushed the revert-default-presets branch from a37c3ac to 4e5e5d3 Compare March 26, 2024 14:21
@madhusudhand madhusudhand self-assigned this Mar 26, 2024
@madhusudhand madhusudhand added [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release and removed [Type] Bug An existing feature does not function as intended labels Mar 26, 2024
@madhusudhand madhusudhand marked this pull request as ready for review March 26, 2024 14:28
Copy link

github-actions bot commented Mar 26, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: madhusudhand <[email protected]>
Co-authored-by: ajlende <[email protected]>
Co-authored-by: mikachan <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: andrewserong <[email protected]>
Co-authored-by: carolinan <[email protected]>
Co-authored-by: oandregal <[email protected]>
Co-authored-by: swissspidy <[email protected]>
Co-authored-by: getdave <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@getdave getdave requested a review from ajlende March 26, 2024 14:34
Copy link
Contributor

@ajlende ajlende left a comment

Choose a reason for hiding this comment

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

Thanks for getting the backport to GB opened up.

LGTM 👍

@ajlende ajlende added the Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core label Mar 26, 2024
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core.
  • Labels found: [Type] Regression, Backport from WordPress Core.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@ajlende
Copy link
Contributor

ajlende commented Mar 26, 2024

This is a backport to Gutenberg for Trac #60815 and the WordPress/wordpress-develop#6309 fix.

Copy link
Member

@mikachan mikachan left a comment

Choose a reason for hiding this comment

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

These changes are in line with the changes in WordPress/wordpress-develop#6309, so I think this is good to land.

Copy link
Contributor

@ajlende ajlende left a comment

Choose a reason for hiding this comment

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

@oandregal added some tests to the core changeset. @madhusudhand can you copy those over here as well?

@madhusudhand madhusudhand force-pushed the revert-default-presets branch from 4e5e5d3 to e22b910 Compare March 28, 2024 09:29
Copy link
Contributor

@ajlende ajlende left a comment

Choose a reason for hiding this comment

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

Thanks for getting the tests copied over!

@madhusudhand madhusudhand merged commit 2477a6d into trunk Apr 2, 2024
57 checks passed
@madhusudhand madhusudhand deleted the revert-default-presets branch April 2, 2024 07:24
@github-actions github-actions bot added this to the Gutenberg 18.1 milestone Apr 2, 2024
cbravobernal pushed a commit to garridinsi/gutenberg that referenced this pull request Apr 9, 2024
)

* revert shadow default presets opt-in

* add unit tests to verify default presets in block and classic themes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backwards compatibility issue with shadow defaultPresets
3 participants