Skip to content

feat: update to @ui5/webcomonents 2.0.0-rc.6 #5940

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

Merged
merged 25 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7815195
update deps to rc.6
MarcusNotheis Jun 18, 2024
697bbb4
Checkbox
MarcusNotheis Jun 18, 2024
10bbc6e
minor updates
MarcusNotheis Jun 18, 2024
58d7eda
replace ListItems
MarcusNotheis Jun 18, 2024
da226ff
MultiComboBoxItemGroup
MarcusNotheis Jun 18, 2024
ca11dc1
SideNavigationItem
MarcusNotheis Jun 18, 2024
1844545
update storybook table parts
MarcusNotheis Jun 19, 2024
ac09d77
TableCell
MarcusNotheis Jun 19, 2024
dcc0642
table story
MarcusNotheis Jun 19, 2024
c2ec911
update tablecell
MarcusNotheis Jun 19, 2024
14343fb
Merge remote-tracking branch 'origin/main' into feat/webcomponents-rc.6
MarcusNotheis Jun 19, 2024
9c29b6a
TableRow
MarcusNotheis Jun 19, 2024
e4e5167
replace new components as last step
MarcusNotheis Jun 19, 2024
8b8aeae
TableHeaderCell
MarcusNotheis Jun 19, 2024
24d1e47
delete TableGroupRow
MarcusNotheis Jun 19, 2024
f1a489d
table features
MarcusNotheis Jun 19, 2024
20d8976
Table
MarcusNotheis Jun 19, 2024
b6349f9
Merge remote-tracking branch 'origin/main' into feat/webcomponents-rc.6
MarcusNotheis Jun 20, 2024
d697bb0
VariantMangement: migrate to new table
MarcusNotheis Jun 20, 2024
14dd3ac
update filter bar table
MarcusNotheis Jun 20, 2024
00590f0
fix FilterBar errors
MarcusNotheis Jun 20, 2024
9b454c9
skip FilterBar tests for now
MarcusNotheis Jun 20, 2024
999dd9b
fix variant management tests
MarcusNotheis Jun 20, 2024
91eb837
VariantManagement: adjust `min-width` of manage-views table
Lukas742 Jun 21, 2024
87ddba6
ObjectPage: fix story
Lukas742 Jun 21, 2024
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
17 changes: 9 additions & 8 deletions .storybook/components/ProductsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
Label,
Table,
TableCell,
TableColumn,
TableHeaderCell,
TableHeaderRow,
TableRow,
Text
} from '@ui5/webcomponents-react';
Expand All @@ -13,13 +14,13 @@ import { ProductCollection } from './products.json';
export const ProductsTable = () => {
return (
<Table
columns={
<>
<TableColumn>Product</TableColumn>
<TableColumn>Supplier</TableColumn>
<TableColumn>Dimensions</TableColumn>
<TableColumn>Price</TableColumn>
</>
headerRow={
<TableHeaderRow>
<TableHeaderCell>Product</TableHeaderCell>
<TableHeaderCell>Supplier</TableHeaderCell>
<TableHeaderCell>Dimensions</TableHeaderCell>
<TableHeaderCell>Price</TableHeaderCell>
</TableHeaderRow>
}
>
{ProductCollection.map((product) => {
Expand Down
290 changes: 266 additions & 24 deletions .storybook/custom-element-manifests/fiori.json

Large diffs are not rendered by default.

14,460 changes: 7,862 additions & 6,598 deletions .storybook/custom-element-manifests/main.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions .storybook/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ export function useGetCem() {
}
}
const replaceSubComps = {
ListItemBase: ['StandardListItem', 'CustomListItem', 'ListItemGroup'],
ListItemBase: ['ListItemStandard', 'ListItemCustom', 'ListItemGroup'],
InputSuggestionItem: ['SuggestionItem', 'SuggestionGroupItem'],
NotificationListItemBase: ['NotificationListItem'],
ToolbarItem: ['ToolbarSeparatorV2', 'ToolbarSpacerV2', 'ToolbarButton', 'ToolbarSelect', 'ToolbarSelectOption'],
TreeItemBase: ['TreeItem', 'TreeItemCustom'],
AvatarGroupItem: ['Avatar']
AvatarGroupItem: ['Avatar'],
TableFeature: ['TableGrowing', 'TableSelection']
};

function findSubComponentsRecursively(moduleName: string, cem: any): string[] {
Expand Down
12 changes: 6 additions & 6 deletions docs/knowledge-base/ChangeEvents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ const onSelectionChange = (event) => {
};

<List mode={ListSelectionMode.MultiSelect} onSelectionChange={onSelectionChange}>
<StandardListItem additionalText="3" data-custom="custom value of list item 1">
<ListItemStandard additionalText="3" data-custom="custom value of list item 1">
List Item 1
</StandardListItem>
<StandardListItem additionalText="2" data-custom="custom value of list item 2">
</ListItemStandard>
<ListItemStandard additionalText="2" data-custom="custom value of list item 2">
List Item 2
</StandardListItem>
<StandardListItem additionalText="1" data-custom="custom value of list item 3">
</ListItemStandard>
<ListItemStandard additionalText="1" data-custom="custom value of list item 3">
List Item 3
</StandardListItem>
</ListItemStandard>
</List>;
```

Expand Down
62 changes: 26 additions & 36 deletions docs/knowledge-base/Styling.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Footer, TableOfContent } from '@sb/components';
import { Meta } from '@storybook/addon-docs';
import { MessageStrip, ThemeProvider } from '@ui5/webcomponents-react';
import MessageStripDesign from '@ui5/webcomponents/dist/types/MessageStripDesign.js';
import { CssPartsExample } from '../styling/CssPartsExample';
import { MyCustomElement } from '../styling/MyCustomElement';
import { TableShadowRootExample } from '../styling/TableShadowRootExample';
import { MessageStrip, ThemeProvider } from '@ui5/webcomponents-react';
import { Footer, TableOfContent } from '@sb/components';

<Meta title="Styling" />

Expand Down Expand Up @@ -137,58 +137,48 @@ With the help of this attribute it's possible styling the respective element, by

### Example

<TableShadowRootExample />
<CssPartsExample />

<br />
<br />

<details>

{' '}

<summary>Show Code</summary>

```css
.thGreen::part(column) {
.card::part(root) {
background-color: lightgreen;
}
.trBlue::part(row) {
background-color: lightblue;
.card::part(content) {
transform: rotate(180deg);
}
```

```jsx
const TableComponent = () => {
function MyComponent() {
return (
<Table
columns={
<>
<TableColumn className="thGreen">
<Label>Product</Label>
</TableColumn>
<TableColumn>
<Label>Price</Label>
</TableColumn>
</>
<Card
header={
<CardHeader
additionalText="3 of 5"
avatar={<Icon name="person-placeholder" />}
subtitleText="Direct Reports"
titleText="TeamSpace"
/>
}
className="card"
>
<TableRow className="trBlue">
<TableCell>
<Label>Notebook Basic</Label>
</TableCell>
<TableCell>
<Label>956EUR</Label>
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Label>Notebook Basic 17HT-1001</Label>
</TableCell>
<TableCell>
<Label>1249EUR</Label>
</TableCell>
</TableRow>
</Table>
<List>
<ListItemStandard description="Software Architect">Richard Wilson</ListItemStandard>
<ListItemStandard description="Visual Designer">Elena Petrova</ListItemStandard>
<ListItemStandard description="Quality Specialist">John Miller</ListItemStandard>
</List>
</Card>
);
};
}
```

</details>
Expand Down
6 changes: 6 additions & 0 deletions docs/styling/CssPartsExample.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.card::part(root) {
background-color: lightgreen;
}
.card::part(content) {
transform: rotate(180deg);
}
13 changes: 13 additions & 0 deletions docs/styling/CssPartsExample.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { composeStories } from '@storybook/react';
import * as CardStories from '../../packages/main/src/webComponents/Card/Card.stories.js';
import './CssPartsExample.css';

const { Default: CardComponent } = composeStories(CardStories);

export const CssPartsExample = () => {
return (
<div>
<CardComponent className="card" />
</div>
);
};
36 changes: 0 additions & 36 deletions docs/styling/TableShadowRootExample.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions docs/styling/TableShadowRootExampleStyles.css

This file was deleted.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"wrappers:main": "WITH_WEB_COMPONENT_IMPORT_PATH='../../internal/withWebComponent.js' INTERFACES_IMPORT_PATH='../../types/index.js' node packages/cli/dist/bin/index.js create-wrappers --packageName @ui5/webcomponents --out ./packages/main/src/webComponents --additionalComponentNote 'This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/)'",
"wrappers:fiori": "WITH_WEB_COMPONENT_IMPORT_PATH='../../internal/withWebComponent.js' INTERFACES_IMPORT_PATH='../../types/index.js' node packages/cli/dist/bin/index.js create-wrappers --packageName @ui5/webcomponents-fiori --out ./packages/main/src/webComponents --additionalComponentNote 'This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/)'",
"wrappers:compat": "node packages/cli/dist/bin/index.js create-wrappers --packageName @ui5/webcomponents-compat --out ./packages/compat/src/components --additionalComponentNote 'This is a UI5 Web Component! [Repository](https://github.com/SAP/ui5-webcomponents) | [Documentation](https://sap.github.io/ui5-webcomponents/)' && prettier --log-level silent --write ./packages/compat/src/components && eslint --ext .ts,.tsx --fix ./packages/compat/src/components/*/index.tsx",
"create-webcomponents-wrapper": "yarn run build && yarn run wrappers:main && yarn run wrappers:fiori && yarn run wrappers:compat && prettier --log-level silent --write ./packages/main/src/webComponents && eslint --ext .ts,.tsx --fix ./packages/main/src/webComponents/*/index.tsx && yarn run sb:prepare-cem",
"create-webcomponents-wrapper": "(cd packages/cli && tsc) && yarn run wrappers:main && yarn run wrappers:fiori && yarn run wrappers:compat && prettier --log-level silent --write ./packages/main/src/webComponents && eslint --ext .ts,.tsx --fix ./packages/main/src/webComponents/*/index.tsx && yarn run sb:prepare-cem",
"chromatic": "cross-env STORYBOOK_ENV=chromatic npx chromatic --build-script-name build:storybook",
"postinstall": "husky && yarn setup",
"create-cypress-commands-docs": "typedoc && rimraf temp/typedoc",
Expand All @@ -40,10 +40,10 @@
"@storybook/react": "8.0.10",
"@storybook/react-vite": "8.0.10",
"@storybook/theming": "8.0.10",
"@ui5/webcomponents": "2.0.0-rc.5",
"@ui5/webcomponents-compat": "2.0.0-rc.5",
"@ui5/webcomponents-fiori": "2.0.0-rc.5",
"@ui5/webcomponents-icons": "2.0.0-rc.5",
"@ui5/webcomponents": "2.0.0-rc.6",
"@ui5/webcomponents-compat": "2.0.0-rc.6",
"@ui5/webcomponents-fiori": "2.0.0-rc.6",
"@ui5/webcomponents-icons": "2.0.0-rc.6",
"react": "19.0.0-rc-fb9a90fa48-20240614",
"react-dom": "19.0.0-rc-fb9a90fa48-20240614",
"remark-gfm": "^4.0.0",
Expand All @@ -65,7 +65,7 @@
"@types/use-sync-external-store": "^0.0.6",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"@ui5/webcomponents-tools": "2.0.0-rc.5",
"@ui5/webcomponents-tools": "2.0.0-rc.6",
"@vitejs/plugin-react": "^4.2.0",
"chromatic": "^11.0.0",
"cssnano": "^7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"peerDependencies": {
"@types/react": "*",
"@ui5/webcomponents-base": "2.0.0-rc.5",
"@ui5/webcomponents-base": "2.0.0-rc.6",
"react": "^16.14.0 || ^17 || ^18 || ^19"
},
"peerDependenciesMeta": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"newComponent": "ComboBoxItemGroup"
},
"CustomListItem": {
"newComponent": "ListItemCustom",
"renamedEnums": {
"highlight": "HighlightTypes"
}
Expand Down Expand Up @@ -182,6 +183,17 @@
"mode": "ListMode"
}
},
"ListItemCustom": {
"renamedEnums": {
"highlight": "HighlightTypes"
}
},
"ListItemStandard": {
"renamedEnums": {
"highlight": "HighlightTypes",
"additionalTextState": "ValueState"
}
},
"ListItemGroup": {},
"MediaGallery": {},
"MediaGalleryItem": {},
Expand Down Expand Up @@ -222,8 +234,18 @@
"valueState": "ValueState"
}
},
"MultiComboBoxGroupItem": {},
"MultiComboBoxGroupItem": {
"newComponent": "MultiComboBoxItemGroup",
"changedProps": {
"onOpenChange": "onOpen"
}
},
"MultiComboBoxItem": {},
"MultiComboBoxItemGroup": {
"changedProps": {
"onOpenChange": "onOpen"
}
},
"MultiInput": {
"changedProps": {
"onSuggestionItemPreview": "onSelectionChange"
Expand Down Expand Up @@ -349,7 +371,8 @@
"SideNavigationItem": {
"changedProps": {
"title": "tooltip"
}
},
"removedProps": ["wholeItemToggleable"]
},
"SideNavigationSubItem": {
"changedProps": {
Expand All @@ -363,6 +386,7 @@
"removedProps": ["activeIcon"]
},
"StandardListItem": {
"newComponent": "ListItemStandard",
"renamedEnums": {
"highlight": "HighlightTypes",
"additionalTextState": "ValueState"
Expand Down Expand Up @@ -392,6 +416,37 @@
"removedProps": ["fixed", "showOverflow"]
},
"TabSeparator": {},
"Table": {
"comment": "noDataText is now noData slot",
"changedProps": {
"busy": "loading",
"columns": "headerRow"
},
"removedProps": [
"busyDelay",
"growing",
"growingButtonSubtext",
"growingButtonText",
"mode",
"hideNoData",
"stickyColumnHeader",
"onLoadMore",
"onPopinChange",
"onSelectionChange"
]
},
"TableCell": {},
"TableColumn": {
"newComponent": "TableHeaderCell",
"removedProps": ["demandPopin", "popinDisplay", "popinText"]
},
"TableRow": {
"comment": "type=Interactive becomes interactive=true",
"changedProps": {
"type": "interactive"
},
"removedProps": ["navigated", "selected"]
},
"TextArea": {
"changedProps": {
"growingMaxLines": "growingMaxRows"
Expand Down Expand Up @@ -461,6 +516,9 @@
}
},
"UploadCollectionItem": {},
"VariantManagement": {
"removedProps": ["portalContainer"]
},
"ViewSettingsDialog": {},
"Wizard": {},
"WizardStep": {}
Expand Down Expand Up @@ -572,5 +630,14 @@
"MultiSelect": "Multiple"
}
},
"wrappingTypeComponents": ["Badge", "CheckBox", "Label", "Link", "Title", "RadioButton", "NotificationListItem"]
"wrappingTypeComponents": [
"Badge",
"CheckBox",
"Label",
"Link",
"Title",
"RadioButton",
"NotificationListItem",
"Tag"
]
}
Loading
Loading