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 drop cap help text in paragraph block #6415

Merged
merged 4 commits into from
Apr 27, 2018

Conversation

samikeijonen
Copy link
Contributor

Description

Adds drop cap help text as mentioned in #2146.

How has this been tested?

  • Run npm test without errors.
  • Tested toggling the Drop Cap in several paragraps.

Screenshots

drop-cap-help-text

Types of changes

Adds help text under Drop Cap in paragraph

Checklist:

  • [x ] My code is tested.
  • [ x] My code follows the WordPress code style.
  • [ x] My code follows the accessibility standards.
  • My code has proper inline documentation.

@samikeijonen
Copy link
Contributor Author

I have help text Drop Cap is not set. / Drop Cap is set. Definitely need help what wording we should use.

@pento
Copy link
Member

pento commented Apr 26, 2018

Thanks for jumping onto this one, @samikeijonen!

It seems like most useful help text is the one that describes what's happening as a result of the toggle being changed, rather than simply a "set"/"not set" binary.

In this case, perhaps something like "The paragraph will display with a drop cap" / "...will not display..."? That's a little verbose, but heading in the right direction.

@samikeijonen
Copy link
Contributor Author

Thanks @pento! I updated the help text.

@pento pento added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Framework Issues related to broader framework topics, especially as it relates to javascript [Feature] UI Components Impacts or related to the UI component system [Type] Copy Issues or PRs that need copy editing assistance labels Apr 26, 2018
@pento pento added this to the 2.8 milestone Apr 26, 2018
@pento pento added the Needs Copy Review Needs review of user-facing copy (language, phrasing) label Apr 26, 2018
@pento
Copy link
Member

pento commented Apr 26, 2018

Thanks, @samikeijonen!

Having it longer than a line does make it seem a bit verbose. I've tagged this PR for a copy review, to get some fresh ideas.

For reference, here's what it currently looks like:

Drop Cap setting disabled

Drop Cap setting enabled

@samikeijonen
Copy link
Contributor Author

Yeah I noticed the same. In other languages (like here in Finnish) it will get even longer. So it's probably going to get in two lines anyways.

I can start adding similar help text to other block settings also.

@jasmussen
Copy link
Contributor

jasmussen commented Apr 26, 2018

The docs for the switch were recently updated to suggest the pattern of being able to provide toggled vs. untoggled help text, which is used here, cool.

This is especially helpful in cases where both states of the switch can benefit from a contextual description. In the case of the gallery crop, I think that's a decent use:

crop images

While I do agree that "Drop Cap" needs help text — not everyone knows that term — are we sure that it needs contextual help text for both states? If yes, then I think we should tune the verbiage further, and instead of just "The paragraph will display a drop cap", go into explaining exactly what this means. For example:

"A drop cap is a large initial letter that drops below the first line of a paragraph."

If we do want contextual help text, perhaps something in the vein of:

"Toggle to show a large initial letter."

And then:

"Showing large initial letter."


Here's how the switches w. help text work on Android: https://cloudup.com/cGoqxCgwPjG

  • Note the NFC help text which is not contextual to the on/off state
  • Note the Bluetooth, which shows the connection state when toggled on, and "Off" when toggled off entirely

This is all to say that the help text for these components can be still more nuanced than just showing on/off state.

@samikeijonen
Copy link
Contributor Author

I personally like these:

"Toggle to show a large initial letter."

And then:

"Showing large initial letter."

@pento
Copy link
Member

pento commented Apr 26, 2018

@jasmussen: Yah, the idea is to add contextual help text that describes the state of the switch, per the discussion here: #2146 (comment)

I'm cool with those phrases. 🙂

@jasmussen
Copy link
Contributor

WFM.

For other situations, I think we should what we can do with contextual help text to be more than just binary, though. I know WordPress doesn't have a Wi-Fi toggle, but if it did, it could show both "Off" and "Connected to Free Public Wifi" or even connected to "The Promised LAN". The point I'm trying to make is that with the more verbose help text, we can be not only contextual, but go beyond that. There might also be situations where the label is sufficient context for the switch.

@samikeijonen
Copy link
Contributor Author

The sum it up, help text should

  1. give hint is the toggle on or off.
  2. explain the meaning off the toggle.

@michelleweber
Copy link

I completely agree that we need to off two levels of explanation here, (1) what a drop cap is and (2) whether you've got them enabled or not.

On the "what it is" front, I wonder if we want to explain not just what it is, but why you'd use one -- if you have no idea what a drop cap is to begin with, you also won't know why it's a thing you might want to try. So something like:

A "drop cap" makes the first letter of this paragraph larger and bolder, adding elegance/style to your text.

Add style to your text by making the first letter of this paragraph larger and bolder -- the large letter is called a "drop cap."

A "drop cap" will give this paragraph a larger first letter, adding style and drawing your reader's eye to the text.

For the actual toggle, I like @jasmussen's suggestions.

@samikeijonen
Copy link
Contributor Author

Let me know if there is something that needs to be done.

@pento pento removed the Needs Copy Review Needs review of user-facing copy (language, phrasing) label Apr 27, 2018
@pento pento merged commit fe1a147 into WordPress:master Apr 27, 2018
@samikeijonen
Copy link
Contributor Author

Thanks @pento. I'll start checking other help texts.

@samikeijonen samikeijonen deleted the update/drop-cap-help-text branch April 27, 2018 07:12
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 [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Framework Issues related to broader framework topics, especially as it relates to javascript [Type] Copy Issues or PRs that need copy editing assistance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants