Skip to content

fix (core/tab-item): show ellipsed text for layout=stretched (Ix-68) - #2680

Open
JonaMaiss wants to merge 1 commit into
mainfrom
fix/tab-overflow-layout-streched
Open

fix (core/tab-item): show ellipsed text for layout=stretched (Ix-68)#2680
JonaMaiss wants to merge 1 commit into
mainfrom
fix/tab-overflow-layout-streched

Conversation

@JonaMaiss

@JonaMaiss JonaMaiss commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

💡 What is the current behavior?

Setting layout=stretched for ix-tabs does not ellipse the text correctly if it has to little space.
https://siemens.ghe.com/foundation/ix-design-system/issues/68

GitHub Issue Number: #68

🆕 What is the new behavior?

Text ellipses now correctly when space is not enough and property layout=stretched is set.

🏁 Checklist

A pull request can only be merged if all of these conditions are met (where applicable):

  • 🦮 Accessibility (a11y) features were implemented
  • 🗺️ Internationalization (i18n) - no hard coded strings
  • 📲 Responsiveness - components handle viewport changes and content overflow gracefully
  • 📕 Add or update a Storybook story
  • 📄 Documentation was reviewed/updated siemens/ix-docs
  • 🧪 Unit tests were added/updated and pass (pnpm test)
  • 📸 Visual regression tests were added/updated and pass (Guide)
  • 🧐 Static code analysis passes (pnpm lint)
  • 🏗️ Successful compilation (pnpm build, changes pushed)

👨‍💻 Help & support

Summary by CodeRabbit

  • Bug Fixes
    • Improved stretched tab items so long text is constrained and displays with an ellipsis instead of overflowing.

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8615203

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@netlify

netlify Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploy Preview for ix-storybook ready!

Name Link
🔨 Latest commit 8615203
🔍 Latest deploy log https://app.netlify.com/projects/ix-storybook/deploys/6a69bcc87dee4d0008eebfb8
😎 Deploy Preview https://deploy-preview-2680--ix-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The stretched tab item styling now constrains nested div elements to the host width and applies ellipsis text truncation.

Changes

Tab item styling

Layer / File(s) Summary
Nested stretched content truncation
packages/core/src/components/tab-item/tab-item.scss
Nested div elements within stretched tab items now use max-width: 100% and the text-truncation.ellipsis mixin.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: danielleroux

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing tab-item text truncation for stretched layout.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/tab-overflow-layout-streched

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/core/src/components/tab-item/tab-item.scss`:
- Around line 118-122: Add a changeset for the user-facing styling fix in the
affected core package, describing the tab text truncation behavior and selecting
the appropriate release bump; do not treat this change as internal-only.
- Around line 118-122: Add regression coverage for the ellipsis behavior
introduced in the tab-item styling by extending the tabs component tests near
the existing stretched-class case. Render an oversized label, constrain the
relevant element, and assert that its rendered truncation behavior is applied
rather than only checking the stretched class; also add the required axe-based
accessibility assertion for the component test.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8abede4c-95ac-49d4-8959-4473e76fc08a

📥 Commits

Reviewing files that changed from the base of the PR and between 60d38b5 and 8615203.

📒 Files selected for processing (1)
  • packages/core/src/components/tab-item/tab-item.scss

Comment on lines +118 to +122

div {
max-width: 100%;
@include text-truncation.ellipsis;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Add a changeset for this user-facing styling fix.

This changes visible tab behavior and addresses a user-impacting bug. Add a changeset scoped to the affected core package, or explicitly justify why the change is internal-only.

As per path instructions, changesets are required for “styling/theming changes” and “bug fixes with user impact.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/core/src/components/tab-item/tab-item.scss` around lines 118 - 122,
Add a changeset for the user-facing styling fix in the affected core package,
describing the tab text truncation behavior and selecting the appropriate
release bump; do not treat this change as internal-only.

Source: Path instructions


🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add regression coverage for actual truncation.

The supplied test at packages/core/src/components/tabs/test/tabs.ct.ts:339-369 only verifies that the stretched class is applied; it would pass even if ellipsis styling regressed. Add a component test with an oversized label that verifies the constrained element truncates, plus the required axe-based coverage.

As per path instructions, packages/core/** requires accessibility coverage with axe-based component tests where behavior/UI changed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/core/src/components/tab-item/tab-item.scss` around lines 118 - 122,
Add regression coverage for the ellipsis behavior introduced in the tab-item
styling by extending the tabs component tests near the existing stretched-class
case. Render an oversized label, constrain the relevant element, and assert that
its rendered truncation behavior is applied rather than only checking the
stretched class; also add the required axe-based accessibility assertion for the
component test.

Source: Path instructions

@flxlst09

Copy link
Copy Markdown
Collaborator

EIX-68

@@ -115,6 +115,11 @@
flex-basis: 100%;
width: 100%;
@include text-truncation.ellipsis;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ellipsis truncation on the host can be removed i think

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.

3 participants