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 for RangeControl documentation #12564

Merged
merged 4 commits into from
Jan 26, 2019
Merged

Conversation

davewhitley
Copy link
Contributor

@davewhitley davewhitley commented Dec 3, 2018

Initial commit to update the RangeControl readme. These changes add design documentation.

Description

This PR adds design guideline documentation in addition to the development documentation that existed previously. These guidelines are 'best practices' for the usage of the component, as well as describing the component in more detail.

Screenshots

A preview can be seen here, although it doesn't represent what it will look like in the handbook:

preview

Feedback

I'd appreciate feedback on:

  • Whether my markdown syntax is correct
  • Design guidelines
  • Double-checking a11y of the document
  • Seeing if the design guidelines align with the development documentation

Thank you!

This adds design documentation to RangeControl and also edits one sentence in the developer documentation to make it more generic.
@davewhitley davewhitley added [Type] Developer Documentation Documentation for developers [Feature] UI Components Impacts or related to the UI component system labels Dec 3, 2018
Copy link
Member

@chrisvanpatten chrisvanpatten left a comment

Choose a reason for hiding this comment

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

A few questions but overall nice. I also noticed some of the docs here are pulled from Material Design's documentation — do we need to credit that somewhere?

packages/components/src/range-control/README.md Outdated Show resolved Hide resolved

### Usage

RangeControls reflect a range of values along a track, from which users may select a single value. They are ideal for adjusting settings such as volume, opacity, or text size.
Copy link
Member

Choose a reason for hiding this comment

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

This is a broader question but I wonder whether it makes more sense to refer to RangeControls reflect or the singular A RangeControl reflects. Might be worth a copy review on this.


##### Continuous sliders

Continuous sliders allow users to select a value along a subjective range. They do not display the selected numeric value. Use them when displaying/editing the numeric value is not important, like volume.
Copy link
Member

Choose a reason for hiding this comment

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

Does the range component even allow this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not explicitly, although you can set a large max number and simulate a continuous slider. I feel like it will be a needed feature in the near future, given that it's an option in a regular html slider. Even though the component doesn't support it fully, I think the design guidelines can be somewhat aspirational in this case.

@davewhitley
Copy link
Contributor Author

@chrisvanpatten

A few questions but overall nice. I also noticed some of the docs here are pulled from Material Design's documentation — do we need to credit that somewhere?

You're right, most of the docs are pulled from Material, even though they are mostly edited to fit WordPress. What would be the best way to credit Material? I think it would be easier if we had a separate documentation site. In terms of the component package, maybe a top level readme file in the component folder?

@ajitbohra
Copy link
Member

@chrisvanpatten

Should we convert props info to the table like we have one here https://github.com/WordPress/gutenberg/tree/master/packages/components/src/button#props

The table looks neat and easy to refer compared to vertical flowing text, though formatting on the handbook for table needs CSS tweaks.

@chrisvanpatten
Copy link
Member

@ajitbohra I like the more verbose version we have here as it makes it easier to deep-link to a specific prop in GitHub. Also the table makes it harder to provide in-context examples for specific props.

@kjellr
Copy link
Contributor

kjellr commented Jan 15, 2019

You're right, most of the docs are pulled from Material, even though they are mostly edited to fit WordPress. What would be the best way to credit Material? I think it would be easier if we had a separate documentation site. In terms of the component package, maybe a top level readme file in the component folder?

I do think something like that would make sense — but maybe it could just be a note on one of these more global docs pages?

https://github.com/WordPress/gutenberg/blob/master/docs/readme.md
https://github.com/WordPress/gutenberg/blob/master/docs/designers-developers/readme.md

In any case, I don't think it should hold up this PR. It looks to me like the other issues raised here are addressed — can someone else confirm?

@davewhitley
Copy link
Contributor Author

I addressed all the raised issues to the best of my knowledge. Thanks!

@gziolo
Copy link
Member

gziolo commented Jan 25, 2019

@kjellr or @mapk can you give 👍 for the changes proposed, they mostly related to design-related considerations :)

@gziolo gziolo requested review from mapk and kjellr January 25, 2019 12:44
Copy link
Contributor

@mapk mapk left a comment

Choose a reason for hiding this comment

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

The usage of "range sliders" and "continuous sliders" appears in the Behavior section of the doc before I even understand the difference. When we get to the Type section, I only see "continuous slider" and "discrete slider" mentioned which leaves me a bit lost.

I imagine that "range slider" is a term that includes both "continuous" and "discrete" but am unsure. Can this be made more explicit?

@kjellr
Copy link
Contributor

kjellr commented Jan 25, 2019

I agree with @mapk on that one. For the simplest fix, I think it'd be fine to move types out of "Usage" and into "Anatomy" (Or even into its own H3 maybe). Bonus points if we can include a screenshot of each, but we can also add that later on.

I removed "range slider" language so that it's not confused with the types of sliders. I also inserted "RangeControl" when referring to the whole component. "Slider" is used when casually referring to the thumb+track portion of the component.
@davewhitley
Copy link
Contributor Author

@mapk @kjellr ready for another review

Moved Types section here 57fa128

Updated slider language here 4bd4fcc

"Slider" refers to the thumb+track part of the component even though it's not in the official anatomy.

Copy link
Contributor

@mapk mapk left a comment

Choose a reason for hiding this comment

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

:shipit: Reads much better for me now. Thanks!

@gziolo
Copy link
Member

gziolo commented Jan 26, 2019

It’s only docs changes, we can ignore bad the fact that Travis CI is red expressing its bad mood 😃 Nice work on providing lots of useful details about this component.

@gziolo gziolo merged commit 096c12c into master Jan 26, 2019
@gziolo gziolo deleted the update/rangecontrol-readme branch January 26, 2019 07:22
daniloercoli added a commit that referenced this pull request Jan 26, 2019
…rnmobile/372-enter-key-detection-to-title

* 'master' of https://github.com/WordPress/gutenberg: (29 commits)
  Update for RangeControl documentation (#12564)
  Plugin: Deprecate gutenberg_load_list_reusable_blocks (#13456)
  Update the columns attribute in onSelectImages so that if images are removed via the media modal, the columns can't be higher than the new number of images (#13488)
  Replace the fullscreen "exit" icon with a back arrow (#13403)
  Include :visited links in button color (#12183)
  Amazon Kindle block (#13510)
  Plugin: Deprecate gutenberg_prepare_blocks_for_js (#13457)
  Add watcher on Linux: change fs to node-watch (#13448)
  Plugin: Deprecate `gutenberg` theme support (#13458)
  Datepicker: Add inValidDay support (#12962)
  Block Switcher: Render disabled button even if multi-selection (#13431)
  Plugin: Deprecate gutenberg_register_post_types (#13468)
  Plugin: Deprecate register_tinymce_scripts (#13466)
  Set minimum of words for RSS excerpt (#13502)
  Plugin: Deprecate gutenberg_get_block_categories (#13454)
  Plugin: Deprecate gutenberg_content_block_version (#13469)
  API Fetch: Expose nonce on created middleware function (#13451)
  Plugin: Remove list screens integrations (#13459)
  Plugin: Remove core-defined block detection functions (#13467)
  Spec Parser: Move generated spec parser to package (#13493)
  ...
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
* Update for RangeControl documentation

This adds design documentation to RangeControl and also edits one sentence in the developer documentation to make it more generic.

* Typos and small adjustments

* Moving types higher in the doc

* Updates slider language

I removed "range slider" language so that it's not confused with the types of sliders. I also inserted "RangeControl" when referring to the whole component. "Slider" is used when casually referring to the thumb+track portion of the component.
youknowriad pushed a commit that referenced this pull request Mar 6, 2019
* Update for RangeControl documentation

This adds design documentation to RangeControl and also edits one sentence in the developer documentation to make it more generic.

* Typos and small adjustments

* Moving types higher in the doc

* Updates slider language

I removed "range slider" language so that it's not confused with the types of sliders. I also inserted "RangeControl" when referring to the whole component. "Slider" is used when casually referring to the thumb+track portion of the component.
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 [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants