Skip to content

[WEB-8150] feat(banner): dedicated dismiss slot, per-placement title weight, and icon-sizing fixes#226

Open
codingwolf-at wants to merge 5 commits into
mainfrom
fix/banner-design-docs
Open

[WEB-8150] feat(banner): dedicated dismiss slot, per-placement title weight, and icon-sizing fixes#226
codingwolf-at wants to merge 5 commits into
mainfrom
fix/banner-design-docs

Conversation

@codingwolf-at

@codingwolf-at codingwolf-at commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Finalizes the Banner component for the design system. Adds a first-class dismiss
control, makes the title's weight placement-aware, corrects the leading-icon sizing to
match Figma, and simplifies/expands the Storybook coverage.

What changed

Component API (components/banner)

  • New onDismiss?: () => void prop. Renders the dedicated "Close" control Figma models
    as its own always-last anatomy node — a ghost, icon-only IconButton (magnitude="sm",
    aria-label="Dismiss") fixed at the trailing edge, after any actions. Consumers own
    visibility; the handler fires on click, the banner does not self-hide.
  • actions is now CTA-only. Docs clarify the Figma cap of three CTAs
    (primary/secondary/tertiary) and note that the non-wrapping actions group assumes a wide
    viewport (see Known limitations).
  • Simplified icon rendering. Resolve the icon once (undefined → tone default,
    null → hidden, node → custom) so a single BannerIcon wrapper renders it — no nested
    ternary/duplicated wrapper.

Elements & tokens (elements/banner)

  • BannerTitle gains a placement prop (+ BannerTitleVariantProps): title weight is
    now per-placement (page medium / inline regular) via its own composite text token instead
    of inheriting from the body column.
  • Leading-icon sizing corrected: page icon is 16×16 with 2px y-padding (hugs to 16×20
    per Figma), replacing the previous 20px node size.
  • bannerDescriptionVariants documented as an intentional empty cva (no Figma design
    uses a description yet; it inherits body styling and stays as a named part for future use).

Stories

  • Dismiss stories (Dismissible, WithActions, DismissibleInteraction) migrated to
    onDismiss; DismissibleInteraction play test asserts the handler fires.
  • Tones now shows both inline and page placements (their neutral surfaces differ).
  • Layout cleanup: shared w-180 column decorator hoisted to meta, per-story wrappers
    reduced to fragments, gap unified.
  • Elements Anatomy dismiss aligned to magnitude="sm".

Testing

  • vp check — clean (format, lint, types).
  • Banner story tests — 11/11 pass (both tiers).

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

NA

References

NA

- Modified the `BannerTitle` component to accept a `placement` prop, allowing for dynamic styling based on its position within the banner.
- Adjusted related stories to utilize the new `placement` prop, ensuring consistent rendering across different banner configurations.
- Changed the `magnitude` prop of `IconButton` in banner stories from "md" to "sm" for a more compact appearance.
- Enhanced the `bannerTitleVariants` to define styles based on the `placement`, improving visual consistency.
@github-actions

Copy link
Copy Markdown

📚 Storybook preview: https://pr-226-propel-storybook.vamsi-906.workers.dev

- Added a decorator to the Banner stories to standardize the layout with consistent spacing.
- Replaced div wrappers with fragments in multiple story render functions to simplify the structure.
- Ensured that the visual presentation of the Banner component remains consistent across different story variations.
…ability

- Introduced an `onDismiss` prop to the Banner component, allowing for a dedicated dismiss control instead of appending a dismiss button to actions.
- Updated stories to utilize the new `onDismiss` functionality, enhancing the clarity of the dismiss action.
- Adjusted documentation to reflect the changes in dismiss control structure, ensuring consistency with Figma design specifications.
…iations

- Updated the `Tones` story to display banner tones side by side for both `inline` and `page` placements, improving visual clarity.
- Enhanced documentation to clarify the layout differences between the two placements, ensuring better understanding of component behavior.
- Adjusted the `BannerProps` documentation to include layout considerations for the actions group, emphasizing the importance of viewport width in design.
…umentation

- Refactored the Banner component to streamline icon rendering logic, allowing for a single `BannerIcon` wrapper to handle default and custom icons.
- Updated the `IconButton` in stories to use a smaller magnitude for a more compact appearance.
- Enhanced comments in `variants.ts` to clarify the purpose and styling of the banner's description block, ensuring better alignment with potential design needs.
@codingwolf-at codingwolf-at changed the title refactor(banner): update BannerTitle component to accept placement prop [WIP] [WEB-8150] feat(banner): dedicated dismiss slot, per-placement title weight, and icon-sizing fixes Jul 13, 2026
@makeplane

makeplane Bot commented Jul 13, 2026

Copy link
Copy Markdown

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

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