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

Rename Shared Blocks to Reusable Blocks #8123

Merged
merged 3 commits into from
Jul 27, 2018
Merged

Conversation

noisysocks
Copy link
Member

@noisysocks noisysocks commented Jul 23, 2018

This is the first half of #7887.

Renames all 'shared block' references to 'reusable block', and changes the copy of the associated UI controls to match what was suggested in #7887 (comment).

To test:

  1. Ensure tests pass
  2. Click around in Gutenberg and look for any regressions

@noisysocks noisysocks added the [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) label Jul 23, 2018
@noisysocks noisysocks added this to the Try Callout milestone Jul 23, 2018
@noisysocks noisysocks requested a review from karmatosed July 23, 2018 22:27
@karmatosed
Copy link
Member

karmatosed commented Jul 24, 2018

Can we go with Reusable? Ideally saying 'Save this block to reuse' as the call? Apologies but I think this would work better going forward @noisysocks based on feedback in that issue.

@gziolo gziolo added the [Type] Breaking Change For PRs that introduce a change that will break existing functionality label Jul 24, 2018
@gziolo
Copy link
Member

gziolo commented Jul 24, 2018

There are some changes to public selectors and actions, should we add deprecation note?

@noisysocks noisysocks force-pushed the update/rename-shared-blocks branch from ded10a6 to bc2d765 Compare July 26, 2018 06:50
@noisysocks noisysocks changed the title Rename Shared Blocks to Saved Blocks Rename Shared Blocks to Reusable Blocks Jul 26, 2018
@noisysocks
Copy link
Member Author

I've updated this to use 'reusable', changed the copy of the UI controls to match what Kjell suggested in #7887 (comment), and added deprecated aliases for the public selectors, actions and block API.

@noisysocks noisysocks requested a review from gziolo July 26, 2018 06:52
@noisysocks noisysocks force-pushed the update/rename-shared-blocks branch from bc2d765 to 60159dd Compare July 26, 2018 06:59
role={ itemsRole }
>
{ __( 'Delete Shared Block' ) }
{ __( 'Remove from Reusable Blocks' ) }
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is a bit confusing to me. I understand better "Remove reusable block" but I can see how the ambiguity there too.

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Change reusable block button copy so that 'reusable blocks' are treated
as a collection that blocks are added to or removed from.
@noisysocks noisysocks force-pushed the update/rename-shared-blocks branch from 60159dd to 7e44002 Compare July 27, 2018 01:26
@noisysocks noisysocks merged commit b3230f0 into master Jul 27, 2018
@noisysocks noisysocks deleted the update/rename-shared-blocks branch July 27, 2018 06:56
@noisysocks
Copy link
Member Author

Gonna merge this to get ahead of merge conflicts 🙂 – can change the copy later if @karmatosed isn't OK with it.

@aduth
Copy link
Member

aduth commented Aug 14, 2018

Any deprecations should be added to docs/reference/deprecated.md, which generates this page:

https://wordpress.org/gutenberg/handbook/reference/deprecated/

The functions deprecated here do not appear there and thus plugin authors who reference this page would not have the advance notice to have updated their usage.

return updateReusableBlockTitle( id, title );
}

export function convertBlockToSaved( clientId ) {
Copy link
Member

Choose a reason for hiding this comment

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

This function was called convertBlockToShared, not convertBlockToSaved.

Copy link
Member Author

Choose a reason for hiding this comment

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

🤦‍♂️ good catch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Breaking Change For PRs that introduce a change that will break existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants