Skip to content

Commit fe11b07

Browse files
authored
fix(ObjectPage): adjust header shadow (#7855)
Fixes #7812
1 parent 09b0f0e commit fe11b07

File tree

5 files changed

+24
-11
lines changed

5 files changed

+24
-11
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,11 +716,11 @@ describe('ObjectPage', () => {
716716

717717
cy.mount(<TestComp height="2000px" withFooter mode={ObjectPageMode.Default} />);
718718
cy.findByText('Update Heights').click();
719-
cy.findByText('{"offset":1080,"scroll":2310}').should('exist');
719+
cy.findByText('{"offset":1080,"scroll":2320}').should('exist');
720720

721721
cy.findByTestId('op').scrollTo('bottom');
722722
cy.findByText('Update Heights').click({ force: true });
723-
cy.findByText('{"offset":1080,"scroll":2310}').should('exist');
723+
cy.findByText('{"offset":1080,"scroll":2320}').should('exist');
724724

725725
cy.mount(<TestComp height="400px" mode={ObjectPageMode.Default} />);
726726
cy.findByText('Update Heights').click();

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

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,29 @@
108108
.tabContainer {
109109
position: sticky;
110110
z-index: 3;
111+
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+
}
111123
}
112124

113125
.tabContainerComponent {
114-
padding-block-start: 3px;
115-
background: var(--sapObjectHeader_Background);
116126
&::part(content) {
117127
display: none;
118128
}
119129

120130
&::part(tabstrip) {
121131
padding: 0;
122132
padding-inline: var(--_ui5wcr_ObjectPage_tab_bar_inline_padding);
123-
box-shadow:
124-
inset 0 -0.0625rem var(--sapPageHeader_BorderColor),
125-
0 0.125rem 0.25rem 0 rgb(0 0 0 / 8%);
133+
box-shadow: none;
126134
}
127135
}
128136

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
720720
className={classNames.tabContainer}
721721
data-component-name="ObjectPageTabContainer"
722722
style={{
723-
top:
723+
insetBlockStart:
724724
headerPinned || scrolledHeaderExpanded
725725
? `${topHeaderHeight + (headerCollapsed === true ? 0 : headerContentHeight)}px`
726726
: `${topHeaderHeight}px`,

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
.section {
22
box-sizing: border-box;
3+
4+
&:first-of-type {
5+
margin-block-start: 1px;
6+
}
37
}
48

59
.section [data-component-name='ObjectPageSubSection']:not(:first-child) {

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ describe('ObjectPageTitle', () => {
7777
/>,
7878
);
7979
// no nav actions
80-
cy.findByTestId('breadcrumbs').parent().should('have.css', 'width', '1808px' /*100%*/);
80+
// 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%*/);
8182
cy.mount(
8283
<PageComponent
8384
titleProps={{
@@ -92,10 +93,10 @@ describe('ObjectPageTitle', () => {
9293
/>,
9394
);
9495
// nav actions in actions toolbar
95-
cy.findByTestId('breadcrumbs').parent().should('have.css', 'width', '1808px' /*100%*/);
96+
cy.findByTestId('breadcrumbs').parent().should('have.css', 'width', '1793px' /*100%*/);
9697
cy.viewport(1000, 1000);
9798
// w/ nav actions
98-
cy.findByTestId('breadcrumbs').parent().should('have.css', 'width', '460px' /*50% (min-width)*/);
99+
cy.findByTestId('breadcrumbs').parent().should('have.css', 'width', '452.5px' /*50% (min-width)*/);
99100
});
100101

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

0 commit comments

Comments
 (0)