Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adding stable selectors for tab container and shellbar #4369

Merged
merged 3 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/fiori/src/ShellBar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
@click="{{_header.press}}"
aria-haspopup="{{menuBtnHasPopup}}"
aria-expanded="{{menuPopoverExpanded}}"
data-ui5-stable="menu"
>
{{#if hasNonFocusableLogo}}
<span
Expand All @@ -54,7 +55,7 @@
{{/if}}

{{#if secondaryTitle}}
<h2 class="ui5-shellbar-secondary-title">{{secondaryTitle}}</h2>
<h2 class="ui5-shellbar-secondary-title" data-ui5-stable="secondary-title">{{secondaryTitle}}</h2>
{{/if}}
</div>

Expand Down Expand Up @@ -89,6 +90,7 @@
<ui5-button
@click={{_handleCancelButtonPress}}
class="ui5-shellbar-button"
data-ui5-stable="cancel-search"
>
Cancel
</ui5-button>
Expand All @@ -107,6 +109,7 @@
icon="sap-icon://search"
data-ui5-text="Search"
data-ui5-notifications-count="{{notificationsCount}}"
data-ui5-stable="search-button"
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (non-blocking): If we want to distinguish the button that executes the search, with the field that is used for the search input, then how about having this data-ui5-stable attribute be "execute-search" instead of "search-button" or "search", so that it is similar to the "cancel-search" button, in that the "button" role isn't actually used in the name?

codefactor marked this conversation as resolved.
Show resolved Hide resolved
@click={{_handleSearchIconPress}}
title="{{_searchText}}"
._buttonAccInfo="{{accInfo.search}}"
Expand Down
3 changes: 3 additions & 0 deletions packages/main/src/TabContainer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<div class="{{classes.headerBackArrow}}">
<ui5-button @click="{{_onHeaderBackArrowClick}}"
icon="slim-arrow-left"
data-ui5-stable="tabs-left"
design="Transparent"
tabindex="-1"
title="{{previousIconACCName}}"></ui5-button>
Expand Down Expand Up @@ -43,6 +44,7 @@
<div class="{{classes.headerForwardArrow}}">
<ui5-button @click="{{_onHeaderForwardArrowClick}}"
icon="slim-arrow-right"
data-ui5-stable="tabs-right"
design="Transparent"
tabindex="-1"
title="{{nextIconACCName}}"></ui5-button>
Expand All @@ -59,6 +61,7 @@
{{else}}
<ui5-button
icon="{{overflowMenuIcon}}"
data-ui5-stable="tabs-overflow"
design="Transparent"
tabindex="-1"
title="{{overflowMenuTitle}}"
Expand Down