Skip to content

Conversation

@sun-mota
Copy link
Member

@sun-mota sun-mota commented Sep 22, 2025

Alaska Airlines Pull Request

Issue

Accordion's ellipsis did not work because it was feeding multiple slots to a auro-button and those were filing in a flexbox. Although the flexbox had the ellipsis style set, due to the nature of flexbox, those ellipsis style does not get applied to children nodes.

Solution

Accordion passes the slot with the proper ellipsis style set.

Before

image

After

image

closes #192

Checklist:

  • My update follows the CONTRIBUTING guidelines of this project
  • I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.

Thank you for your submission!

-- Auro Design System Team

Summary by Sourcery

Implement text truncation and ellipsis for emphasis accordion triggers and add fluid width support

Bug Fixes:

  • Fix trigger text truncation on emphasis accordion by wrapping the slot in a container with overflow settings

Enhancements:

  • Add CSS overflow, whitespace, and text-overflow styles to truncate long trigger text with ellipsis
  • Introduce [fluid] attribute styling to limit trigger slot width to 100% minus borders

@sun-mota sun-mota self-assigned this Sep 22, 2025
@sun-mota sun-mota requested a review from a team as a code owner September 22, 2025 18:08
@sourcery-ai
Copy link

sourcery-ai bot commented Sep 22, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR enables truncation for emphasis accordion trigger text by wrapping the trigger slot in a container and adding corresponding SCSS rules to enforce a fluid max-width and ellipsis overflow.

File-Level Changes

Change Details Files
Enhance trigger container styling for fluid layout and text truncation
  • Added [fluid] selector with max-width: calc(100% - 3px) to account for borders
  • Introduced host(:not([chevron=none])) rule to apply overflow: hidden, white-space: nowrap, text-overflow: ellipsis on .triggerText
src/styles/style.scss
Wrap trigger slot within a truncation-enabled container
  • Replaced direct with
    wrapper around the slot
src/auro-accordion.js

Assessment against linked issues

Issue Objective Addressed Explanation
#192 Ensure that the accordion trigger text is truncated with an ellipsis when it overflows.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions
Copy link

github-actions bot commented Sep 22, 2025

Surge demo deployment failed! 😭

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@sun-mota sun-mota force-pushed the sunMota/fix/ellipsis-trigger-text branch from 23610dc to 060178e Compare September 22, 2025 18:10
@jyang81
Copy link
Contributor

jyang81 commented Sep 22, 2025

Does this need to be applied overall, and not just on emphasis? I'm not seeing truncation happening anywhere else:
image
image
image

@sun-mota sun-mota force-pushed the sunMota/fix/ellipsis-trigger-text branch from 060178e to 6bfc411 Compare September 22, 2025 19:13
@sun-mota
Copy link
Member Author

Does this need to be applied overall, and not just on emphasis? I'm not seeing truncation happening anywhere else: image image image

Currently, only emphasis accordion has fluid set on trigger, non-emphasis accordion will have auto width button

@rmenner rmenner mentioned this pull request Sep 23, 2025
@rmenner rmenner changed the base branch from main to rc/195 September 23, 2025 17:31
@rmenner rmenner merged commit a00ef37 into rc/195 Sep 23, 2025
6 of 7 checks passed
@rmenner rmenner deleted the sunMota/fix/ellipsis-trigger-text branch September 23, 2025 17:32
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.

accordion trigger text does not ellipsis

6 participants