From b28a3ba2f88b114ccbbb0e62eeb96e19ea24331a Mon Sep 17 00:00:00 2001 From: jenny-s51 Date: Thu, 23 Feb 2023 09:20:12 -0500 Subject: [PATCH] copy legacy examples to deprecated tab delete examples from legacy dir add todo bump PR feedback, remove title --- .../patternfly-docs/patternfly-docs.source.js | 3 ++- .../TableComposable/examples/ComposableTable.md | 8 ++------ .../components/Table/examples/LegacyTableActions.tsx | 0 .../components/Table/examples/LegacyTableBasic.tsx | 0 .../components/Table/examples/LegacyTableCellWidth.tsx | 0 .../Table/examples/LegacyTableCompoundExpandable.tsx | 0 .../Table/examples/LegacyTableControllingText.tsx | 0 .../Table/examples/LegacyTableEmptyState.tsx | 0 .../Table/examples/LegacyTableExpandable.tsx | 0 .../Table/examples/LegacyTableFavoritable.tsx | 0 .../components/Table/examples/LegacyTableHoverable.tsx | 0 .../components/Table/examples/LegacyTableMisc.tsx | 0 .../Table/examples/LegacyTableSelectable.tsx | 0 .../Table/examples/LegacyTableSelectableRadio.tsx | 0 .../components/Table/examples/LegacyTableSortable.tsx | 0 .../Table/examples/LegacyTableSortableCustom.tsx | 0 .../components/Table/examples/LegacyTableStriped.tsx | 0 .../Table/examples/LegacyTableStripedCustomTr.tsx | 0 .../Table/examples/LegacyTableStripedExpandable.tsx | 0 .../Table/examples/LegacyTableTextModifiers.tsx | 0 .../components/Table/examples/LegacyTableTree.tsx | 0 .../components/Table/examples/Table.md | 10 ++-------- .../src/deprecated/components/Table/index.ts | 1 + 23 files changed, 7 insertions(+), 15 deletions(-) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableActions.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableBasic.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableCellWidth.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableCompoundExpandable.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableControllingText.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableEmptyState.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableExpandable.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableFavoritable.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableHoverable.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableMisc.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableSelectable.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableSelectableRadio.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableSortable.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableSortableCustom.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableStriped.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableStripedCustomTr.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableStripedExpandable.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableTextModifiers.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/LegacyTableTree.tsx (100%) rename packages/react-table/src/{ => deprecated}/components/Table/examples/Table.md (97%) create mode 100644 packages/react-table/src/deprecated/components/Table/index.ts diff --git a/packages/react-docs/patternfly-docs/patternfly-docs.source.js b/packages/react-docs/patternfly-docs/patternfly-docs.source.js index bc6b7998a8c..57657c0f55d 100644 --- a/packages/react-docs/patternfly-docs/patternfly-docs.source.js +++ b/packages/react-docs/patternfly-docs/patternfly-docs.source.js @@ -31,7 +31,8 @@ module.exports = (baseSourceMD, sourceProps) => { // React-table MD sourceMD(path.join(reactTablePath, '/**/TableComposable/examples/*.md'), 'react'); - sourceMD(path.join(reactTablePath, '/**/Table/examples/*.md'), 'react-legacy'); + // TODO: remove this comment from here and the same file in pf-org once deprecation work is complete + // sourceMD(path.join(reactTablePath, '/**/Table/examples/*.md'), 'react-legacy'); sourceMD(path.join(reactTablePath, '/deprecated/components/**/examples/*.md'), 'react-deprecated'); sourceMD(path.join(reactTablePath, '/**/demos/*.md'), 'react-demos'); diff --git a/packages/react-table/src/components/TableComposable/examples/ComposableTable.md b/packages/react-table/src/components/TableComposable/examples/ComposableTable.md index 3a7e08f90a5..87b51b323a6 100644 --- a/packages/react-table/src/components/TableComposable/examples/ComposableTable.md +++ b/packages/react-table/src/components/TableComposable/examples/ComposableTable.md @@ -40,13 +40,9 @@ ouia: true Note: Table lives in its own package at [@patternfly/react-table](https://www.npmjs.com/package/@patternfly/react-table)! -PatternFly has two implementations of a React table. +The `TableComposable` component takes an explicit and declarative approach, and its implementation closely mirrors that of an HTML table. -The first is the newer `TableComposable` component. It takes a more explicit and declarative approach, and its implementation more closely mirrors that of an HTML table. Generally, updates and new feature requests are implemented in the `TableComposable`. - -The second is the original `Table` component. It is configuration based and takes a less declarative and more implicit approach about laying out the table structure, such as the rows and cells within it. The documentation for the older table implementation can be found under the [React legacy](/components/table/react-legacy) tab. - -**For most common use cases, we recommend using `TableComposable`. Both implementations are supported and fully maintained.** +The documentation for the deprecated table implementation can be found under the [React deprecated](/components/table/react-deprecated) tab. It is configuration based and takes a less declarative and more implicit approach to laying out the table structure, such as the rows and cells within it. import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon'; import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon'; diff --git a/packages/react-table/src/components/Table/examples/LegacyTableActions.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableActions.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableActions.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableActions.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableBasic.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableBasic.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableBasic.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableBasic.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableCellWidth.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableCellWidth.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableCellWidth.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableCellWidth.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableCompoundExpandable.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableCompoundExpandable.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableCompoundExpandable.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableCompoundExpandable.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableControllingText.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableControllingText.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableControllingText.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableControllingText.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableEmptyState.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableEmptyState.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableEmptyState.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableEmptyState.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableExpandable.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableExpandable.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableExpandable.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableExpandable.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableFavoritable.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableFavoritable.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableFavoritable.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableFavoritable.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableHoverable.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableHoverable.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableHoverable.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableHoverable.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableMisc.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableMisc.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableMisc.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableMisc.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableSelectable.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableSelectable.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableSelectable.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableSelectable.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableSelectableRadio.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableSelectableRadio.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableSelectableRadio.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableSelectableRadio.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableSortable.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableSortable.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableSortable.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableSortable.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableSortableCustom.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableSortableCustom.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableSortableCustom.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableSortableCustom.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableStriped.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableStriped.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableStriped.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableStriped.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableStripedCustomTr.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableStripedCustomTr.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableStripedCustomTr.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableStripedCustomTr.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableStripedExpandable.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableStripedExpandable.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableStripedExpandable.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableStripedExpandable.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableTextModifiers.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableTextModifiers.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableTextModifiers.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableTextModifiers.tsx diff --git a/packages/react-table/src/components/Table/examples/LegacyTableTree.tsx b/packages/react-table/src/deprecated/components/Table/examples/LegacyTableTree.tsx similarity index 100% rename from packages/react-table/src/components/Table/examples/LegacyTableTree.tsx rename to packages/react-table/src/deprecated/components/Table/examples/LegacyTableTree.tsx diff --git a/packages/react-table/src/components/Table/examples/Table.md b/packages/react-table/src/deprecated/components/Table/examples/Table.md similarity index 97% rename from packages/react-table/src/components/Table/examples/Table.md rename to packages/react-table/src/deprecated/components/Table/examples/Table.md index 371da8d4057..5f90043b53c 100644 --- a/packages/react-table/src/components/Table/examples/Table.md +++ b/packages/react-table/src/deprecated/components/Table/examples/Table.md @@ -6,17 +6,11 @@ propComponents: ['Table', 'TableHeader', 'TableBody', 'ISortBy'] ouia: true --- -# Legacy Table - Note: Table lives in its own package at [@patternfly/react-table](https://www.npmjs.com/package/@patternfly/react-table)! -PatternFly has two implementations of a React table. - -The first is the newer `TableComposable` component. It takes a more explicit and declarative approach, and its implementation more closely mirrors that of an html table. Generally, updates and new feature requests are implemented in the `ComposableTable`. - -The second is the original `Table` component. It is configuration based and takes a less declarative and more implicit approach about laying out the table structure, such as the rows and cells within it. +**This implementation of `Table` has been deprecated. It is no longer supported or maintained.** -**For most common use cases, we recommend using `TableComposable`. Both implementations are supported and fully maintained.** +This deprecated `Table` component is configuration-based and takes a less declarative and more implicit approach to laying out the table structure, such as the rows and cells within it. import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon'; import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon'; diff --git a/packages/react-table/src/deprecated/components/Table/index.ts b/packages/react-table/src/deprecated/components/Table/index.ts new file mode 100644 index 00000000000..8a72944c0e4 --- /dev/null +++ b/packages/react-table/src/deprecated/components/Table/index.ts @@ -0,0 +1 @@ +export * from './'; \ No newline at end of file