Skip to content

[WEB-8162] feat(pill): outline/soft emphasis, loading spinner placement, truncate title#231

Open
codingwolf-at wants to merge 5 commits into
mainfrom
WEB-8162/pill-design-docs
Open

[WEB-8162] feat(pill): outline/soft emphasis, loading spinner placement, truncate title#231
codingwolf-at wants to merge 5 commits into
mainfrom
WEB-8162/pill-design-docs

Conversation

@codingwolf-at

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

Copy link
Copy Markdown
Contributor

Description

  • Add emphasis on PillButton (outline ≈ secondary, soft ≈ tertiary); components default to outline
  • Move loading spinner after the label (Figma); hide start/end icons while busy
  • Auto-set native title on PillLabel for string children so truncated labels recover on hover
  • Expand elements + components stories (states, soft, Switch, TruncatedLabel, loading a11y plays)

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)

Screenshot 2026-07-15 at 6 46 49 PM Screenshot 2026-07-15 at 6 47 06 PM Screenshot 2026-07-15 at 6 47 24 PM

Test Scenarios

  • Storybook: Elements/Pill + Components/Pill — outline & soft states, Switch pressed/disabled, IconPill loading
  • Truncated labels show ellipsis; hover shows full text via title
  • Loading PillButton/IconPill: spinner after label, aria-busy + focusable, clicks blocked
  • vp check on pill packages; Pill story tests pass

Figma URL

- Introduced a new `TruncatedLabel` story demonstrating the behavior of labels exceeding the 120px cap, which now truncate with an ellipsis.
- Updated `PillLabel` to automatically set a native `title` attribute for string children, allowing full text recovery on hover.
- Enhanced documentation to clarify the new functionality and ensure consistent user experience across pill components.
@github-actions

Copy link
Copy Markdown

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

- Introduced temporary debug stories for `PillSwitch`, `PillButton`, and `IconPill` to facilitate visual QA, showcasing various states (Default, Hover, Active, Disabled, Loading) across different magnitudes.
- Added a `plusIcon` helper function for consistent icon rendering in the debug stories.
- Updated the `TruncatedLabel` story to reflect a simplified label for better clarity.
- Marked debug stories with tags to exclude them from autodocs and manifest generation, ensuring they remain for testing purposes only.
- Added `emphasis` prop to `PillButton`, allowing for `outline` and `soft` styles, enhancing visual differentiation.
- Updated `PillButton` stories to demonstrate both emphasis treatments across various states, ensuring comprehensive visual QA.
- Modified existing stories to include emphasis in their configurations, improving consistency and clarity in the component's usage.
- Adjusted documentation to reflect the new emphasis feature and its implications for styling and behavior.
…nality

- Updated `PillButton`, `PillSwitch`, and `IconPill` components to enhance their descriptions and ensure consistency in usage.
- Reorganized stories to demonstrate new emphasis styles (`outline` and `soft`) and various states (Default, Hover, Active, Disabled, Loading) for better visual QA.
- Improved accessibility features by ensuring `aria-busy` and `aria-disabled` attributes are correctly applied during loading states.
- Enhanced documentation to reflect changes and clarify component behavior, ensuring a consistent user experience across the Pill components.
@codingwolf-at codingwolf-at changed the title Add TruncatedLabel story and enhance PillLabel for ellipsis support [WIP] [WEB-8162] feat(pill): outline/soft emphasis, loading spinner placement, truncate title Jul 15, 2026
@makeplane

makeplane Bot commented Jul 15, 2026

Copy link
Copy Markdown

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figma caps PillButton at 150px, while PillSwitch is capped at 120px. Sharing max-w-[120px] constrains PillButton too early—could we keep 120px for PillSwitch and give PillButton its specified 150px cap?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

…ion handling

- Clarified documentation for label truncation behavior in `TruncatedLabel` stories, specifying width caps for `PillButton` (150px) and `PillSwitch` (120px).
- Adjusted `labelPillBase` to remove width cap definitions, ensuring they are set directly in the respective container variants.
- Enhanced `pillButtonVariants` and `pillSwitchVariants` to include maximum width settings, aligning with design specifications for better visual consistency.
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