Skip to content

docs: update style guide skill with prop naming conventions for boolean props - #8274

Open
joshblack wants to merge 6 commits into
mainfrom
docs/update-style-guide
Open

docs: update style guide skill with prop naming conventions for boolean props#8274
joshblack wants to merge 6 commits into
mainfrom
docs/update-style-guide

Conversation

@joshblack

@joshblack joshblack commented Aug 5, 2026

Copy link
Copy Markdown
Member

Part of https://github.com/github/primer/issues/6757

Changelog

New

  • Add new doc to our style guide skill for prop naming

Changed

  • Update our style guide skill to have local routing to docs

Removed

Rollout strategy

  • None; if selected, include a brief description as to why

@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9b6633b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the staff Author is a staff member label Aug 5, 2026
@joshblack

Copy link
Copy Markdown
Member Author

Quick report when applying this skill:

┌─────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────┬─────────────────────────────────────────────────────────────────────┐
│ Current API                             │ Location                                                             │ Better shape                                                        │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ Token.isSelected                        │ Token/TokenBase.tsx:25                                               │ selected                                                            │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ PageHeader.hasBorder                    │ PageHeader/PageHeader.tsx:48                                         │ showBorder                                                          │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ AnchoredOverlay.displayCloseButton      │ AnchoredOverlay/AnchoredOverlay.tsx:118                              │ hideCloseButton                                                     │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ FilteredActionList.announcementsEnabled │ FilteredActionList/FilteredActionList.tsx:49                         │ disableAnnouncements                                                │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ truncate                                │ TreeView/TreeView.tsx:86, ActionList/Description.tsx:22              │ textOverflow?: 'truncate' | 'wrap'                                  │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ preventOverflow                         │ Overlay/Overlay.tsx:128, AnchoredOverlay/AnchoredOverlay.tsx:102     │ overflowBehavior?: 'prevent' | 'allow'                              │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ sticky                                  │ PageLayout/PageLayout.tsx:538,886,                                   │ scrollPositioning?: 'sticky' | 'static'                             │
│                                         │ SplitPageLayout/SplitPageLayout.tsx:75                               │                                                                     │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ FormControl.Label.requiredIndicator     │ FormControl/FormControlLabel.tsx:12                                  │ requiredIndicator?: 'announced' | 'decorative'                      │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ SelectPanel.showSelectedOptionsFirst    │ SelectPanel/SelectPanel.tsx:113                                      │ selectedOptionsPosition?: 'first' | 'original'                      │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ announceOnShow                          │ live-region/Announce.tsx:17, AriaAlert.tsx:15, AriaStatus.tsx:15     │ initialAnnouncement?: 'announce' | 'skip'                           │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ Spinner.delay accepting boolean         │ Spinner/Spinner.tsx:28                                               │ Remove the boolean; absence means immediate and 'long' replaces     │
│                                         │                                                                      │ true                                                                │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ Timeline.clipSidebar accepting boolean  │ Timeline/Timeline.tsx:7                                              │ Use 'start' | 'end' | 'both'; absence means no clipping             │
├─────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────────────────────────────────────────────────────────────┤
│ DataTable column sortBy accepting       │ DataTable/column.ts:59                                               │ Require an explicit strategy instead of using true for the basic    │
│ boolean                                 │                                                                      │ strategy                                                            │
└─────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────┴─────────────────────────────────────────────────────────────────────┘

The deprecated Dialog contains two additional legacy examples:

•  isOpen  →  open  at  deprecated/DialogV1/Dialog.tsx:36 
•  narrow  and  wide  →  width?: 'narrow' | 'default' | 'wide'  at lines 14–15

Responsive  hidden / showPages , accessibility-specific  visuallyHidden , and binary capabilities such as  disabled ,  loading ,  resizable , and  preventTokenWrapping  fit the documented exceptions.

@joshblack joshblack added skip changeset This change does not need a changelog integration-tests: skipped manually Changes in this PR do not require an integration test labels Aug 5, 2026
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8274 August 5, 2026 17:04 Inactive
@joshblack
joshblack marked this pull request as ready for review August 5, 2026 21:09
@joshblack
joshblack requested a review from a team as a code owner August 5, 2026 21:09
@joshblack
joshblack requested review from liuliu-dev, rickyzhangca and siddharthkp and a lite review from Copilot August 5, 2026 21:09

Copilot AI left a comment

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.

Pull request overview

Updates the repository’s style-guide skill documentation to include dedicated guidance on React component prop naming—especially boolean prop conventions—and links that guidance from the main skill entry.

Changes:

  • Add doctoc as a dev dependency (and update lockfile) to support auto-generated TOCs in docs.
  • Update .github/skills/style-guide/SKILL.md to include a topic table linking to local guidance docs.
  • Add a new component-prop-naming.md document describing boolean prop naming conventions.
Show a summary per file
File Description
package.json Adds doctoc and reorders an ESLint plugin entry in devDependencies.
package-lock.json Lockfile updates reflecting the new doctoc dependency and transitive deps.
.github/skills/style-guide/SKILL.md Adds a topic index table and links to the new prop naming doc.
.github/skills/style-guide/docs/component-prop-naming.md New style-guide document with boolean prop naming conventions and an auto-generated TOC block.

Review details

  • Files reviewed: 3/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread .github/skills/style-guide/docs/component-prop-naming.md Outdated
joshblack and others added 2 commits August 5, 2026 16:15
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: skipped manually Changes in this PR do not require an integration test skip changeset This change does not need a changelog staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants