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

Add documentation for colors component #25567

Merged
merged 4 commits into from Oct 6, 2020
Merged

Add documentation for colors component #25567

merged 4 commits into from Oct 6, 2020

Conversation

vcanales
Copy link
Member

@vcanales vcanales commented Sep 23, 2020

Description

Adding documentation for the colors component. This component provides a collection of color tools for Blocks, most of which were already documented on the code itself.

See #22891

How has this been tested?

Documentation only.

Types of changes

Documentation.

Checklist:

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

@vcanales vcanales marked this pull request as ready for review September 23, 2020 14:48
@annezazu annezazu added the [Type] Developer Documentation Documentation for developers label Sep 24, 2020
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

LGTM 👍 I guess we can expand a little bit on the withColors and explain which props are injected but I guess we can merge and iterate.


## `useColors` hook

Experimental hook that combines the functionality of the `withColors` HOC and `PanelColorSettings`, with `InspectorControls` into an easy to use `useColors` hook.
Copy link
Member

Choose a reason for hiding this comment

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

I guess instead of "Experimental hook that combines the functionality of the withColors HOC and PanelColorSettings, with InspectorControls into an easy to use useColors hook.".

We can just say that it provides equivalent functionality to withColors as a react hook.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've modified the useColors explanation as you suggested.

@vcanales
Copy link
Member Author

I guess we can expand a little bit on the withColors and explain which props are injected

As I understand it, it injects the colors prop, but I'm not entirely sure what that object contains.

ps. I still don't have write permissions here. I think it's time for me to ask for them :)

@mkaz mkaz merged commit c2ea1b2 into WordPress:master Oct 6, 2020
@github-actions github-actions bot added this to the Gutenberg 9.2 milestone Oct 6, 2020
@aristath
Copy link
Member

aristath commented Oct 8, 2020

Perhaps we should mention at least once what HOC means? Not everyone will understand it's a higher order component. As a non-American I always find it hard to keep track of all undocumented and implied abbreviations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants