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

HorizontalRule component for cross-platform separator block #14361

Merged
merged 10 commits into from
Apr 17, 2019

Conversation

koke
Copy link
Contributor

@koke koke commented Mar 9, 2019

Description

This PR adds a HorizontalRule wrapper to the hr HTML tag, using react-native-hr on the native implementation, to allow for a cross platform separator block.

How has this been tested?

Tested on mobile:

  • Create a new post
  • Insert a new block, verify that separator is available
  • Insert a separator, verify it renders correctly

Tested on web:

  • Create a new post
  • Insert a separator block, verify it renders correctly, block styles still work
  • Preview the post and verify it renders correctly

Screenshots

Simulator Screen Shot - iPhone Xs - 2019-04-17 at 10 16 46

Types of changes

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.

@koke koke changed the base branch from rnmobile/develop to master April 12, 2019 11:14
@koke
Copy link
Contributor Author

koke commented Apr 12, 2019

@gziolo thanks for the suggestions. I'll do some more testing next week and get this ready to review and merge

@koke
Copy link
Contributor Author

koke commented Apr 17, 2019

I think this is ready to review. I tested on mobile and web and everything looks ok. I considered adding a README.md to the new primitive, but I couldn't come up with anything good, since it's mostly a wrapper for <hr> with no specific props. If you have any suggestions around documentation, I'd be happy to include that.

@koke koke changed the title [WIP] Separator block / Hr component HorizontalRule component / Cross-platform separator block Apr 17, 2019
@koke koke changed the title HorizontalRule component / Cross-platform separator block HorizontalRule component for cross-platform separator block Apr 17, 2019
@gziolo
Copy link
Member

gziolo commented Apr 17, 2019

I considered adding a README.md to the new primitive, but I couldn't come up with anything good, since it's mostly a wrapper for <hr> with no specific props. If you have any suggestions around documentation, I'd be happy to include that.

I think this is totally expected to be that simple :)
We need to have very basic docs to ensure they are picked up by Gutenberg Handbook:
https://wordpress.org/gutenberg/handbook/designers-developers/developers/components/

It will be exposed in the sidebar.

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.

Let's add docs and get it merged 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants