Skip to content

fix(content-header): allow button label text to wrap on long text and…#2582

Open
SaiYugandhar03 wants to merge 12 commits into
siemens:mainfrom
SaiYugandhar03:Content-Header-Buttons-Wrap-into-Overflow-Menu
Open

fix(content-header): allow button label text to wrap on long text and…#2582
SaiYugandhar03 wants to merge 12 commits into
siemens:mainfrom
SaiYugandhar03:Content-Header-Buttons-Wrap-into-Overflow-Menu

Conversation

@SaiYugandhar03

@SaiYugandhar03 SaiYugandhar03 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

… small viewports

💡 What is the current behavior?

  1. The content-header component does not wrap button text when the labels are long or when there is limited available width.
  2. Long content titles are currently truncated with an ellipsis on narrow widths instead of wrapping to the next line as shown in Figma.

GitHub Issue Number: #2125

🆕 What is the new behavior?

  1. button labels in the content-header wrap onto multiple lines when space is limited or the text is long. The existing responsive behavior remains unchanged: important actions and secondary actions retain their positions across LG, MD, and SM viewports, with secondary actions moving to the overflow menu on smaller screens.
  2. Long content titles currently wrap to the next line on narrow widths instead of being truncated with an ellipsis, as shown in Figma.

🏁 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
    • ix-content-header now detects secondary actions and displays them responsively: on small screens, they move into an overflow “more” menu.
  • Style
    • Header titles now wrap instead of ellipsizing.
    • Secondary action buttons support multi-line content with improved overflow/height/truncation behavior (including slot-specific styling).
  • Examples & Visual Tests
    • Updated Angular/HTML/React/Vue previews and visual-test fixtures so action buttons explicitly target the secondary-actions slot.
    • Added/updated an extra primary “Important” action in examples and tests.

@changeset-bot

changeset-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 971380b

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 Jun 2, 2026

Copy link
Copy Markdown

Deploy Preview for ix-storybook ready!

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a responsive secondary-actions slot to the ix-content-header component, allowing secondary action buttons to collapse into an overflow dropdown menu on smaller viewports. It also updates various preview examples and test files to utilize this slot, and introduces customizable CSS variables to the button mixin for more flexible styling. Feedback on these changes highlights a potential ReferenceError during Server-Side Rendering (SSR) due to direct window access, and suggests handling component re-attachment lifecycle events more robustly. Additionally, it is recommended to avoid hardcoding a restrictive fixed width on secondary action buttons in production CSS and to generalize the slotted selector to support other button-like components.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/core/src/components/content-header/content-header.tsx Outdated
Comment on lines +60 to +70
::slotted(ix-button[slot='secondary-actions']) {
width: 5rem;
min-width: 5rem;
max-width: 5rem;

--ix-button-height: auto;
--ix-button-text-white-space: normal;
--ix-button-word-break: break-word;
--ix-button-inner-overflow: visible;
--ix-button-content-overflow: visible;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Forcing a fixed width of 5rem (80px) on all secondary action buttons in production CSS is extremely restrictive and will cause standard button labels (e.g., 'Settings', 'Export Data') to wrap awkwardly or truncate. If a fixed width is needed for visual regression testing, it should be applied directly in the test files (e.g., using inline styles or a test-specific class) rather than hardcoded in the component's production stylesheet. Additionally, using ::slotted([slot='secondary-actions']) instead of ::slotted(ix-button[slot='secondary-actions']) ensures that these wrapping and layout styles are also correctly applied to other button-like components (such as ix-icon-button) used in the preview examples.

    ::slotted([slot='secondary-actions']) {
      --ix-button-height: auto;
      --ix-button-text-white-space: normal;
      --ix-button-word-break: break-word;
      --ix-button-inner-overflow: visible;
      --ix-button-content-overflow: visible;
    }

@SaiYugandhar03 SaiYugandhar03 force-pushed the Content-Header-Buttons-Wrap-into-Overflow-Menu branch from 4c862c1 to 8ff3402 Compare June 3, 2026 11:10
@SaiYugandhar03 SaiYugandhar03 marked this pull request as ready for review June 11, 2026 08:38
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds responsive secondary-actions support to ix-content-header, makes button mixins configurable via CSS variables, and updates preview examples and visual tests to place secondary actions into a dedicated secondary-actions slot.

Changes

Responsive Secondary Actions Implementation

Layer / File(s) Summary
Button styling customization with CSS variables
packages/core/src/components/button/button-mixin.scss
Button mixins now use CSS custom properties for inner overflow, height, min-height, and content truncation with fallbacks.
Content-header responsive component and styling
packages/core/src/components/content-header/content-header.tsx, packages/core/src/components/content-header/content-header.scss
ix-content-header tracks the secondary-actions slot, listens to a small-viewport media query, and renders secondary actions inline or inside a dropdown button; its stylesheet updates title wrapping, action wrapping, and slot-scoped button overflow behavior.
Test app preview example updates
packages/angular-standalone-test-app/src/preview-examples/content-header*.html, packages/angular-test-app/src/preview-examples/content-header*.html, packages/html-test-app/src/preview-examples/content-header*.html, packages/react-test-app/src/preview-examples/content-header*.tsx, packages/vue-test-app/src/preview-examples/content-header*.vue
Angular, HTML, React, and Vue preview examples assign secondary actions to the secondary-actions slot and add primary example buttons where shown.
Visual testing fixtures and wrapping scenarios
testing/visual-testing/tests/content-header/basic/index.html, testing/visual-testing/tests/content-header/secondary/index.html, testing/visual-testing/tests/content/basic/index.html
Visual test fixtures add wrapping button styles, register iconMoreMenu, and update content-header scenarios for slotted secondary actions, overflow, wrapping text, and icon buttons.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I hopped through slots with a tidy little grin,
And tucked secondary carrots where the menus begin.
The header can wrap, and the buttons can roam,
While bunny-approved examples all feel right at home.

🚥 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 is specific and matches the main content-header wrapping change, even if it is slightly truncated.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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

🤖 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/content-header/content-header.scss`:
- Around line 24-25: Remove the deprecated declaration `word-break: break-word`
in content-header.scss (the rule that currently also has `overflow-wrap:
break-word`) and either delete it entirely so `overflow-wrap: break-word` is the
sole wrapping rule, or if you really need aggressive intraword breaks use
`word-break: break-all`; update the CSS rule containing `overflow-wrap:
break-word` accordingly.

In `@packages/core/src/components/content-header/content-header.tsx`:
- Line 68: Extract the duplicated media query string into a single private
constant (e.g., MEDIA_QUERY = '(max-width: 48em)') inside the ContentHeader
class and replace the two inline uses in componentWillLoad and connectedCallback
where this.mediaQuery is assigned with that constant; update any references to
the literal string to use the constant to improve maintainability.
- Line 10: Add a new changeset markdown file under .changeset that covers the
ContentHeader responsive secondary actions + dropdown pattern: set the scope to
"`@siemens/ix`", pick the appropriate release type (minor for new non-breaking
feature, major if it changes behavior), and write a short summary describing the
responsive + dropdown behavior for ContentHeader (mention "responsive secondary
actions" and "dropdown pattern"); if the change is breaking, include explicit
migration guidance for consumers (what to update in ContentHeader usage and
props). Ensure the changeset references the
content-header/responsive/dropdown/secondary actions change so it will trigger a
release.
🪄 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

Run ID: 59bf6654-fa71-4323-bd5f-248cf797c45e

📥 Commits

Reviewing files that changed from the base of the PR and between 47d93f3 and a3aa642.

⛔ 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 (21)
  • packages/angular-standalone-test-app/src/preview-examples/content-header-no-back.html
  • packages/angular-standalone-test-app/src/preview-examples/content-header-with-slot.html
  • packages/angular-standalone-test-app/src/preview-examples/content-header.html
  • packages/angular-test-app/src/preview-examples/content-header-no-back.html
  • packages/angular-test-app/src/preview-examples/content-header-with-slot.html
  • packages/angular-test-app/src/preview-examples/content-header.html
  • packages/core/src/components/button/button-mixin.scss
  • packages/core/src/components/content-header/content-header.scss
  • packages/core/src/components/content-header/content-header.tsx
  • packages/html-test-app/src/preview-examples/content-header-no-back.html
  • packages/html-test-app/src/preview-examples/content-header-with-slot.html
  • packages/html-test-app/src/preview-examples/content-header.html
  • packages/react-test-app/src/preview-examples/content-header-no-back.tsx
  • packages/react-test-app/src/preview-examples/content-header-with-slot.tsx
  • packages/react-test-app/src/preview-examples/content-header.tsx
  • packages/vue-test-app/src/preview-examples/content-header-no-back.vue
  • packages/vue-test-app/src/preview-examples/content-header-with-slot.vue
  • packages/vue-test-app/src/preview-examples/content-header.vue
  • testing/visual-testing/tests/content-header/basic/index.html
  • testing/visual-testing/tests/content-header/secondary/index.html
  • testing/visual-testing/tests/content/basic/index.html

Comment thread packages/core/src/components/content-header/content-header.scss Outdated

import { iconArrowLeft } from '@siemens/ix-icons/icons';
import { Component, Event, EventEmitter, h, Host, Prop } from '@stencil/core';
import { iconArrowLeft, iconMoreMenu } from '@siemens/ix-icons/icons';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for changeset files related to content-header
fd -e md . .changeset/ --exec grep -l 'content-header' {} \; || echo "No changeset found for content-header"

Repository: siemens/ix

Length of output: 92


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== .changeset files (names) =="
ls -1 .changeset 2>/dev/null || echo "(no .changeset dir)"

echo
echo "== Search for content-header / ContentHeader in .changeset =="
rg -n --no-heading "content-header|ContentHeader" .changeset || echo "No matches."

echo
echo "== Search for likely keywords in .changeset =="
rg -n --no-heading "dropdown|responsive|secondary actions|secondary actions|more menu|small viewport" .changeset || echo "No matches."

Repository: siemens/ix

Length of output: 354


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== .changeset markdown files =="
fd -e md . .changeset --exec basename {} \; | sort | uniq

echo
echo "== Search all changesets for broader terms =="
for pat in "content" "header" "dropdown" "responsive" "secondary" "menu"; do
  echo "--- pattern: $pat ---"
  rg -n --no-heading "$pat" .changeset --glob '*.md' || echo "No matches for $pat"
  echo
done

Repository: siemens/ix

Length of output: 708


Add a changeset for the ContentHeader responsive + dropdown behavior
No .changeset/*.md entry exists for content-header/responsive/dropdown/secondary actions (only an unrelated modal-header-long-title changeset is present). Add a changeset in .changeset/ with scope @siemens/ix, the appropriate release type, and a summary of the new responsive secondary actions + dropdown pattern. Include migration guidance if this is a breaking behavior change.

🤖 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/content-header/content-header.tsx` at line 10,
Add a new changeset markdown file under .changeset that covers the ContentHeader
responsive secondary actions + dropdown pattern: set the scope to "`@siemens/ix`",
pick the appropriate release type (minor for new non-breaking feature, major if
it changes behavior), and write a short summary describing the responsive +
dropdown behavior for ContentHeader (mention "responsive secondary actions" and
"dropdown pattern"); if the change is breaking, include explicit migration
guidance for consumers (what to update in ContentHeader usage and props). Ensure
the changeset references the content-header/responsive/dropdown/secondary
actions change so it will trigger a release.

Source: Coding guidelines

Comment thread packages/core/src/components/content-header/content-header.tsx Outdated

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/core/src/components/button/button-mixin.scss (1)

113-137: ⚠️ Potential issue | 🟠 Major

Changeset exists but may inadequately document the CSS custom property additions.

A changeset (button-padding-css-variable.md) is present, but its description does not explicitly document the new CSS custom property contracts (--ix-button-content-overflow, --ix-button-text-white-space, etc.) being introduced to button-mixin.scss. These properties enable user-facing behavior changes—specifically, allowing buttons in content-header's secondary-actions slot to wrap and overflow text instead of truncating. Please update the changeset summary to explicitly list the new CSS custom properties and their purpose.

Regarding accessibility: extensive button axe-based tests exist, but no evidence of new tests for the content-header secondary-actions overflow behavior. Confirm whether accessibility coverage has been added for this specific UI change.

🤖 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/button/button-mixin.scss` around lines 113 -
137, Update the changeset file to explicitly document the new CSS custom
properties being introduced in button-mixin.scss: --ix-button-content-overflow,
--ix-button-text-white-space, --ix-button-content-text-overflow, and
--ix-button-word-break. Include a clear description explaining that these
properties enable buttons in content-header secondary-actions slots to wrap and
overflow text instead of truncating. Additionally, verify that accessibility
tests have been added for this specific content-header secondary-actions
overflow behavior to ensure proper axe-based coverage for the UI change.

Source: Coding guidelines

🤖 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/button/button-mixin.scss`:
- Line 104: Remove the empty line that appears before the padding property
declaration in the button-mixin.scss file. The `declaration-empty-line-before`
stylelint rule is being violated by the blank line preceding the `padding:
var(--ix-button-padding, 0 0.5rem);` declaration. Delete this empty line to
ensure the property declaration immediately follows the preceding content
without any blank lines in between.

---

Outside diff comments:
In `@packages/core/src/components/button/button-mixin.scss`:
- Around line 113-137: Update the changeset file to explicitly document the new
CSS custom properties being introduced in button-mixin.scss:
--ix-button-content-overflow, --ix-button-text-white-space,
--ix-button-content-text-overflow, and --ix-button-word-break. Include a clear
description explaining that these properties enable buttons in content-header
secondary-actions slots to wrap and overflow text instead of truncating.
Additionally, verify that accessibility tests have been added for this specific
content-header secondary-actions overflow behavior to ensure proper axe-based
coverage for the UI change.
🪄 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

Run ID: 3067632c-a856-4ead-856b-0cb69dd0abd3

📥 Commits

Reviewing files that changed from the base of the PR and between 730187b and eee9263.

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

Comment thread packages/core/src/components/button/button-mixin.scss

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/core/src/components/content-header/content-header.tsx (1)

170-189: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Add accessibility and Storybook coverage for the new responsive/overflow behavior.

This introduces a new user-visible variation (overflow dropdown on small viewports, slotted secondary actions). Per the component-level review requirements, add axe-based component tests for the changed behavior and a Storybook story demonstrating the small-viewport overflow + secondary-actions slot. PR objectives indicate unit tests, accessibility, and Storybook are not yet complete.

As per path instructions: "Ensure accessibility coverage exists with axe-based component tests where behavior/UI changed" and "Require a Storybook story for any new component or significant user-visible variation (states, themes, interactions)."

🤖 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/content-header/content-header.tsx` around lines
170 - 189, The responsive behavior in the content-header component that
conditionally renders the `ix-dropdown-button` with secondary actions based on
the `isSmallBreakpoint` property requires accessibility and Storybook coverage.
Add axe-based component tests that verify accessibility compliance for both the
small breakpoint path (with the dropdown) and the regular breakpoint path,
ensuring the `secondary-actions` slot is properly accessible in both scenarios.
Additionally, create a Storybook story that demonstrates the small viewport
overflow behavior by setting `isSmallBreakpoint` to true and showcasing the
`secondary-actions` slot populated with dropdown content.

Source: Path instructions

🤖 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/content-header/content-header.tsx`:
- Around line 102-112: The slotchange listener in componentDidLoad uses an
inline arrow function that cannot be removed, causing a leak, and is only
registered once so it is lost after element reconnect. Create a stable handler
reference as a class property (similar to how mediaQueryHandler is handled),
attach the slotchange listener to the secondary-actions slot in both
componentDidLoad and connectedCallback to ensure it is re-registered after
disconnect/reconnect, and remove the listener in disconnectedCallback using the
stored handler reference.
- Around line 174-182: The ix-dropdown-button component rendering the overflow
menu icon has an empty label attribute, which prevents screen readers from
announcing the button's purpose. Replace the empty label="" with a meaningful,
localizable string such as "More actions" to provide an accessible name that
describes the dropdown's function to assistive technology users.
- Around line 73-92: The checkSecondarySlot method has a chicken-and-egg problem
where it queries a conditionally-rendered shadow DOM slot that only appears when
hasSecondaryActions is true, preventing initial detection on small viewports.
Instead of querying the shadow DOM slot element using querySelector on
slot[name="secondary-actions"], query the host element's light-DOM children
directly by selecting elements with the slot="secondary-actions" attribute using
this.hostElement.querySelectorAll('[slot="secondary-actions"]'). Filter the
results for meaningful nodes (excluding empty text nodes) and set
hasSecondaryActions based on whether any meaningful content exists, making the
detection independent of render state.

---

Outside diff comments:
In `@packages/core/src/components/content-header/content-header.tsx`:
- Around line 170-189: The responsive behavior in the content-header component
that conditionally renders the `ix-dropdown-button` with secondary actions based
on the `isSmallBreakpoint` property requires accessibility and Storybook
coverage. Add axe-based component tests that verify accessibility compliance for
both the small breakpoint path (with the dropdown) and the regular breakpoint
path, ensuring the `secondary-actions` slot is properly accessible in both
scenarios. Additionally, create a Storybook story that demonstrates the small
viewport overflow behavior by setting `isSmallBreakpoint` to true and showcasing
the `secondary-actions` slot populated with dropdown content.
🪄 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

Run ID: 5a7a5d68-d074-4570-8b6f-9f20aedaa89f

📥 Commits

Reviewing files that changed from the base of the PR and between eee9263 and 94cdf7f.

⛔ 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)
  • packages/core/src/components/content-header/content-header.tsx

Comment thread packages/core/src/components/content-header/content-header.tsx Outdated
Comment thread packages/core/src/components/content-header/content-header.tsx
Comment thread packages/core/src/components/content-header/content-header.tsx

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/core/src/components/content-header/content-header.tsx (1)

178-196: 📐 Maintainability & Code Quality | 🟡 Minor

Add small-breakpoint coverage for ix-content-header

testing/framework-tests/tests/generated/content-header-axe.spec.ts only scans the default preview, and testing/framework-tests/tests/working-with-axe.spec.ts / testing/framework-tests/tests/working.spec.ts do not include any content-header cases. Add a viewport-sized overflow case that opens the secondary-actions menu and wire it into both accessibility suites.

🤖 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/content-header/content-header.tsx` around lines
178 - 196, Add a small-breakpoint test case for ix-content-header that exercises
the overflow menu by rendering the component with secondary-actions, switching
to a narrow viewport, and opening the ix-dropdown-button from the content-header
actions area. Then wire that same scenario into both the generated axe suite and
the working/working-with-axe suites so content-header is covered beyond the
default preview; use the existing content-header test helpers/spec entries as
the place to register the new case.

Source: Path instructions

♻️ Duplicate comments (1)
packages/core/src/components/content-header/content-header.tsx (1)

182-186: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Provide a non-empty accessible name for the overflow trigger.

ix-dropdown-button is icon-only with label="", so assistive tech gets no meaningful name.

♿ Suggested fix
               <ix-dropdown-button
                 icon={iconMoreMenu}
                 variant="tertiary"
-                label=""
+                label="More actions"
               >
🤖 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/content-header/content-header.tsx` around lines
182 - 186, The overflow trigger in the content header is icon-only and currently
has an empty accessible name via ix-dropdown-button’s label prop. Update the
ContentHeader overflow button so it exposes a non-empty, meaningful label (or
equivalent accessible name) that describes the menu action, using the existing
ix-dropdown-button usage in ContentHeader to locate it.
🤖 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.

Outside diff comments:
In `@packages/core/src/components/content-header/content-header.tsx`:
- Around line 178-196: Add a small-breakpoint test case for ix-content-header
that exercises the overflow menu by rendering the component with
secondary-actions, switching to a narrow viewport, and opening the
ix-dropdown-button from the content-header actions area. Then wire that same
scenario into both the generated axe suite and the working/working-with-axe
suites so content-header is covered beyond the default preview; use the existing
content-header test helpers/spec entries as the place to register the new case.

---

Duplicate comments:
In `@packages/core/src/components/content-header/content-header.tsx`:
- Around line 182-186: The overflow trigger in the content header is icon-only
and currently has an empty accessible name via ix-dropdown-button’s label prop.
Update the ContentHeader overflow button so it exposes a non-empty, meaningful
label (or equivalent accessible name) that describes the menu action, using the
existing ix-dropdown-button usage in ContentHeader to locate it.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e081f7d2-933a-47cd-bc1e-77a913878c5f

📥 Commits

Reviewing files that changed from the base of the PR and between 94cdf7f and 6470dc4.

📒 Files selected for processing (2)
  • packages/core/src/components/button/button-mixin.scss
  • packages/core/src/components/content-header/content-header.tsx
💤 Files with no reviewable changes (1)
  • packages/core/src/components/button/button-mixin.scss

@sonarqubecloud

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