Skip to content

Commit 85d82a0

Browse files
authored
fix(ObjectPage): use UI5WC tabbar shadow (#7975)
The test was updated as previously the width reserved place for the scrollbar, as the `::after` pseudo element was absolutely positioned, had explicit width (`100%`) and was rendered in a container with `overflow: auto`.
1 parent 8c280d9 commit 85d82a0

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

packages/main/src/components/ObjectPage/ObjectPage.module.css

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,15 @@
105105
z-index: 4;
106106
}
107107

108+
.tabContainerSpacer {
109+
height: 3px;
110+
background: var(--sapObjectHeader_Background);
111+
}
112+
108113
.tabContainer {
109114
position: sticky;
110115
z-index: 3;
111116
background: var(--sapObjectHeader_Background);
112-
padding-block-start: 3px;
113-
&::after {
114-
content: '';
115-
pointer-events: none;
116-
position: absolute;
117-
height: 1px;
118-
inset-block-end: -1px;
119-
inset-inline-start: 0;
120-
width: 100%;
121-
box-shadow: var(--sapContent_HeaderShadow);
122-
}
123117
}
124118

125119
.tabContainerComponent {
@@ -130,7 +124,6 @@
130124
&::part(tabstrip) {
131125
padding: 0;
132126
padding-inline: var(--_ui5wcr_ObjectPage_tab_bar_inline_padding);
133-
box-shadow: none;
134127
}
135128
}
136129

packages/main/src/components/ObjectPage/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,8 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
726726
: `${topHeaderHeight}px`,
727727
}}
728728
>
729+
{/* Spacer required to prevent overlapping of tabbar btns and expand/pin btns*/}
730+
<div aria-hidden="true" className={classNames.tabContainerSpacer} />
729731
<TabContainer
730732
collapsed
731733
onTabSelect={handleTabSelect}

packages/main/src/components/ObjectPageTitle/ObjectPageTitle.cy.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe('ObjectPageTitle', () => {
7878
);
7979
// no nav actions
8080
// The overflow breadcrumbs button requires time until it's mounted -> value can be different initially
81-
cy.findByTestId('breadcrumbs').parent().should('have.css', 'width', '1793px' /*100%*/);
81+
cy.findByTestId('breadcrumbs').parent().should('have.css', 'width', '1808px' /*100%*/);
8282
cy.mount(
8383
<PageComponent
8484
titleProps={{
@@ -93,10 +93,10 @@ describe('ObjectPageTitle', () => {
9393
/>,
9494
);
9595
// nav actions in actions toolbar
96-
cy.findByTestId('breadcrumbs').parent().should('have.css', 'width', '1793px' /*100%*/);
96+
cy.findByTestId('breadcrumbs').parent().should('have.css', 'width', '1808px' /*100%*/);
9797
cy.viewport(1000, 1000);
9898
// w/ nav actions
99-
cy.findByTestId('breadcrumbs').parent().should('have.css', 'width', '452.5px' /*50% (min-width)*/);
99+
cy.findByTestId('breadcrumbs').parent().should('have.css', 'width', '460px' /*50% (min-width)*/);
100100
});
101101

102102
it('expandedContent & snappedContent', () => {

0 commit comments

Comments
 (0)