Add size prop naming guidelines - #8291
Conversation
Closes github/primer#6732 This PR updates our component prop naming guidance with the canonical size prop conventions from the API audit. ### Changelog #### New - Add guidance for named and numeric size props. #### Changed - Document small, medium, and large as our standard named scale, with medium as the default. #### Removed - None. ### Rollout strategy - [ ] Patch release - [ ] Minor release - [ ] Major release; if selected, include a written rollout or migration plan - [x] None; this updates internal skill documentation and has no public-facing impact. ### Testing & Reviewing Review the guidance against the component size audit in github/primer#6732. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 340f1c08-6adb-4055-a220-52a750204d3b
|
|
There was a problem hiding this comment.
Pull request overview
This PR updates the internal style-guide documentation for component prop naming by adding canonical guidance for when and how to use a size prop, aligning with the API audit conventions.
Changes:
- Adds a new section recommending
size(notvariant) for visual scale. - Defines the standard named size scale (
small/medium/large, defaulting tomedium) and when to extend toxsmall/xlarge. - Documents when numeric sizes are appropriate (e.g., avatars/icons needing precise dimensions).
Show a summary per file
| File | Description |
|---|---|
| .github/skills/style-guide/docs/component-prop-naming.md | Adds size prop naming conventions, including named scale guidance and numeric-size guidance. |
Review details
Tip
Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
e38c930 to
4471a3d
Compare
4471a3d to
e38c930
Compare
Part of github/primer#6732
This PR updates our component prop naming guidance with the canonical size prop conventions from the API audit.
Changelog
New
Changed
Removed
Rollout strategy