Skip to content

feat(genesis): add GnDocsBadge primitive - #463

Draft
johnleider wants to merge 3 commits into
devfrom
feat/gn-docs-badge
Draft

feat(genesis): add GnDocsBadge primitive#463
johnleider wants to merge 3 commits into
devfrom
feat/gn-docs-badge

Conversation

@johnleider

Copy link
Copy Markdown
Member

Description

Adds GnDocsBadge to @paper/genesis — a static label/tag primitive for skill levels, skill modes, category tags, and similar docs-site chrome. Genesis Phase 2 roadmap item (pulled ahead of Callout/CodeGroup since it pays down proven duplication in apps/docs).

API: color (any CSS color; drives a color-mix background+text tint), backgroundOpacity (0–100, default 15), shape (rounded | pill), title. Label via default slot; optional leading icon via icon slot (no default) — the wrapper is aria-hidden and slotted icons keep their own dimensions.

Notes

  • Shape variant styles via data-shape per the genesis data-attribute idiom.
  • Visual parity with the docs badge-base shortcut (font-weight 600, line-height 1rem, gap/padding/radius identical).
  • .genesis-docs-badge__icon:empty guards passed-but-empty icon templates.
  • Second commit syncs SPEC.md with the shipped GnDocsExample surface (theme/showPlayground/showBin props, playground/bin icon slots, per-example theme override marked shipped, token-table gaps).

The apps/docs migration (SkillLevelBadge/SkillModeBadge/SkillCategoryTags → GnDocsBadge, then deleting the local DocsBadge) lands as a follow-up PR.

@johnleider johnleider added this to the v1.0.0 milestone Jul 2, 2026
@johnleider johnleider added documentation Improvements or additions to documentation enhancement New feature or request paper Paper layer (unstyled component bridge) labels Jul 2, 2026
@johnleider johnleider self-assigned this Jul 2, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: 9a84f2a

@johnleider johnleider removed this from the v1.0.0 milestone Jul 2, 2026
@johnleider
johnleider changed the base branch from master to dev July 23, 2026 14:18
johnleider added a commit that referenced this pull request Jul 28, 2026
Follow-up corrections to the contract text:

- DESIGN_SYSTEMS.md no longer claims Genesis "declares no class" — the SPEC
  now declares `Class: kit`. The `<style scoped>` deviation note is accurate
  (9 of 10 components) and is kept.
- Document `--v0-on-background` in the consumed-token table. It is the only
  bare `var()` in Genesis (GnDotGrid's `color` default), so an unaliased host
  renders no grid at all; the Token bridge list now names it too.
- Rewrap the GnActionButton paragraph — the previous wrap put `+ Button.Icon`
  at line start, which CommonMark parses as a bullet marker and split the
  sentence into a stray list item.
- Add GnDocsExample's `toggle-icon` slot to the icon-strategy table.
- #593 and #463 are open against packages/genesis, not apps/docs.
- Qualify "no Genesis-specific stylesheet" as no *theme* stylesheet; the build
  still emits dist/style.css for published consumers.
johnleider added a commit that referenced this pull request Jul 30, 2026
* docs(genesis): lock Emerald docs path decisions into SPEC

Sync Genesis SPEC with the shipped surface (theme override, playground/bin
toolbar hooks, GnActionButton/GnDotGrid/GnPeek), mark Phase 2 items as
rewrites-not-extractions with a no-virtual:* acceptance rule, add Phase 3
DS-specific docs primitives, and record the kit interop token bridge in
DESIGN_SYSTEMS.md so Emerald (and later DSs) publish --v0-* aliases for
Genesis chrome.

* docs(genesis): correct token, slot and issue-reference drift in SPEC

Follow-up corrections to the contract text:

- DESIGN_SYSTEMS.md no longer claims Genesis "declares no class" — the SPEC
  now declares `Class: kit`. The `<style scoped>` deviation note is accurate
  (9 of 10 components) and is kept.
- Document `--v0-on-background` in the consumed-token table. It is the only
  bare `var()` in Genesis (GnDotGrid's `color` default), so an unaliased host
  renders no grid at all; the Token bridge list now names it too.
- Rewrap the GnActionButton paragraph — the previous wrap put `+ Button.Icon`
  at line start, which CommonMark parses as a bullet marker and split the
  sentence into a stray list item.
- Add GnDocsExample's `toggle-icon` slot to the icon-strategy table.
- #593 and #463 are open against packages/genesis, not apps/docs.
- Qualify "no Genesis-specific stylesheet" as no *theme* stylesheet; the build
  still emits dist/style.css for published consumers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request paper Paper layer (unstyled component bridge)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant