Skip to content

Let the Card Builder add the stars button for a package under 40 stars - #351

Merged
nstarman merged 2 commits into
mainfrom
add/builder-stars-under-threshold
Oct 6, 2026
Merged

nstarman merged 2 commits into
mainfrom
add/builder-stars-under-threshold

Conversation

@nstarman

@nstarman nstarman commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Changing code or schema

What and why: #345 stops showing the stars button for a package with fewer than 40 stars (STARS_MIN). That should be a default, not a wall: the Card Builder should be able to add it anyway.

  • Under STARS_MIN the stars link is optional: a card's own buttons (buttons:all) leave it out, but a name that lists it shows it — buttons:code,docs,stars. Nothing new in the grammar; naming a button asks for it.
  • The embed page (what the builder previews and exports) renders every link a card could show, stars included — hidden under all, as the other parts are — so the name chooses. The site's own cards are unchanged (they never name it).
  • Card Builder: the stars of a package under 40 are a pill of their own, unticked, titled "38 stars: not on a card of its own accord — tick it to show it". Ticking it writes buttons:code,docs,stars; unticking goes back to buttons:all. For a package with enough stars nothing changes.
  • it.links entries gain a fourth element, optional; ownKeys(it) is the keys all means, and controlOps, fitName and linksOf use it where they compared with every key.
  • The recording of Chrome's layout is stamped again (Card.astro changed); the layouts in it are identical.

Checked in a browser on /tools/card/ with coordinax (38 stars): pill unticked and no star in the preview; ticked, the star appears and the name is …buttons:code,docs,stars; unticked, back to all. unxt (70) is as before.

Screenshots

coordinax has 38 stars. In the Card Builder its stars pill starts unticked, and the card has no star button:

unticked

Ticked, the card shows it and the name lists it (buttons:code,docs,stars):

ticked

  • npm run test:schema passes; 691 unit tests (new: optional links and cardFace, the builder's pill, controls and round trips) and the build pass

🤖 Generated with Claude Code

@github-actions github-actions Bot added this to the ♾️&➡ milestone Oct 6, 2026
nstarman added a commit that referenced this pull request Oct 6, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Preview: https://44cd900e.nstarkman-space.pages.dev

Built from 93048e840563c6e7af3a8fb38e61d7491cc6b3fe, including the four CV PDFs.
Updated on every push to this pull request.

@nstarman
nstarman force-pushed the add/builder-stars-under-threshold branch 6 times, most recently from d8dd9e3 to e97f2ca Compare October 6, 2026 21:17
Base automatically changed from add/software-card-svgs to main October 6, 2026 21:20
nstarman and others added 2 commits October 6, 2026 17:23
Under STARS_MIN the stars link is optional: a card's own buttons (all) leave
it out, but a name that lists it shows it, and the Card Builder offers it as an
unticked pill. The embed page renders every link a card could show (stars
included, hidden under all), as it does for the rest, so the name chooses.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@nstarman
nstarman force-pushed the add/builder-stars-under-threshold branch from e97f2ca to 93048e8 Compare October 6, 2026 21:24
@nstarman
nstarman merged commit 8cbca02 into main Oct 6, 2026
6 of 7 checks passed
@nstarman
nstarman deleted the add/builder-stars-under-threshold branch October 6, 2026 21:28
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.

1 participant