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

Replace string literals with store definitions in block-editor #31934

Merged
merged 2 commits into from
May 18, 2021

Conversation

aristath
Copy link
Member

Description

Replaces literals with store definitions for the block-editor package(s).
Part of #27088

How has this been tested?

  • npm run lint-js packages/block-editor/ no longer throws warnings for these string literals
  • tests should be green

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • 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 (please manually search all *.native.js files for terms that need renaming or removal).

@aristath aristath requested a review from gziolo May 18, 2021 10:47
@aristath aristath requested a review from ellatrix as a code owner May 18, 2021 10:47
@gziolo
Copy link
Member

gziolo commented May 18, 2021

For React Native files I filed an issue some time ago: #27751. It explains in-depth the issue. The gist of it is that @wordpress/block-editor is a lower-level package than @wordpress/edit-post so that creates a cyclic dependency between those two.

We can safely merge only changes in:
packages/block-editor/src/components/use-block-drop-zone/index.js

We should list all remaining files in the issue I referenced. It's a design flow that needs to be addressed separately. This is also why we wanted to replace hardcoded strings with imported objects so we could catch those violations.

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.

Nice, thank you!

@aristath aristath merged commit 26f2cb4 into trunk May 18, 2021
@aristath aristath deleted the fix/block-editor-string-literals branch May 18, 2021 14:13
@gziolo gziolo added the [Type] Code Quality Issues or PRs that relate to code quality label May 18, 2021
@ellatrix
Copy link
Member

Why was this merged with failing tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants