Skip to content

feat: export pill shape defaults, and shape controls on the pill demos - #40

Merged
dogmar merged 2 commits into
alphafrom
claude/magical-rubin-2kxpdg
Oct 6, 2026
Merged

dogmar merged 2 commits into
alphafrom
claude/magical-rubin-2kxpdg

Conversation

@dogmar

@dogmar dogmar commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Package: @klinking/squircle/pill-worklet now exports PILL_SHAPE_PROPERTIES, each shape setting's custom property name and default (amount, ease, continuity). It is built from the same constants the stylesheet's @property registrations and the worklet's fallbacks use, so they can't disagree.
  • Shared shape controls (website/src/components/PillControls.tsx): continuity, amount and ease, opening on the package's defaults, with a reset back to them. Used by both pill demo pages.
    • Algorithms preview (/demos/pill-algorithms):
      • uses the polyfill where the browser has no paint worklet, and refreshes it as the controls change the pill's inline properties;
      • draws the CAD fillet comparison pill, whose worklet is demo-only, as a clip-path of the same outline in that case.
    • Pill gallery (/demos/pill-gallery): the controls set the shape for every pill on the page, refreshing the polyfill in the modes that use it.
    • On small screens the controls pin to the top of the screen on both pages. The algorithms preview folds the fillet's longer controls behind a toggle there, so the pinned bar leaves room for the pills.
  • Site layout: registers the worklet through a shared loader (website/src/lib/pills.ts). It falls back to the polyfill when paint worklets are missing or the worklet fails to load, so every page using the layout gets real pill shapes in Safari and Firefox too.

Testing

  • vp run ready passes.
  • In Chromium, with paint worklets on and with them disabled:
    • both pages open on amount 2, ease 2, G3;
    • under the polyfill, moving a control redraws the pills;
    • both algorithm pills render identically either way.
  • At a 390px phone viewport: the controls stay pinned at the top of the screen while scrolling, and neither page scrolls sideways. At 1280px the controls sit in the flow.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UezoYT6TNApC4Fvb4pt6Ls

claude added 2 commits October 5, 2026 20:54
…preview

`@klinking/squircle/pill-worklet` now exports `PILL_SHAPE_PROPERTIES`: each
shape setting's custom property and default, from the same constants the
stylesheet and worklet use.

The pill algorithms preview opens on those defaults, so it always matches
the package. Without paint worklets it uses the polyfill, refreshed as the
sliders move, and draws the CAD fillet pill as a clip-path of the same
outline. The site layout falls back to the polyfill too, through a shared
loader in website/src/lib/pills.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UezoYT6TNApC4Fvb4pt6Ls
The gallery gets the same amount, ease and continuity controls as the
algorithms preview, opening on the package's defaults with a reset back
to them. They set the shape for every pill on the page, refreshing the
polyfill where it draws them.

On both pages the controls pin to the top on small screens. The
algorithms preview folds the CAD fillet's controls behind a toggle there,
so the pinned bar leaves room for the pills.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UezoYT6TNApC4Fvb4pt6Ls
@dogmar dogmar changed the title feat: export pill shape defaults and use them in the algorithms preview feat: export pill shape defaults, and shape controls on the pill demos Oct 5, 2026
@dogmar dogmar self-assigned this Oct 6, 2026
@dogmar
dogmar marked this pull request as ready for review October 6, 2026 18:20
@dogmar
dogmar merged commit 2ea9e71 into alpha Oct 6, 2026
4 of 7 checks passed
@dogmar
dogmar deleted the claude/magical-rubin-2kxpdg branch October 6, 2026 19:14
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.11.0-alpha.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

dogmar added a commit that referenced this pull request Oct 6, 2026
## Summary

Release notes used to be PR titles grouped by type. Now each PR carries
a one-paragraph **Release note**, and the notes are built from those:

```md
## [0.11.0](…/compare/v0.10.0...v0.11.0) (2026-10-07)

This release adds pill shapes for Tailwind.          ← the promotion PR's note

### Breaking changes                                  ← always first, whatever the type
- Rename `--a` to `--b`. ([#45](…))

### Features
- New `squircle-pill` utility for Tailwind: … ([#38](…))
```

- **`release/notes.mjs`:** a local semantic-release plugin that replaces
`release-notes-generator`. It reads each PR's note from the PR at
release time, so notes can be fixed after merging. Without a note, it
falls back to the squashed commit's note, then the title. Chores, docs,
CI and the bot's merges are left out.
- **PR check** (`pr-title.yml`, part of the required `check`): `feat`,
`fix`, `perf` and breaking PRs need a note: one paragraph, at most 300
characters, or `None`. Promotions and syncs are exempt.
- **Preview** (`release-notes.yml`): promotion PRs get a comment with
the exact version and notes that `promote` would publish.
- **PR template:** a `## Release note` section with guidance.

## Release note

None

## Test plan

- [x] 23 unit tests (`node --test 'release/*.test.mjs'`, now in CI)
cover note extraction, the check rules, header parsing (which matches
the conventionalcommits preset), rendering and version bumps.
- [x] Dry-ran real semantic-release 25.0.3 with this plugin on a scratch
copy of the repo, with `alpha` merged into `main` the way the bot does
it. It computed 0.11.0 and published these notes.
- [x] Ran the preview against the real repo and PRs: 0.11.0, with #38
and #40 flagged for having no note.
- [x] `vp run ready` passes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants