Skip to content

Merge develop into main - #111

Merged
Arthurk12 merged 13 commits into
mainfrom
develop
Oct 26, 2026
Merged

Arthurk12 merged 13 commits into
mainfrom
develop

Conversation

@Arthurk12

@Arthurk12 Arthurk12 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

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

  • BBBToast: new notification card component. It has an icon badge per variant, a title row shared with the close button, and a content area. It never hides itself: the close button and the autoClose timer call onRequestClose, leaving removal to the toast engine. The countdown pauses on hover/focus or with paused, and a progress bar shows the time left (hideProgressBar removes it). Other props: maxHeight (scrolls the body), onClick (exposed through a real button).
  • Palette: add colorSuccessDark and colorWarningDark (--color-success-dark, --color-warning-dark), so white icons on success/warning fills meet the 3:1 contrast ratio.
  • *BBButton: add fullWidth prop to spread left/right-labelled rows

Fixes

  • BBBSpinner: clip the rotating svg to its box, so a spinner at the edge of a scroll container no longer makes it show a scrollbar.

CI

  • Releases: Tag & Release and Publish to NPM are now manual and independent; pushing a tag no longer publishes to npm. Publishing only runs from a tag matching package.json.
  • Release inputs: Tag & Release gains release_type (auto is rejected while on 0.x) and generate_changelog (off by default). When enabled, the new release is prepended to CHANGELOG.md instead of regenerating the file.
  • GitHub Release step: softprops/action-gh-release bumped from v1 to v3.
  • Storybook: develop is also deployed, to /develop/, alongside main at the root.

Arthurk12 and others added 13 commits October 6, 2026 21:13
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
@Arthurk12
Arthurk12 merged commit 71a130b into main Oct 26, 2026
3 checks passed
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.

2 participants