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

Update RangeControl documentation to clarify rail vs track #44057

Merged
merged 2 commits into from
Sep 19, 2022

Conversation

kkoppenhaver
Copy link
Contributor

What?

This PR addresses the need for more specificity in the RangeControl component docs, identified in #34292.

Why?

This clarifies the documentation provided for the RangeControl component and makes it more specific with regards to the Rail and Track portions of the component.

How?

Documentation in the Anatomy section has been updated and added to.

Testing Instructions

Review the changed file as part of the PR.

@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @kkoppenhaver! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Sep 11, 2022
@ciampo
Copy link
Contributor

ciampo commented Sep 12, 2022

Hey @kkoppenhaver , thank you for your contribution!

As listed in the original issue, currently the docs feature an image that has numbers that are described by the text — and with your changes, those numbers would go out of sync.

image

@mirka , do you think we can remove this image altogether from RangeControl's docs?

@ciampo ciampo added [Package] Components /packages/components Needs User Documentation Needs new user documentation labels Sep 12, 2022
@ciampo ciampo requested review from mirka, ciampo and chad1008 September 12, 2022 10:05
@mirka
Copy link
Member

mirka commented Sep 12, 2022

@mirka , do you think we can remove this image altogether from RangeControl's docs?

I'm fine with removing, unless @jasmussen has the original file and wants to update it 🙂 https://developer.wordpress.org/block-editor/reference-guides/components/range-control/

@jasmussen
Copy link
Contributor

The icon and metrics are wrong, so it definitely needs an update. However we have a ways to go across components, so an update now would likely make it out of date quickly. With storybook able to run the actual component, I think we're fine without the image for now. What do you think?

@ciampo
Copy link
Contributor

ciampo commented Sep 13, 2022

With storybook able to run the actual component, I think we're fine without the image for now. What do you think?

Agreed

Copy link
Contributor

@chad1008 chad1008 left a comment

Choose a reason for hiding this comment

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

The updated docs look great to me, thanks @kkoppenhaver! I'd also say this is good to go once the image is removed from Storybook 👍

@kkoppenhaver
Copy link
Contributor Author

@chad1008 I'm not familiar with Storybook or where that lives. Is that something I'm able to update or does that have to be somebody else?

@ciampo
Copy link
Contributor

ciampo commented Sep 15, 2022

I believe that @chad1008 meant to say to remove the image from the README, not from Storybook.

That can be done easily:

diff --git a/packages/components/src/range-control/README.md b/packages/components/src/range-control/README.md
index 346055d483..2a8f7ae7a0 100644
--- a/packages/components/src/range-control/README.md
+++ b/packages/components/src/range-control/README.md
@@ -16,8 +16,6 @@ A RangeControl for volume
 
 ### Anatomy
 
-![](https://make.wordpress.org/design/files/2018/12/rangecontrol-anatomy.png)
-
 A RangeControl can contain the following elements:
 
 1. **Rail**: The rail represents the entire surface area of the slider, from the minimum value selectable by the user to the maximum value selectable by the user. For left-to-right (LTR) languages, the minimum value appears on the far left, and the maximum value on the far right. For right-to-left (RTL) languages this orientation is reversed, with the minimum value on the far right and the maximum value on the far left.

The component looks good on Storybook :

Screenshot 2022-09-15 at 14 40 50

@chad1008
Copy link
Contributor

oof, yes, sorry - I completely misspoke there. Sorry for the confusion.

@kkoppenhaver
Copy link
Contributor Author

No worries! Updated the PR to remove the image.

Copy link
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

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

Thank you @kkoppenhaver for you work here! 🚀

@ciampo ciampo merged commit 97a7730 into WordPress:trunk Sep 19, 2022
@github-actions github-actions bot added this to the Gutenberg 14.2 milestone Sep 19, 2022
@femkreations femkreations removed the Needs User Documentation Needs new user documentation label Jan 24, 2023
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 [Package] Components /packages/components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants