Skip to content

Commit fd31359

Browse files
authored
docs(compat): update README (#6546)
1 parent c0c5002 commit fd31359

File tree

3 files changed

+6
-33
lines changed

3 files changed

+6
-33
lines changed

docs/ReadMeCompat.mdx

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,11 @@
1-
import { Footer, TableOfContent, FilterBarExample } from '@sb/components';
2-
import { Meta } from '@storybook/blocks';
1+
import { Footer, TableOfContent } from '@sb/components';
2+
import { Markdown, Meta } from '@storybook/blocks';
3+
import ReadMe from '../packages/compat/README.md?raw';
34

45
<Meta title="Legacy Components / Docs" />
56

67
<TableOfContent />
78

8-
# @ui5/webcomponents-react-compat
9-
10-
The `compat` (compatibility) package provides components that were removed in the v2 release but are still available for backwards compatibility.
11-
12-
Some of these components lack accessibility or design support, while others have been replaced by UI5 web components. In general, we recommend using components from this package only as a temporary solution.
13-
14-
## Component Support
15-
16-
Components in this package will not receive any new features. Only critical bugs, that are outside the component's inherent limitations, will be addressed. This package will be maintained until the next major release (which is not currently on our roadmap).
17-
18-
## Installation
19-
20-
```bash
21-
npm install @ui5/webcomponents-react-compat
22-
```
23-
24-
## Importing Components
25-
26-
As the v1 `ui5-table` (`Table`) component is part of this package and some custom element names are equal to the new v2 `ui5-table`, importing components from the root (`import { Table } from "@ui5/webcomponents-react-compat"`) is discouraged.
27-
The primary reason is that tree-shaking capabilities are limited in the default configurations of most bundlers. As a result, custom elements for the v1 table will still be defined, even if only the `Toolbar` is imported. This can cause unexpected behavior if the v2 table is also used in the same app.
28-
29-
**Please only import components from the file path!**
30-
31-
E.g.:
32-
33-
- `import { Table } from '@ui5/webcomponents-react-compat/dist/components/Table/index.js';`
34-
- `import { Toolbar } from '@ui5/webcomponents-react-compat/dist/components/Toolbar/index.js';`
35-
36-
**It is not supported using the v1 `Table` and the v2 `Table` in the same application!**
9+
<Markdown>{ReadMe.split('## Documentation')[0].trim()}</Markdown>
3710

3811
<Footer />

packages/compat/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm install @ui5/webcomponents-react-compat
1717
## Importing Components
1818

1919
As the v1 `ui5-table` (`Table`) component is part of this package and some custom element names are equal to the new v2 `ui5-table`, importing components from the root (`import { Table } from "@ui5/webcomponents-react-compat"`) is discouraged.
20-
The primary reason is that tree-shaking capabilities are limited in the default configurations of most bundlers. As a result, custom elements for the v1 table will still be defined, even if only the `Toolbar` is imported. This can cause unexpected behavior if the v2 table is also used in the same app.
20+
The primary reason is that tree-shaking capabilities are limited in the default configurations of most bundlers in dev mode. As a result, custom elements for the v1 table will still be defined, even if only the `Toolbar` is imported. This can cause unexpected behavior if the v2 table is also used in the same app.
2121

2222
**Please only import components from the file path!**
2323

packages/main/src/webComponents/Button/Button.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Canvas, Markdown, Meta } from '@storybook/blocks';
1+
import { Canvas, Meta } from '@storybook/blocks';
22
import { ControlsWithNote, DocsHeader, Footer } from '@sb/components';
33
import * as ComponentStories from './Button.stories';
44

0 commit comments

Comments
 (0)