-
Notifications
You must be signed in to change notification settings - Fork 83
Added designer notes content in markdown to most components. #1123
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
Conversation
Added designer notes content in markdown to most components.
src/components/alert/definition.js
Outdated
@@ -3,6 +3,19 @@ import OptionsHelper from '../../utils/helpers/options-helper'; | |||
import Definition from './../../../demo/utils/definition'; | |||
|
|||
let definition = new Definition('alert', Alert, { | |||
description: `I can see very important error or warning message interrupts my activity, but I can dismiss it when I choose.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this reads too well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Series of typos - will correct.
src/components/button/definition.js
Outdated
@@ -3,6 +3,19 @@ import OptionsHelper from '../../utils/helpers/options-helper'; | |||
import Definition from './../../../demo/utils/definition'; | |||
|
|||
let definition = new Definition('button', Button, { | |||
description: `I can take a positive or negative action.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the use of this so polar? Isn't there scope for buttons which are neither positive or negative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will reword to generic.
src/components/flash/definition.js
Outdated
@@ -3,6 +3,17 @@ import Definition from './../../../demo/utils/definition'; | |||
import OptionsHelper from './../../utils/helpers/options-helper'; | |||
|
|||
let definition = new Definition('flash', Flash, { | |||
description: `I can see a simple positive or negative confirmation of an action which disappears quickly.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error messages don't disappear automatically - they persist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reworded to make clear
src/components/tabs/definition.js
Outdated
@@ -4,6 +4,20 @@ import OptionsHelper from '../../utils/helpers/options-helper'; | |||
import tabDefinition from './tab/definition'; | |||
|
|||
let definition = new Definition('tabs', Tabs, { | |||
description: `I can quickly view variants of a page or filter Table content.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filter Table content? I think that is a bit misleading - you may be thinking of an area where we render different Tables in each Tab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reworded to clarify.
Minor content updates in response to feedback.
Updated content in response to reviewer comments - thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @benwilsonsage. Nice work on these! I'm still working my way through but the majority of points are small.
I'd recommend pulling the branch down and looking at the designer notes in place (if you haven't already).
@andrewjtait @toni-leigh can we undertake some styling work around the designer notes section? I'll catch-up with you tomorrow about what we need to do.
src/components/alert/definition.js
Outdated
* __Longer, time sensitive message that must be dismissed?__ Try Toast. | ||
* __Confirm or cancel an action I’ve initiated?__ Try Confirm. | ||
* __Simple task in context?__ Try Dialog. | ||
`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you expect the 'try' to be a link?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added links in markdown throughout
src/components/button/definition.js
Outdated
* __Range of buttons where one is more important?__ Try Split Button. | ||
* __Range of buttons all of the same importance?__ Try Multi Action Button. | ||
* __Choosing one option from a highly visible range?__ Try Button Toggle. | ||
`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked and removed any stray invisible characters.
* __Choosing one option from a very long list?__ Try Dropdown. | ||
* __Choosing more than one option?__ Try Checkbox. | ||
* __Icons.__ | ||
`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked and removed invisible chars
* __Performing a single action?__ Try Button. | ||
* __Range of buttons where one is more important?__ Try Split Button. | ||
* __Range of buttons of the same importance?__ Try Multi Action Button. | ||
* __Choosing one option from a longer list?__ Try Radio Button. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it worth putting specific numbers on these for guidance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added guidance in the text of each individual component.
src/components/alert/definition.js
Outdated
@@ -3,6 +3,19 @@ import OptionsHelper from '../../utils/helpers/options-helper'; | |||
import Definition from './../../../demo/utils/definition'; | |||
|
|||
let definition = new Definition('alert', Alert, { | |||
description: `An important message interrupts my activity, but I can dismiss it when I choose.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's your reason for writing descriptions in the first person?
It feels slightly different to the rest of the content. Maybe we should be mindful of the context, and be specific about what the component is?
Here's some examples from similar sites for a button as reference:
http://getbootstrap.com/components/#btn-dropdowns
https://material.io/guidelines/components/buttons.html
http://blueprintjs.com/docs/#components.button
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reworded out of the first person - the idea was to put the user's perspective first, but I see it's out of precedent with similar sites.
src/components/flash/definition.js
Outdated
* __Longer message which stays on-screen?__ Try Message. | ||
* __Longer, time sensitive message that must be dismissed?__ Try Toast. | ||
* __Error or warning message that interrupts activity?__ Try Alert. | ||
`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked and removed
* Try to create a single path to completion with your inputs, and between your inputs and the primary action Button - there’s good evidence users complete forms faster like this. | ||
* If an input is read-only, remove the field border so it appears as static text. | ||
* You can disable components in forms, but try to avoid this. If you need to, make it clear what the user needs to do, in order to activate the component. | ||
* Indicate mandatory, or optional fields, whichever is the minority. Think carefully before collecting optional data - don’t collect information you don’t need! Try suffixing ‘(optional)’ after your field label. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we duplicate content if it appears on child components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The general advice on forms only appears for Form and Fieldset, not the sub-components. Disabling is mentioned in a few places for text inputs as that tends to happen a lot.
src/components/form/definition.js
Outdated
* More guidance is available for each of the individual inputs you might place inside this component. | ||
|
||
* __Editing a number of closely related inputs?__ Try Fieldset. | ||
`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked and removed
src/components/help/definition.js
Outdated
|
||
* __Tooltip hovering on any Carbon icon?__ Try Icon. | ||
* __Tooltip hovering on any component?__ Try Tooltip. | ||
`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked and removed
src/components/link/definition.js
Outdated
* To make the meaning of a link clearer, you can add an icon before it. Just name one of the Carbon icons. | ||
* Make your link names meaningful - for example, instead of ‘Click here’, try ‘Download Invoice 001’. | ||
* WCAG guidelines recommend that Color is not used as the only visual means of conveying information, indicating an action. Carbon applies bold weight, but you could also use text decoration. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked and removed
@benwilsonsage @kylemayne the random line breaks occur due to added paragraphs in the markup shown here - markedjs/marked#663 This is caused by only adding one empty line to break up the lists. Simple fix is to add a second empty line. I can add these changes to the PR but it will likely hide most of the other comments related to grammar/sentencing etc so you may want to add them as you are addressing the other comments. Let me know if you need some more info. |
Reworded out of the first person.
Including wording updates, adding cross-reference links, and h3s throughout.
Removed file committed in error.
src/components/create/definition.js
Outdated
* __Editing a number of closely related inputs?__ [Try Fieldset](/components/fieldset). | ||
* __Filling in a broad series of inputs?__ [Try Form](/components/form). | ||
* __Viewing content that’s grouped together visually?__ [Try Pod](/components/pod). | ||
* __Using Fieldset and Pod components together?__ [Try Show/Edit Pod. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be [Try Show/Edit Pod](/components/show-edit-pod)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
designerNotes: ` | ||
* Useful to represent a person, user, or organisation, similar to an avatar. | ||
* Use initials rather than an icon if you prefer. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs another empty line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content adjusted.
src/components/profile/definition.js
Outdated
designerNotes: ` | ||
* Useful to represent a person, user, or organisation, similar to an avatar. | ||
* The user is initially represented with their initials, but hovering on the initials can reveal an image. This helps to avoid distracting the user. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs another empty line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content adjusted.
Missing designer notes added. Minor content updates and corrections.
Done some QA over each page to ensure correct formatting. All seems fine. I think this is good to go unless @kylemayne spots any changes he would like to make |
Added designer notes content in markdown to most components on the Carbon demo site.