Repository navigation
Conversation
Add BBBToast, the presentational card for transient notifications: an icon badge matched to `variant`, a title row it shares with the close button, and a content area below, both aligned to the same edge. The card never hides itself. The close button and the `autoClose` timer both call `onRequestClose`, leaving removal to whoever owns the toast stack, so the card can sit inside an external engine without leaving an empty slot behind. `maxHeight` caps it and scrolls its body past that point, since those engines clip their own containers with no scrollbar. The card fills the width of the slot it is given, since engines wrap each toast in a flex container that would otherwise shrink it to its content and leave a stack of mismatched widths, and its body keeps room for the close button's focus ring, which the scroll container would otherwise clip. The `autoClose` countdown pauses while the card is hovered or has focus inside it, and resumes with the time left, so the toast does not vanish under someone reading it or about to press one of its buttons (WCAG 2.2.1, Timing Adjustable). A bar along the bottom of the card counts the delay down and pauses with it, showing how long the toast has left; `hideProgressBar` drops it. `paused` holds both from outside, for engines that pause a whole stack while it is hovered, since the card only sees the pointer over itself. Every badge carries a white glyph. White fails the 3:1 non-text contrast (WCAG 1.4.11) on the palette's success and warning fills (1.97:1 and 2.32:1), so those badges use new darker shades, `colorSuccessDark` and `colorWarningDark` (about 3.6:1), exposed as `--color-success-dark` and `--color-warning-dark` so themes can override them. A dark glyph passes too, but it set those two variants apart from the rest. The card is a live region, which rules out `role="button"` on it, and it holds buttons of its own, so a clickable container would nest interactive elements and swallow their Enter/Space presses. With `onClick`, the click is exposed through a real button wrapping `message` instead: it is announced as a button, reachable with Tab and activated natively, and its focus ring outlines the whole card. `clickAriaLabel` names it when the message does not describe the action, and clicks on interactive elements passed in `message` or `content` stay with those elements. The pointer cursor follows `onClick` by default, with `disablePointer` as an override. The close button takes `closeButtonAriaLabel`, since a hardcoded English name is what screen readers announce in every locale. The live-region attributes stay overridable through the rest props, for engines whose wrapper is already a live region, while the card's own handlers and test id are applied after them. Prop names follow the library rather than react-toastify or BBB's notify(): `variant` as in BBButton and BBBTypography, and `hideCloseButton` as in BBBHint, so opting out of the close button reads the same across components. DOM-driven handlers (`onClick`, `onActionClick`) receive the event, as in BBButton; `onRequestClose` does not, as in BBBHint, since the timer fires it too. `small` keeps its name to match the field already in BBB's notify() and in the plugin SDK. `message` is optional, for cards whose content reads on its own, and typed as a node rather than a string because four call sites pass a `<FormattedMessage>` that cannot be flattened without losing inline markup.
The spinner rotates its whole svg, and the corners of that square sweep past the wrapper as it turns: a 16px spinner reaches about 22.6px across its diagonal. Browsers count the transformed box as scrollable overflow, so a spinner at the edge of a scroll container makes that container show a scrollbar, as in the last row of a BBBToast, whose body scrolls past `maxHeight`. Clip the wrapper to its box. The drawn circle (radius 20 in a 50x50 viewBox, plus half the stroke) stays inside the box at any angle, so only the empty corners of the svg are clipped; a stroke wider than 10 would start to be cut.
chore: sync v0.9.0 from main into develop
fix(BBBSpinner): clip the rotating svg to its box
The release workflow lets conventional-changelog-action regenerate CHANGELOG.md from git history on every release. With its default release-count of 5, releases older than the last five are dropped from the file, and any entry edited by hand is overwritten. Raising release-count only trades this for regenerating an ever-growing history on each release, and still discards manual edits, such as a hand-written changelog for the 0.x initial development phase. Pass the changelog as input-file. The action then generates only the new release and prepends it to the existing content, leaving older entries untouched. Create an empty file when it is missing, since the action reads input-file unconditionally; it is left without a title because anything already in the file ends up below the prepended release.
The release workflow always writes CHANGELOG.md and always infers the version bump from the commits. During initial development (0.x) no changelog is wanted, yet tags and releases should still go through the workflow instead of being made by hand. Inference is also unsafe there: the conventionalcommits preset bumps breaking changes to major even on 0.x, so a single `!` commit in the range would ship 1.0.0. Add a generate_changelog input, off by default, that sets the action's output-file to 'false' when disabled; the action still bumps, commits, tags and runs the lockfile pre-commit hook, it just writes no file. Add a release_type input that forces patch, minor or major through `npm version` plus skip-bump, and reject 'auto' while the version is 0.x. Once 1.0.0 is out, 'auto' works without further changes. Also bump softprops/action-gh-release from v1 to v3, since the v1 runtime is too old for GitHub Actions to run and the "Create GitHub Release" step can't work as is. v3 only moves the runtime to Node 24; the tag_name, body and generate_release_notes inputs used here are unchanged. A separate tag-and-push path built on `npm version` alone was considered and discarded: it would skip the lockfile pre-commit hook and duplicate what the action already does.
The publish workflow runs on every pushed v* tag, so pushing a tag publishes to npm right away, without a deliberate decision to release that version. Tagging and publishing should be independent steps, each triggered by hand. Drop the tag push trigger and keep workflow_dispatch only. Since a manual run can now be started from any ref, fail unless it runs from a tag matching the version in package.json, so a branch or a mismatched tag is never published.
Only main is published to GitHub Pages, so changes merged into develop can't be browsed or reviewed in Storybook until they are released. Trigger the deploy on pushes to develop as well, publishing it into a develop/ subdirectory of gh-pages while main stays at the root: - Before the main deploy, copy the current develop/ from gh-pages into the build output. The main deploy uses keep_files: false, which cleans the whole branch root, so without this copy it would remove develop/. If gh-pages doesn't exist yet (new repository or fork), skip the copy and let the deploy create the branch. - Run the job in a shared concurrency group with queue: max, so main and develop runs, which both push to gh-pages, wait in line instead of rejecting each other's push. With the default single pending slot, a newer pending run would cancel an older one. - Skip the job when it is dispatched manually from any branch other than main or develop, so a feature branch can never overwrite the published root. Deploying develop to a separate branch was considered and discarded: GitHub Pages serves a single site per repository, so another branch would not be published.
ci(storybook): deploy develop to a /develop subpath alongside main
ci: manual, decoupled tagging and npm publishing with append-only changelog
feat(BBBToast): add notification card component
feat(BBBToggle): add fullWidth prop to spread left/right-labelled rows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
No breaking changes. BBBToast is a new feature, so this release bumps the minor version (0.9.0 → 0.10.0).
Features
variant, a title row shared with the close button, and a content area. It never hides itself: the close button and theautoClosetimer callonRequestClose, leaving removal to the toast engine. The countdown pauses on hover/focus or withpaused, and a progress bar shows the time left (hideProgressBarremoves it). Other props:maxHeight(scrolls the body),onClick(exposed through a real button).colorSuccessDarkandcolorWarningDark(--color-success-dark,--color-warning-dark), so white icons on success/warning fills meet the 3:1 contrast ratio.Fixes
CI
package.json.release_type(autois rejected while on 0.x) andgenerate_changelog(off by default). When enabled, the new release is prepended toCHANGELOG.mdinstead of regenerating the file.softprops/action-gh-releasebumped from v1 to v3.developis also deployed, to/develop/, alongsidemainat the root.