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

BlockTitle: refactor withSelect to useSelect #22910

Merged
merged 5 commits into from
Jun 5, 2020
Merged

BlockTitle: refactor withSelect to useSelect #22910

merged 5 commits into from
Jun 5, 2020

Conversation

torounit
Copy link
Member

@torounit torounit commented Jun 4, 2020

Description

Related to #22890

How has this been tested?

select block and check footer breadcrumbs.

Types of changes

Refactaring.

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.

@ItsJonQ
Copy link

ItsJonQ commented Jun 4, 2020

@torounit Thanks for this update 🎉

I was a little suspicious of the export function BlockTitle bit. I did a search, and it doesn't look like the (previous) unconnected <BlockTitle /> component was used anywhere.

Some searching did yield these files though.

It looks like we'll need to update these docs, since the prop is clientId rather than name.

https://github.com/WordPress/gutenberg/blob/master/docs/contributors/coding-guidelines.md#documenting-wordpresselement-react-components

Lastly, the tests for the <BlockTitle /> component:
https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/block-title/test/index.js

Hope this helps! 🙏

@torounit
Copy link
Member Author

torounit commented Jun 4, 2020

@ItsJonQ
Sorry I was misunderstood.

I'll fix that.

@torounit torounit changed the title useSelect for site-title . useSelect for block-title . Jun 4, 2020
@ItsJonQ
Copy link

ItsJonQ commented Jun 4, 2020

Sorry I was misunderstood.

@torounit No worries at all! I make mistakes like that all the time 😊

@torounit
Copy link
Member Author

torounit commented Jun 4, 2020

@ItsJonQ

fixed bug and updated test and docs !!

@ZebulanStanphill ZebulanStanphill added [Package] Block editor /packages/block-editor [Type] Code Quality Issues or PRs that relate to code quality labels Jun 4, 2020
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.

Nice one

@youknowriad youknowriad merged commit 1d0eecb into WordPress:master Jun 5, 2020
@github-actions github-actions bot added this to the Gutenberg 8.3 milestone Jun 5, 2020
@torounit torounit deleted the refactor/site-title branch June 6, 2020 00:09
@oandregal oandregal changed the title useSelect for block-title . BlockTitle: refactor withSelecto to useSelect Jun 8, 2020
@oandregal oandregal changed the title BlockTitle: refactor withSelecto to useSelect BlockTitle: refactor withSelect to useSelect Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants