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

Code clean-up: Rename 'reusable blocks' to 'shared blocks' #5996

Merged
merged 1 commit into from
Apr 5, 2018

Conversation

noisysocks
Copy link
Member

@noisysocks noisysocks commented Apr 5, 2018

Description

In #5322, we renamed reusable blocks to shared blocks throughout the UI.

Now that this feature has settled down, it's a good time to perform this change throughout the codebase and rename any function, variable or constant from e.g. reusableBlock to sharedBlock.

This was brought up in #5322 (comment).

To do this, I performed these changes automatically:

  • s/reusableBlock/sharedBlock/
  • s/ReusableBlock/SharedBlock/
  • s/reusable-block/shared-block/
  • s/reusable_block/shared_block/
  • s/REUSABLE_BLOCK/SHARED_BLOCK/
  • s/reusable block/shared block/
  • s/is-reusable/is-shared/
  • s/convertBlockToReusable/convertBlockToShared/
  • s/CONVERT_BLOCK_TO_REUSABLE/CONVERT_BLOCK_TO_SHARED/

I then performed these changes manually:

  • Replaced occurrences of /reusable block/i
  • Renamed files that match /reusable/i
  • Audit all occurrences of /reusable/I

I then spent two hours trying to get our PHP unit tests to run locally, but that's another story! 🙃

How Has This Been Tested?

First, the automated ought to pass.

Then:

  1. Create a shared block
  2. Insert a shared block
  3. Edit and save a shared block
  4. Edit and cancel a shared block
  5. Convert a shared block to a regular block
  6. Delete a shared block

@noisysocks noisysocks added [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement. [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) and removed [Status] In Progress Tracking issues with work in progress labels Apr 5, 2018
@noisysocks noisysocks requested review from pento and gziolo April 5, 2018 06:09
Copy link
Member

@pento pento left a comment

Choose a reason for hiding this comment

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

Works for me.

Let's find out how many PRs will have merge conflicts after this. 🙃

- s/reusableBlock/sharedBlock/
- s/ReusableBlock/SharedBlock/
- s/reusable-block/shared-block/
- s/reusable_block/shared_block/
- s/REUSABLE_BLOCK/SHARED_BLOCK/
- s/reusable block/shared block/
- s/is-reusable/is-shared/
- s/convertBlockToReusable/convertBlockToShared/
- s/CONVERT_BLOCK_TO_REUSABLE/CONVERT_BLOCK_TO_SHARED/
- Manually replace occurrences of /reusable block/i
- Manually rename files that match /reusable/i
- Audit all occurrences of /reusable/i
@noisysocks noisysocks force-pushed the update/rename-reusableBlocks-to-sharedBlocks branch from a92352d to ee1b374 Compare April 5, 2018 23:11
@noisysocks
Copy link
Member Author

😅

@noisysocks noisysocks merged commit 0782f09 into master Apr 5, 2018
@noisysocks noisysocks deleted the update/rename-reusableBlocks-to-sharedBlocks branch April 5, 2018 23:19
@noisysocks noisysocks modified the milestones: 2.6, 2.7 Apr 6, 2018
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] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants