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鈥檒l 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

Projects
None yet
2 participants
@noisysocks
Member

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

pento approved these changes Apr 5, 2018

Works for me.

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

Code clean-up: Rename 'reusable blocks' to 'shared blocks'
- 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

This comment has been minimized.

Member

noisysocks commented Apr 5, 2018

馃槄

@noisysocks noisysocks merged commit 0782f09 into master Apr 5, 2018

2 checks passed

codecov/project 44.51% (+0%) compared to f539288
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@noisysocks noisysocks deleted the update/rename-reusableBlocks-to-sharedBlocks branch Apr 5, 2018

@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