Skip to content
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

feat: Deprecated Table in Main #2344

Merged
merged 2 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
5 changes: 5 additions & 0 deletions modules/docs/mdx/10.0-UPGRADE_GUIDE.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ any questions.
- [useBanner](#useBanner)
- [Deprecations](#deprecations)
- [InputIconContainer](#input-icon-container)
- [Table](#table)
- [Token Updates](#token-updates)
- [Space and Depth](#space-and-depth)
- [Component Updates](#component-updates)
Expand Down Expand Up @@ -70,6 +71,10 @@ and browsers can compute the name of the Banner from the text given inside.
We've deprecated `InputIconContainer` from [Main](#main) because it doesn't handle
bidirectionality or icons at the start of an input. Please consider using [`InputGroup`](https://workday.github.io/canvas-kit/?path=/story/components-inputs-text-input--icons) instead.

### Table

We've deprecated `Table`, `TableRow` components and all of their exported members. Please consider using [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) instead as it is more flexible and modern.
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved

## Token Updates

### Space and Depth
Expand Down
5 changes: 5 additions & 0 deletions modules/react/table/lib/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ const TableComponent = styled('table')(type.levels.subtext.large, {
},
});

/**
* ### ⚠️ `Table` has been deprecated and will be removed in a future major version. ⚠️
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved
* - Please consider using [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in Preview.
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved
* @deprecated
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved
*/
export class Table extends React.Component<React.TableHTMLAttributes<HTMLTableElement>> {
public render() {
const {children, ...elemProps} = this.props;
Expand Down
15 changes: 15 additions & 0 deletions modules/react/table/lib/TableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import {colors, space, spaceNumbers, statusColors} from '@workday/canvas-kit-rea
import {createComponent, StyledType} from '@workday/canvas-kit-react/common';
import {borderColor, borderWidth, cellBorder} from './Table';

/**
* ### ⚠️ `Table` has been deprecated and will be removed in a future major version. ⚠️
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved
* - Please consider using [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in Preview.
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved
* @deprecated
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved
*/
export enum TableRowState {
Error,
Alert,
Expand All @@ -14,6 +19,11 @@ export enum TableRowState {
Selected,
}

/**
* ### ⚠️ `Table` has been deprecated and will be removed in a future major version. ⚠️
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved
* - Please consider using [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in Preview.
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved
* @deprecated
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved
*/
export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
/**
* The state of the TableRow. Accepts `Error`, `Alert`, `InputError`, `InputAlert`, `Hover`, or `Selected`.
Expand Down Expand Up @@ -192,6 +202,11 @@ const StyledTableRow = styled('tr')<TableRowProps>(
}
);

/**
* ### ⚠️ `Table` has been deprecated and will be removed in a future major version. ⚠️
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved
* - Please consider using [`Table`](https://workday.github.io/canvas-kit/?path=/docs/preview-table--basic) in Preview.
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved
* @deprecated
mannycarrera4 marked this conversation as resolved.
Show resolved Hide resolved
*/
export const TableRow = createComponent('tr')({
displayName: 'TableRow',
Component: (
Expand Down
Loading