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

[UIK-2988] Start/stop button and notification in SpinContainer, Spin, Skeleton examples #1914

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 6 additions & 6 deletions semcore/data-table/__tests__/data-table.axe-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,6 @@ test.describe('DataTable', () => {

expect(violations).toEqual([]);
});
test('download status', async ({ page }) => {
const standPath = 'stories/components/data-table/docs/examples/download-status.tsx';
const violations = await checkAxe(page, standPath);

expect(violations).toEqual([]);
});
test('export in image', async ({ page }) => {
const standPath = 'stories/components/data-table/docs/examples/export-in-image.tsx';
const violations = await checkAxe(page, standPath);
Expand Down Expand Up @@ -177,6 +171,12 @@ test.describe('DataTable', () => {

expect(violations).toEqual([]);
});
test('spin container in table', async ({ page }) => {
const standPath = 'stories/components/data-table/docs/examples/spin-container-in-table.tsx';
const violations = await checkAxe(page, standPath);

expect(violations).toEqual([]);
});
test('sorting changing size by columns', async ({ page }) => {
const standPath =
'stories/components/data-table/docs/examples/sorting-changing-size-by-columns.tsx';
Expand Down
2 changes: 1 addition & 1 deletion semcore/data-table/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ describe('DataTable', () => {
await expect(await snapshot(component)).toMatchImageSnapshot(task);
});

test.concurrent('Download status', async ({ task }) => {
test.concurrent('SpinContainer in table', async ({ task }) => {
const component = (
<div style={{ width: 800 }}>
<DataTable data={data} aria-label={'table label'}>
Expand Down
12 changes: 6 additions & 6 deletions stories/components/data-table/docs/DataTable.docs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import CompactExample from './examples/compact';
import CustomRowsRenderingExample from './examples/custom-rows-rendering';
import CustomViewForTableBodyExample from './examples/custom-view-for-table-body';
import CustomizingHeaderExample from './examples/customizing-header';
import DownloadStatusExample from './examples/download-status';
import ExportInImageExample from './examples/export-in-image';
import FixedColumnsExample from './examples/fixed-columns';
import FixedHeaderExample from './examples/fixed-header';
Expand All @@ -28,6 +27,7 @@ import RowsMergingExample from './examples/rows-merging';
import ScrollInTableExample from './examples/scroll-in-table';
import SecondaryTableExample from './examples/secondary-table';
import SkeletonInTableExample from './examples/skeleton-in-table';
import SpinContainerInTableExample from './examples/spin-container-in-table';
import SortingExample from './examples/sorting';
import SortingChangingSizeExample from './examples/sorting-changing-size';
import SortingChangingSizeByColumnsExample from './examples/sorting-changing-size-by-columns';
Expand Down Expand Up @@ -103,10 +103,6 @@ export const CustomizingHeader: Story = {
render: CustomizingHeaderExample,
};

export const DownloadStatus: Story = {
render: DownloadStatusExample,
};

export const ExportInImage: Story = {
render: ExportInImageExample,
};
Expand Down Expand Up @@ -147,6 +143,10 @@ export const SkeletonInTable: Story = {
render: SkeletonInTableExample,
};

export const SpinContainerInTable: Story = {
render: SpinContainerInTableExample,
};

export const Sorting: Story = {
render: SortingExample,
};
Expand All @@ -169,4 +169,4 @@ export const TableInTableWithFixedColumn: Story = {

export const VirtualScrollInTable: Story = {
render: VirtualScrollInTableExample,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ButtonLink } from '@semcore/button';

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Access to cells'}>
<DataTable data={data} aria-label={'Access to cells'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Spin from '@semcore/spin';

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Access to set of cells'}>
<DataTable data={data} aria-label={'Access to set of cells'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Demo = () => {
return (
/* [1] Wrapping the table in the Accordion control component; */
<Accordion value={exapnded} onChange={setExapnded}>
<DataTable data={data} aria-label={'Table title. Accordion inside table'}>
<DataTable data={data} aria-label={'Accordion inside table'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import DataTable from '@semcore/data-table';

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Additional elements'}>
<DataTable data={data} aria-label={'Additional elements'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Demo = () => {
}
`}
</style>
<DataTable data={data} aria-label={'Table title. Additional elements in header'}>
<DataTable data={data} aria-label={'Additional elements in header'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
2 changes: 1 addition & 1 deletion stories/components/data-table/docs/examples/borders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import DataTable from '@semcore/data-table';

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Borders'}>
<DataTable data={data} aria-label={'Borders'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column vBorders>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import DataTable from '@semcore/data-table';

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Column alignment'}>
<DataTable data={data} aria-label={'Column alignment'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' justifyContent='flex-end' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import DataTable from '@semcore/data-table';

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Column expanded'}>
<DataTable data={data} aria-label={'Column expanded'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' wMax={'300px'} />
<DataTable.Column name='kd' children='Difficulty Difficulty' wMax={'85px'} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import DataTable from '@semcore/data-table';

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Column size'}>
<DataTable data={data} aria-label={'Column size'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' wMin={100} flex='1 0 auto' />
<DataTable.Column name='kd' children='KD,%' flex='0' wMin={100} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const data = [

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Columns merging'}>
<DataTable data={data} aria-label={'Columns merging'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
2 changes: 1 addition & 1 deletion stories/components/data-table/docs/examples/compact.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import DataTable from '@semcore/data-table';

const Demo = () => {
return (
<DataTable data={data} compact aria-label={'Table title. Compact'}>
<DataTable data={data} compact aria-label={'Compact'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const cache = new CellMeasurerCache({

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Custom rows rendering'}>
<DataTable data={data} aria-label={'Custom rows rendering'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='tags' children='Tags' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Box, Flex } from '@semcore/flex-box';

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Custom footer cells'}>
<DataTable data={data} aria-label={'Custom footer cells'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { LinkTrigger } from '@semcore/base-trigger';

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Customizing header'}>
<DataTable data={data} aria-label={'Customizing header'}>
<DataTable.Head>
<DataTable.Column
name='keyword'
Expand Down
70 changes: 0 additions & 70 deletions stories/components/data-table/docs/examples/download-status.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const Demo = () => {
</svg>
</div>

<DataTable data={data} aria-label={'Table title. Export in image'} ref={tableRef} w={500}>
<DataTable data={data} aria-label={'Export in image'} ref={tableRef} w={500}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import DataTable from '@semcore/data-table';

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Fixed columns'}>
<DataTable data={data} aria-label={'Fixed columns'}>
<DataTable.Head wMin={1000}>
<DataTable.Column name='keyword' children='Keyword' fixed='left' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Demo = () => {
};
}, [loading]);
return (
<DataTable data={data} aria-label={'Table title. Fixed header with spin overlay'}>
<DataTable data={data} aria-label={'Fixed header with spin overlay'}>
<Box position='sticky' top={0} zIndex={2}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
Expand Down
4 changes: 2 additions & 2 deletions stories/components/data-table/docs/examples/fixed-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Demo = () => {

return (
<>
<DataTable data={data} aria-label={'Table title. Fixed header'}>
<DataTable data={data} aria-label={'Fixed header'}>
<Box position='sticky' top={top} zIndex={2}>
<DataTable.Head wMin={1000}>
<DataTable.Column name='keyword' children='Keyword' />
Expand All @@ -19,7 +19,7 @@ const Demo = () => {
<DataTable.Body />
</DataTable>
<h3>with Scroll.Bar in Header</h3>
<DataTable data={data} aria-label={'Table title. Fixed header'}>
<DataTable data={data} aria-label={'Fixed header with scroll'}>
<Box position='sticky' top={top} zIndex={2}>
<DataTable.Head wMin={1000} withScrollBar>
<DataTable.Column name='keyword' children='Keyword' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import DataTable from '@semcore/data-table';

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Multi level header'}>
<DataTable data={data} aria-label={'Multi level header'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column vBorders wMax={'40%'}>
Expand Down
2 changes: 1 addition & 1 deletion stories/components/data-table/docs/examples/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Demo = () => {

return (
<>
<DataTable data={tableData} aria-label={'Table title. Pagination'}>
<DataTable data={tableData} aria-label={'Pagination'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' justifyContent='left' />
<DataTable.Column name='kd' children='KD,%' justifyContent='right' wMax={68} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const data = [

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Rows grouping'}>
<DataTable data={data} aria-label={'Rows grouping'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import DataTable from '@semcore/data-table';

const Demo = () => {
return (
<DataTable data={data} aria-label={'Table title. Scroll inside'}>
<DataTable data={data} aria-label={'Scroll inside'}>
<DataTable.Head wMin={1000}>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@ import DataTable from '@semcore/data-table';

const Demo = () => {
return (
<DataTable
data={data}
use='secondary'
sort={['kd', 'desc']}
aria-label={'Table title. Secondary'}
>
<DataTable data={data} use='secondary' sort={['kd', 'desc']} aria-label={'Secondary'}>
<DataTable.Head>
<DataTable.Column name='keyword' children='Keyword' />
<DataTable.Column name='kd' children='KD,%' />
Expand Down
Loading
Loading