Skip to content

Conversation

@dobrinyonkov
Copy link
Contributor

@dobrinyonkov dobrinyonkov commented Apr 9, 2025

This PR updates the ShellBar search functionality to support two separate collapse modes for search fields.

Changes

Dual Mode Support:
Allows self-collapsible search with an internal toggle and collapsed property or fully custom search with its own button.

Syncing Mechanism:
The two collapse mechanisms are now synchronized using the showSearchField getter/setter instead of a combined property.

Customization Options:
New properties hideSearchButton and disableAutoSearchField enable further customization of custom search fields.

Accessibility Improvements:
Roles and labels are correctly set for the content items container.

New Features:
A new search-field-toggle event is fired when the search field is toggled by internal rules, and a new getter searchButtonRef is available for managing focus on the search button.

@dobrinyonkov dobrinyonkov requested a review from Copilot April 9, 2025 22:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • packages/fiori/src/themes/ShellBar.css: Language not supported
  • packages/fiori/test/pages/ShellBar_evolution.html: Language not supported
Comments suppressed due to low confidence (2)

packages/fiori/src/ShellBar.ts:1507

  • The component now queries for '.ui5-shellbar-search-toggle' for the search button. Please ensure all related selectors and references (including in tests) are updated consistently.
const searchToggle = this.shadowRoot!.querySelector<HTMLElement>(".ui5-shellbar-search-toggle");

packages/fiori/cypress/specs/ShellBar.cy.tsx:402

  • The tests still reference '.ui5-shellbar-search-button' while the component now uses '.ui5-shellbar-search-toggle'. Please update the test selectors to match the new class names.
.find(".ui5-shellbar-search-button")

@dobrinyonkov dobrinyonkov merged commit 79fbe99 into main Apr 14, 2025
12 checks passed
@dobrinyonkov dobrinyonkov deleted the shellbar-search-evo branch April 14, 2025 11:41
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