Skip to content

Capitalization Guidelines for Nimble in storybook - #3032

Open
aangerhofer wants to merge 1 commit into
mainfrom
users/alicedarrow/addCapitalizationGuidelines
Open

Capitalization Guidelines for Nimble in storybook#3032
aangerhofer wants to merge 1 commit into
mainfrom
users/alicedarrow/addCapitalizationGuidelines

Conversation

@aangerhofer

Copy link
Copy Markdown
Contributor

Pull Request

🤨 Rationale

It's really starting to bother me that our only capitalization guidance sits in the unmaintained fuse document. I also want to make an agent skill to catch capitalization issues and step one was getting some markdown around capitalization & team agreement.

👩‍💻 Implementation

Did my best to see what we're doing, made some judgement calls

🧪 Testing

Putting the PR up for review so we can debate the rules

✅ Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@@ -0,0 +1,97 @@
import { Meta } from '@storybook/addon-docs/blocks';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I added @mollykreis as a reviewer because she has a long history of helping keep SystemLink UI casing consistent and probably knows our current rules better than anyone.

- Sentence case for all other UI text.

## Element Cases

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It would be good to add a section about control labels to this list. I think we currently use sentence case in SystemLink.


### Chip

Chips should use Title Case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: consistency about "Title Case" vs "title case" across this document. Personally I'd vote to demonstrate what it looks like in the section at the top and then use normal sentence capitalization elsewhere, but I'm fine if you prefer to demonstrate what it looks like everywhere.


<img src={tabsImage} alt="Tabs capitalization example" />

### Tile

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nimble doesn't have tiles right now. Is this the same as a Card? Or is it a concept that hasn't made it to code yet?


### Tree View

Tree view should use sentence case for all elements and sub elements.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I generally agree with sentence case for trees, though in SystemLink the main navigation tree uses Title Case. I guess you could argue that app titles are proper nouns so that overrides the sentence case guidance?
Image

Kinda related, I'm fine with Title Case for chips but often in SystemLink they are names of resources that have their own capitalization rules or are provided by users. That would override this guidance too.

Image

Your call whether these cases are worth clarifying.


### Tabs

Tabs in applications should be title case. Tabs in dialogs and drawers should

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why the distinction between app level and dialog/drawer level?

In general, use the following capitalization conventions to ensure consistency
across the interface:

- ALL CAPS for table headers.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The table column content section currently says "Titles should use "Headline Casing" and Nimble will automatically capitalize them for display in the header." That approach is necessary so that the content isn't all caps when it's rendered in other places like tooltips or screen readers. Your call whether to get into that level of detail here.

- Title Case for dialog titles.
- Sentence case for all other UI text.

## Element Cases

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should decide on a strategy for including this content inline on individual component doc pages. e.g. The table column content section already has some guidance. We could do similar for other content and label slots if we want.

Options I see are:

  1. remove that guidance and centralize it here. More maintainable but less discoverable.
  2. duplicate guidance both here and in component docs. Less maintainable but more discoverable.
  3. only document component guidance in component docs and simplify this page to just use summary info. Also more maintainable but less discoverable.

I would vote for 2 if you're willing to do the work!

- Title Case for dialog titles.
- Sentence case for all other UI text.

## Element Cases

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We tend to use this terminology in Nimble

Suggested change
## Element Cases
## Component Cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants