Skip to content

fix(core/content-header): Fix responsive content-header behavior - #2702

Open
dmytro-halimov wants to merge 3 commits into
mainfrom
fix/content-header-responsive-fix
Open

fix(core/content-header): Fix responsive content-header behavior#2702
dmytro-halimov wants to merge 3 commits into
mainfrom
fix/content-header-responsive-fix

Conversation

@dmytro-halimov

@dmytro-halimov dmytro-halimov commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Docs PR: siemens/ix-docs#273

💡 What is the current behavior?

The title and subtitle of content-header component are truncated/ellipsized by default. This differs from the expected Figma behavior and makes the responsive behavior unclear.

🆕 What is the new behavior?

  • Content header titles and subtitles wrap onto multiple lines by default at narrow viewport widths.
  • Truncation/ellipsization is available as an explicit option via new prop 'textOverflow'.

🏁 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

New Features

  • Added responsive wrapping for content-header titles and subtitles, including long-text handling.
  • Added textOverflow="truncate" with native tooltips showing complete text.
  • Available across Angular, React, Vue, and HTML integrations.
  • Added examples featuring truncated headers, navigation, subtitles, and action buttons.

Bug Fixes

  • Improved content-header alignment, sizing, and overflow behavior across screen sizes.

Tests

  • Added accessibility, visual, interaction, and regression coverage for wrapping and truncation scenarios.

@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for ix-storybook ready!

Name Link
🔨 Latest commit f5f7a05
🔍 Latest deploy log https://app.netlify.com/projects/ix-storybook/deploys/6a75b53439cf8b0008649786
😎 Deploy Preview https://deploy-preview-2702--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.

@changeset-bot

changeset-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f5f7a05

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@siemens/ix Minor
@siemens/ix-angular Minor
@siemens/ix-react Minor
@siemens/ix-vue Minor
@siemens/ix-docs Minor

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 022cac45-49c3-4bf9-b491-54f5abe8214e

📥 Commits

Reviewing files that changed from the base of the PR and between 7e69f2e and f5f7a05.

⛔ Files ignored due to path filters (4)
  • testing/visual-testing/__screenshots__/tests/content-header/content-header.e2e.ts/content-header-basic-1-chromium---classic-dark-linux.png is excluded by !**/*.png
  • testing/visual-testing/__screenshots__/tests/content-header/content-header.e2e.ts/content-header-basic-1-chromium---classic-light-linux.png is excluded by !**/*.png
  • testing/visual-testing/__screenshots__/tests/content-header/content-header.e2e.ts/content-header-secondary-1-chromium---classic-dark-linux.png is excluded by !**/*.png
  • testing/visual-testing/__screenshots__/tests/content-header/content-header.e2e.ts/content-header-secondary-1-chromium---classic-light-linux.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • testing/visual-testing/tests/content-header/basic/index.html

📝 Walkthrough

Walkthrough

Changes

The content header now wraps title and subtitle text by default. It supports optional single-line truncation with native tooltips. Public typings, Angular bindings, framework previews, tests, visual fixtures, and release metadata were updated.

Content header text behavior

Layer / File(s) Summary
Overflow contract and rendering
packages/core/src/components/content-header/*, packages/core/src/components.d.ts, packages/angular/src/components.ts, .changeset/*
Added the ContentHeaderTextOverflow type and textOverflow property. Updated rendering and styles for wrapping and truncation.
Overflow behavior validation
packages/core/src/components/content-header/test/*, testing/framework-tests/*, testing/visual-testing/*
Added coverage for wrapping, truncation, tooltips, alignment, runtime switching, accessibility, and visual states.
Framework preview integrations
packages/*-test-app/src/preview-examples/*, packages/*-test-app/src/app/*, packages/react-test-app/src/main.tsx, packages/vue-test-app/src/Root.vue
Added truncation previews and routes for Angular, standalone Angular, HTML, React, and Vue. Updated existing preview text.

Estimated code review effort: 3 (Moderate) | ~25 minutes

🚥 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 and concisely describes the main change: fixing responsive behavior in the core content-header component.
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/content-header-responsive-fix

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.

@dmytro-halimov
dmytro-halimov force-pushed the fix/content-header-responsive-fix branch from fe458fa to 7e69f2e Compare August 6, 2026 07:57
@dmytro-halimov
dmytro-halimov marked this pull request as ready for review August 6, 2026 08:06

@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: 1

🤖 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 `@testing/visual-testing/tests/content-header/basic/index.html`:
- Around line 17-21: Replace the hard-coded 2rem gap in the body rule with the
existing spacing design token or CSS custom property used by the theme. Keep the
grid layout and width unchanged, and reuse the established token rather than
introducing a new one.
🪄 Autofix

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: 6a5a8dd1-2b53-4ce1-8a56-f2e90f80b31e

📥 Commits

Reviewing files that changed from the base of the PR and between aea81f5 and 7e69f2e.

⛔ Files ignored due to path filters (8)
  • packages/angular/standalone/src/components.ts is excluded by !packages/angular/standalone/src/components.ts
  • packages/react/src/components/components.server.ts is excluded by !packages/react/src/components/**
  • packages/vue/src/components/ix-content-header.ts is excluded by !packages/vue/src/components/**
  • testing/framework-tests/tests/generated/axe.ts is excluded by !**/generated/**
  • testing/framework-tests/tests/generated/content-header-truncate-axe.spec.ts is excluded by !**/generated/**
  • testing/framework-tests/tests/generated/content-header-truncate.spec.ts is excluded by !**/generated/**
  • testing/framework-tests/tests/generated/index.ts is excluded by !**/generated/**
  • testing/framework-tests/tests/generated/test-ids.autogenerated.ts is excluded by !**/generated/**
📒 Files selected for processing (29)
  • .changeset/content-header-responsive-text.md
  • packages/angular-standalone-test-app/src/app/app.routes.ts
  • packages/angular-standalone-test-app/src/preview-examples/content-header-truncate.html
  • packages/angular-standalone-test-app/src/preview-examples/content-header-truncate.ts
  • packages/angular-standalone-test-app/src/preview-examples/content-header.html
  • packages/angular-test-app/src/app/app-routing.module.ts
  • packages/angular-test-app/src/app/app.module.ts
  • packages/angular-test-app/src/preview-examples/content-header-truncate.html
  • packages/angular-test-app/src/preview-examples/content-header-truncate.ts
  • packages/angular-test-app/src/preview-examples/content-header.html
  • packages/angular/src/components.ts
  • packages/core/src/components.d.ts
  • packages/core/src/components/content-header/content-header.scss
  • packages/core/src/components/content-header/content-header.tsx
  • packages/core/src/components/content-header/content-header.types.ts
  • packages/core/src/components/content-header/test/content-header.ct.ts
  • packages/html-test-app/src/preview-examples/content-header-truncate.html
  • packages/html-test-app/src/preview-examples/content-header.html
  • packages/react-test-app/src/main.tsx
  • packages/react-test-app/src/preview-examples/content-header-truncate.tsx
  • packages/react-test-app/src/preview-examples/content-header.tsx
  • packages/vue-test-app/src/Root.vue
  • packages/vue-test-app/src/preview-examples/content-header-truncate.vue
  • packages/vue-test-app/src/preview-examples/content-header.vue
  • testing/framework-tests/__snapshots__/content-header-aria-snapshot.yaml
  • testing/framework-tests/__snapshots__/content-header-truncate-aria-snapshot.yaml
  • testing/framework-tests/tests/working-with-axe.spec.ts
  • testing/framework-tests/tests/working.spec.ts
  • testing/visual-testing/tests/content-header/basic/index.html

Comment thread testing/visual-testing/tests/content-header/basic/index.html
@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

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