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

Edit Navigation: Replace store name string with exposed store definition #27182

Conversation

rafaelgallani
Copy link
Contributor

Description

Addresses #27088. Replaces the store names (hardcoded strings) with the exposed store definitions.

How has this been tested?

npm run test, no additional test was done.

Screenshots

edit-navigation

Types of changes

Code refactoring, non-breaking change.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Nov 22, 2020
@rafaelgallani
Copy link
Contributor Author

I was not sure whether changes should be made to the controls.js and it's unit test file, so I ended up not changing them.
Will they need changes too? If yes, then how could it be done? 🤔

@gziolo gziolo added [Type] Code Quality Issues or PRs that relate to code quality [Feature] Navigation Screen labels Nov 22, 2020
@gziolo
Copy link
Member

gziolo commented Nov 22, 2020

You can follow the guidance that @adamziel shared in #27094 (comment) for the file with controls - a separate file with constant for the store name.

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

This part is good to go, you can open a follow up with the remaining changes 😄

@gziolo gziolo merged commit e2ffa92 into WordPress:master Nov 24, 2020
@github-actions github-actions bot added this to the Gutenberg 9.5 milestone Nov 24, 2020
@gziolo gziolo changed the title Replace "core/edit-navigation" store name string with exposed store definition Edit Navigation: Replace store name string with exposed store definition Nov 24, 2020
@rafaelgallani
Copy link
Contributor Author

@gziolo Sorry for taking so long to reply, things are kinda crazy around here... 😅
I'll take the constants approach. Can I do it in this same branch or should I create a new one? Or it doesn't matter? 😸

@gziolo
Copy link
Member

gziolo commented Nov 25, 2020

No worries, it's fine to have several smaller focused PRs. It doesn't matter which branch you use, it's probably easier to have a new one off the upstream master branch. Thank you again for your contributions 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants