Skip to content

Commit d3cb940

Browse files
authored
Merge branch 'main' into patch-1
2 parents 00da3d4 + c764ea6 commit d3cb940

File tree

8 files changed

+134
-56
lines changed

8 files changed

+134
-56
lines changed

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
with:
2121
reportCoverage: false
2222

23-
check-charts-peer-deps:
23+
check-charts-compat-peer-deps:
2424
runs-on: ubuntu-latest
2525
environment: charts-peer-deps-approval
2626
steps:
2727
- name: No-op
28-
run: echo "Did you update the peer dependencies of the chart package?"
28+
run: echo "Did you update the peer dependencies of the charts and compat package?"
2929

3030
release-dryrun:
3131
runs-on: ubuntu-latest

packages/compat/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"@types/react": "*",
4343
"@types/react-dom": "*",
4444
"@ui5/webcomponents-compat": "~2.3.0",
45-
"@ui5/webcomponents-react": "~2.2.0",
45+
"@ui5/webcomponents-react": "~2.3.0",
4646
"react": "^18 || ^19",
4747
"react-dom": "^18 || ^19"
4848
},

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

+9-4
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ describe('ObjectPage', () => {
259259
it('scroll to sections - default mode', () => {
260260
document.body.style.margin = '0px';
261261
cy.mount(
262-
<ObjectPage titleArea={DPTitle} headerArea={DPContent}>
262+
<ObjectPage titleArea={DPTitle} headerArea={DPContent} style={{ height: '100vh', scrollBehavior: 'auto' }}>
263263
{OPContent}
264264
</ObjectPage>
265265
);
@@ -287,7 +287,12 @@ describe('ObjectPage', () => {
287287
cy.findByText('Job Relationship').should('be.visible');
288288

289289
cy.mount(
290-
<ObjectPage titleArea={DPTitle} headerArea={DPContent} footerArea={Footer}>
290+
<ObjectPage
291+
titleArea={DPTitle}
292+
headerArea={DPContent}
293+
footerArea={Footer}
294+
style={{ height: '100vh', scrollBehavior: 'auto' }}
295+
>
291296
{OPContent}
292297
</ObjectPage>
293298
);
@@ -331,7 +336,7 @@ describe('ObjectPage', () => {
331336
titleArea={DPTitle}
332337
headerArea={DPContent}
333338
mode={ObjectPageMode.IconTabBar}
334-
style={{ height: '100vh' }}
339+
style={{ height: '100vh', scrollBehavior: 'auto' }}
335340
>
336341
{OPContent}
337342
</ObjectPage>
@@ -361,7 +366,7 @@ describe('ObjectPage', () => {
361366
headerArea={DPContent}
362367
footerArea={Footer}
363368
mode={ObjectPageMode.IconTabBar}
364-
style={{ height: '100vh' }}
369+
style={{ height: '100vh', scrollBehavior: 'auto' }}
365370
>
366371
{OPContent}
367372
</ObjectPage>

packages/main/src/components/ObjectPage/ObjectPage.mdx

+3
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ import { ObjectPageHeader } from '../ObjectPageHeader';
77
import { ObjectPageSection } from '../ObjectPageSection';
88
import { ObjectPageSubSection } from '../ObjectPageSubSection';
99
import { CodeBlock } from '@sb/components/DomRefTable';
10+
import { MessageStrip } from '@ui5/webcomponents-react';
1011

1112
<Meta of={ComponentStories} />
1213

1314
<DocsHeader subComponents={['ObjectPageTitle', 'ObjectPageHeader', 'ObjectPageSection', 'ObjectPageSubSection']} />
1415

16+
<MessageStrip hideCloseButton children={'In iframes, smooth scrolling is disabled!'} />
17+
1518
## Example
1619

1720
<Canvas of={ComponentStories.Default} />

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

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
overflow-x: hidden;
1717
overflow-y: auto;
1818
scroll-behavior: smooth;
19+
&[data-in-iframe='true'] {
20+
scroll-behavior: auto;
21+
}
1922
section[id*='ObjectPageSection-'] > div[role='heading'] {
2023
display: none;
2124
}

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,10 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
334334
TAB_CONTAINER_HEADER_HEIGHT +
335335
(headerPinned && !headerCollapsed ? headerContentHeight : 0) +
336336
'px';
337-
section.focus();
338-
section.scrollIntoView({ behavior: 'smooth' });
337+
if (isSubSection) {
338+
section.focus();
339+
}
340+
section.scrollIntoView();
339341
section.style.scrollMarginBlockStart = '0px';
340342
}
341343
};
@@ -345,7 +347,7 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
345347
return;
346348
}
347349
if (firstSectionId === sectionId) {
348-
objectPageRef.current?.scrollTo({ top: 0, behavior: 'smooth' });
350+
objectPageRef.current?.scrollTo({ top: 0 });
349351
} else {
350352
scrollToSectionById(sectionId);
351353
}
@@ -729,6 +731,7 @@ const ObjectPage = forwardRef<ObjectPageDomRef, ObjectPagePropTypes>((props, ref
729731
style={objectPageStyles}
730732
ref={componentRef}
731733
onScroll={onObjectPageScroll}
734+
data-in-iframe={window && window.self !== window.top}
732735
{...propsWithoutOmitted}
733736
>
734737
<header

packages/main/src/i18n/messagebundle.properties

+4
Original file line numberDiff line numberDiff line change
@@ -335,3 +335,7 @@ UP_ARROW=Up Arrow
335335

336336
#XTXT: No-data text for filtered AnalyticalTable that returns no results
337337
NO_DATA_FILTERED=No data found. Try adjusting the filter settings.
338+
339+
#XACT: Number of items in a pseudo list
340+
WITH_X_ITEMS=with {0} items
341+

0 commit comments

Comments
 (0)