Skip to content
Draft
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Avatar Converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Avatar Converged.badgeMask.normal.chromium.png 3 Changed
vr-tests-react-components/CalendarCompat 4 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium.png 654 Changed
vr-tests-react-components/CalendarCompat.multiDayView - Dark Mode.default.chromium.png 2172 Changed
vr-tests-react-components/CalendarCompat.multiDayView - High Contrast.default.chromium.png 2243 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium_1.png 654 Changed
vr-tests-react-components/Charts-DonutChart 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic - Dark Mode.default.chromium.png 7530 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic.default.chromium.png 5581 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png 404 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 15 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 8 Changed
vr-tests-react-components/ProgressBar converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 67 Changed
vr-tests-react-components/TagPicker 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - High Contrast.disabled input hover.chromium.png 1319 Changed
vr-tests-react-components/TagPicker.disabled.disabled input hover.chromium.png 677 Changed

There were 3 duplicate changes discarded. Check the build logs for more information.

"type": "patch",
"comment": "feat: export useTableContextValues_unstable and useTableCellLayoutContextValues_unstable",
"packageName": "@fluentui/react-table",
"email": "dmytrokirpa@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@fluentui/react-spinbutton": "^9.6.0",
"@fluentui/react-spinner": "^9.8.0",
"@fluentui/react-switch": "^9.7.0",
"@fluentui/react-table": "^9.19.14",
"@fluentui/react-tabs": "^9.11.2",
"@fluentui/react-tags": "^9.7.19",
"@fluentui/react-textarea": "^9.7.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
export { DataGrid, renderDataGrid, useDataGrid, useDataGridContextValues } from './components/DataGrid';
export type {
DataGridSlots,
DataGridProps,
DataGridState,
DataGridContextValues,
DataGridFocusMode,
} from './components/DataGrid';

export { DataGridBody, renderDataGridBody, useDataGridBody } from './components/DataGrid';
export type { DataGridBodySlots, DataGridBodyProps, DataGridBodyState, RowRenderFunction } from './components/DataGrid';

export { DataGridHeader, renderDataGridHeader, useDataGridHeader } from './components/DataGrid';
export type { DataGridHeaderSlots, DataGridHeaderProps, DataGridHeaderState } from './components/DataGrid';

export { DataGridHeaderCell, renderDataGridHeaderCell, useDataGridHeaderCell } from './components/DataGrid';
export type { DataGridHeaderCellSlots, DataGridHeaderCellProps, DataGridHeaderCellState } from './components/DataGrid';

export { DataGridRow, renderDataGridRow, useDataGridRow } from './components/DataGrid';
export type { DataGridRowSlots, DataGridRowProps, DataGridRowState, CellRenderFunction } from './components/DataGrid';

export { DataGridCell, renderDataGridCell, useDataGridCell } from './components/DataGrid';
export type {
DataGridCellSlots,
DataGridCellProps,
DataGridCellState,
DataGridCellFocusMode,
} from './components/DataGrid';

export { DataGridSelectionCell, renderDataGridSelectionCell, useDataGridSelectionCell } from './components/DataGrid';
export type {
DataGridSelectionCellSlots,
DataGridSelectionCellProps,
DataGridSelectionCellState,
} from './components/DataGrid';
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
export { Table, renderTable, useTable, useTableContextValues } from './components/Table';
export type { TableSlots, TableProps, TableState, TableContextValues, SortDirection } from './components/Table';

export { TableBody, renderTableBody, useTableBody } from './components/Table';
export type { TableBodySlots, TableBodyProps, TableBodyState } from './components/Table';

export { TableHeader, renderTableHeader, useTableHeader } from './components/Table';
export type { TableHeaderSlots, TableHeaderProps, TableHeaderState } from './components/Table';

export { TableHeaderCell, renderTableHeaderCell, useTableHeaderCell } from './components/Table';
export type { TableHeaderCellSlots, TableHeaderCellProps, TableHeaderCellState } from './components/Table';

export { TableRow, renderTableRow, useTableRow } from './components/Table';
export type { TableRowSlots, TableRowProps, TableRowState } from './components/Table';

export { TableCell, renderTableCell, useTableCell } from './components/Table';
export type { TableCellSlots, TableCellProps, TableCellState } from './components/Table';

export { TableSelectionCell, renderTableSelectionCell, useTableSelectionCell } from './components/Table';
export type { TableSelectionCellSlots, TableSelectionCellProps, TableSelectionCellState } from './components/Table';

export { TableCellActions, renderTableCellActions, useTableCellActions } from './components/Table';
export type { TableCellActionsSlots, TableCellActionsProps, TableCellActionsState } from './components/Table';

export {
TableCellLayout,
renderTableCellLayout,
useTableCellLayout,
useTableCellLayoutContextValues,
} from './components/Table';
export type {
TableCellLayoutSlots,
TableCellLayoutProps,
TableCellLayoutState,
TableCellLayoutContextValues,
} from './components/Table';

export { TableResizeHandle, renderTableResizeHandle, useTableResizeHandle } from './components/Table';
export type { TableResizeHandleSlots, TableResizeHandleProps, TableResizeHandleState } from './components/Table';
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from 'react';
import { render } from '@testing-library/react';
import { isConformant } from '../../testing/isConformant';
import { DataGrid } from './DataGrid';
import { createTableColumn } from '@fluentui/react-table';

const columns = [createTableColumn({ columnId: 'name' })];
const items = [{ name: 'Alice' }];

describe('DataGrid', () => {
isConformant({
Component: DataGrid,
displayName: 'DataGrid',
requiredProps: { columns, items },
});

it('renders with role="grid" by default', () => {
const { getByRole } = render(<DataGrid columns={columns} items={items} />);
expect(getByRole('grid')).toBeInTheDocument();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use client';
import * as React from 'react';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import type { DataGridProps } from './DataGrid.types';
import { useDataGrid, useDataGridContextValues } from './useDataGrid';
import { renderDataGrid } from './renderDataGrid';

export const DataGrid: ForwardRefComponent<DataGridProps> = React.forwardRef((props, ref) => {
const state = useDataGrid(props, ref);
const contextValues = useDataGridContextValues(state);
return renderDataGrid(state, contextValues);
});
DataGrid.displayName = 'DataGrid';
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type {
DataGridSlots as DataGridBaseSlots,
DataGridProps as DataGridBaseProps,
DataGridState as DataGridBaseState,
DataGridContextValues as DataGridBaseContextValues,
DataGridFocusMode,
} from '@fluentui/react-table';

export type DataGridSlots = DataGridBaseSlots;
export type DataGridProps = DataGridBaseProps;
export type DataGridState = DataGridBaseState;
export type DataGridContextValues = DataGridBaseContextValues;
export type { DataGridFocusMode };
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use client';
import * as React from 'react';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import type { DataGridBodyProps } from './DataGridBody.types';
import { useDataGridBody } from './useDataGridBody';
import { renderDataGridBody } from './renderDataGridBody';

export const DataGridBody: ForwardRefComponent<DataGridBodyProps> = React.forwardRef((props, ref) => {
return renderDataGridBody(useDataGridBody(props, ref));
});
DataGridBody.displayName = 'DataGridBody';
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type {
DataGridBodySlots as DataGridBodyBaseSlots,
DataGridBodyProps as DataGridBodyBaseProps,
DataGridBodyState as DataGridBodyBaseState,
RowRenderFunction,
} from '@fluentui/react-table';

export type DataGridBodySlots = DataGridBodyBaseSlots;
export type DataGridBodyProps = DataGridBodyBaseProps;
export type DataGridBodyState = DataGridBodyBaseState;
export type { RowRenderFunction };
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { DataGridBody } from './DataGridBody';
export { useDataGridBody } from './useDataGridBody';
export { renderDataGridBody } from './renderDataGridBody';
export type { DataGridBodySlots, DataGridBodyProps, DataGridBodyState, RowRenderFunction } from './DataGridBody.types';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { renderDataGridBody_unstable } from '@fluentui/react-table';
export const renderDataGridBody = renderDataGridBody_unstable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use client';
import { useDataGridBody_unstable } from '@fluentui/react-table';
export const useDataGridBody = useDataGridBody_unstable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use client';
import * as React from 'react';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import type { DataGridCellProps } from './DataGridCell.types';
import { useDataGridCell } from './useDataGridCell';
import { renderDataGridCell } from './renderDataGridCell';

export const DataGridCell: ForwardRefComponent<DataGridCellProps> = React.forwardRef((props, ref) => {
return renderDataGridCell(useDataGridCell(props, ref));
});
DataGridCell.displayName = 'DataGridCell';
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type {
DataGridCellSlots as DataGridCellBaseSlots,
DataGridCellProps as DataGridCellBaseProps,
DataGridCellState as DataGridCellBaseState,
DataGridCellFocusMode,
} from '@fluentui/react-table';

export type DataGridCellSlots = DataGridCellBaseSlots;
export type DataGridCellProps = DataGridCellBaseProps;
export type DataGridCellState = DataGridCellBaseState;
export type { DataGridCellFocusMode };
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export { DataGridCell } from './DataGridCell';
export { useDataGridCell } from './useDataGridCell';
export { renderDataGridCell } from './renderDataGridCell';
export type {
DataGridCellSlots,
DataGridCellProps,
DataGridCellState,
DataGridCellFocusMode,
} from './DataGridCell.types';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { renderDataGridCell_unstable } from '@fluentui/react-table';
export const renderDataGridCell = renderDataGridCell_unstable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use client';
import { useDataGridCell_unstable } from '@fluentui/react-table';
export const useDataGridCell = useDataGridCell_unstable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use client';
import * as React from 'react';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import type { DataGridHeaderProps } from './DataGridHeader.types';
import { useDataGridHeader } from './useDataGridHeader';
import { renderDataGridHeader } from './renderDataGridHeader';

export const DataGridHeader: ForwardRefComponent<DataGridHeaderProps> = React.forwardRef((props, ref) => {
return renderDataGridHeader(useDataGridHeader(props, ref));
});
DataGridHeader.displayName = 'DataGridHeader';
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type {
DataGridHeaderSlots as DataGridHeaderBaseSlots,
DataGridHeaderProps as DataGridHeaderBaseProps,
DataGridHeaderState as DataGridHeaderBaseState,
} from '@fluentui/react-table';

export type DataGridHeaderSlots = DataGridHeaderBaseSlots;
export type DataGridHeaderProps = DataGridHeaderBaseProps;
export type DataGridHeaderState = DataGridHeaderBaseState;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { DataGridHeader } from './DataGridHeader';
export { useDataGridHeader } from './useDataGridHeader';
export { renderDataGridHeader } from './renderDataGridHeader';
export type { DataGridHeaderSlots, DataGridHeaderProps, DataGridHeaderState } from './DataGridHeader.types';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { renderDataGridHeader_unstable } from '@fluentui/react-table';
export const renderDataGridHeader = renderDataGridHeader_unstable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use client';
import { useDataGridHeader_unstable } from '@fluentui/react-table';
export const useDataGridHeader = useDataGridHeader_unstable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use client';
import * as React from 'react';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import type { DataGridHeaderCellProps } from './DataGridHeaderCell.types';
import { useDataGridHeaderCell } from './useDataGridHeaderCell';
import { renderDataGridHeaderCell } from './renderDataGridHeaderCell';

export const DataGridHeaderCell: ForwardRefComponent<DataGridHeaderCellProps> = React.forwardRef((props, ref) => {
return renderDataGridHeaderCell(useDataGridHeaderCell(props, ref));
});
DataGridHeaderCell.displayName = 'DataGridHeaderCell';
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type {
DataGridHeaderCellSlots as DataGridHeaderCellBaseSlots,
DataGridHeaderCellProps as DataGridHeaderCellBaseProps,
DataGridHeaderCellState as DataGridHeaderCellBaseState,
} from '@fluentui/react-table';

export type DataGridHeaderCellSlots = DataGridHeaderCellBaseSlots;
export type DataGridHeaderCellProps = DataGridHeaderCellBaseProps;
export type DataGridHeaderCellState = DataGridHeaderCellBaseState;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export { DataGridHeaderCell } from './DataGridHeaderCell';
export { useDataGridHeaderCell } from './useDataGridHeaderCell';
export { renderDataGridHeaderCell } from './renderDataGridHeaderCell';
export type {
DataGridHeaderCellSlots,
DataGridHeaderCellProps,
DataGridHeaderCellState,
} from './DataGridHeaderCell.types';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { renderDataGridHeaderCell_unstable } from '@fluentui/react-table';
export const renderDataGridHeaderCell = renderDataGridHeaderCell_unstable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use client';
import { useDataGridHeaderCell_unstable } from '@fluentui/react-table';
export const useDataGridHeaderCell = useDataGridHeaderCell_unstable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use client';
import * as React from 'react';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import type { DataGridRowProps } from './DataGridRow.types';
import { useDataGridRow } from './useDataGridRow';
import { renderDataGridRow } from './renderDataGridRow';

export const DataGridRow: ForwardRefComponent<DataGridRowProps> = React.forwardRef((props, ref) => {
return renderDataGridRow(useDataGridRow(props, ref));
});
DataGridRow.displayName = 'DataGridRow';
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type {
DataGridRowSlots as DataGridRowBaseSlots,
DataGridRowProps as DataGridRowBaseProps,
DataGridRowState as DataGridRowBaseState,
CellRenderFunction,
} from '@fluentui/react-table';

export type DataGridRowSlots = DataGridRowBaseSlots;
export type DataGridRowProps = DataGridRowBaseProps;
export type DataGridRowState = DataGridRowBaseState;
export type { CellRenderFunction };
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { DataGridRow } from './DataGridRow';
export { useDataGridRow } from './useDataGridRow';
export { renderDataGridRow } from './renderDataGridRow';
export type { DataGridRowSlots, DataGridRowProps, DataGridRowState, CellRenderFunction } from './DataGridRow.types';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { renderDataGridRow_unstable } from '@fluentui/react-table';
export const renderDataGridRow = renderDataGridRow_unstable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use client';
import { useDataGridRow_unstable } from '@fluentui/react-table';
export const useDataGridRow = useDataGridRow_unstable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use client';
import * as React from 'react';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import type { DataGridSelectionCellProps } from './DataGridSelectionCell.types';
import { useDataGridSelectionCell } from './useDataGridSelectionCell';
import { renderDataGridSelectionCell } from './renderDataGridSelectionCell';

export const DataGridSelectionCell: ForwardRefComponent<DataGridSelectionCellProps> = React.forwardRef((props, ref) => {
return renderDataGridSelectionCell(useDataGridSelectionCell(props, ref));
});
DataGridSelectionCell.displayName = 'DataGridSelectionCell';
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type {
DataGridSelectionCellSlots as DataGridSelectionCellBaseSlots,
DataGridSelectionCellProps as DataGridSelectionCellBaseProps,
DataGridSelectionCellState as DataGridSelectionCellBaseState,
} from '@fluentui/react-table';

export type DataGridSelectionCellSlots = DataGridSelectionCellBaseSlots;
export type DataGridSelectionCellProps = DataGridSelectionCellBaseProps;
export type DataGridSelectionCellState = DataGridSelectionCellBaseState;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export { DataGridSelectionCell } from './DataGridSelectionCell';
export { useDataGridSelectionCell } from './useDataGridSelectionCell';
export { renderDataGridSelectionCell } from './renderDataGridSelectionCell';
export type {
DataGridSelectionCellSlots,
DataGridSelectionCellProps,
DataGridSelectionCellState,
} from './DataGridSelectionCell.types';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { renderDataGridSelectionCell_unstable } from '@fluentui/react-table';
export const renderDataGridSelectionCell = renderDataGridSelectionCell_unstable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use client';
import { useDataGridSelectionCell_unstable } from '@fluentui/react-table';
export const useDataGridSelectionCell = useDataGridSelectionCell_unstable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
export { DataGrid } from './DataGrid';
export { renderDataGrid } from './renderDataGrid';
export { useDataGrid, useDataGridContextValues } from './useDataGrid';
export type {
DataGridSlots,
DataGridProps,
DataGridState,
DataGridContextValues,
DataGridFocusMode,
} from './DataGrid.types';

export { DataGridBody, renderDataGridBody, useDataGridBody } from './DataGridBody';
export type { DataGridBodySlots, DataGridBodyProps, DataGridBodyState, RowRenderFunction } from './DataGridBody';

export { DataGridHeader, renderDataGridHeader, useDataGridHeader } from './DataGridHeader';
export type { DataGridHeaderSlots, DataGridHeaderProps, DataGridHeaderState } from './DataGridHeader';

export { DataGridHeaderCell, renderDataGridHeaderCell, useDataGridHeaderCell } from './DataGridHeaderCell';
export type { DataGridHeaderCellSlots, DataGridHeaderCellProps, DataGridHeaderCellState } from './DataGridHeaderCell';

export { DataGridRow, renderDataGridRow, useDataGridRow } from './DataGridRow';
export type { DataGridRowSlots, DataGridRowProps, DataGridRowState, CellRenderFunction } from './DataGridRow';

export { DataGridCell, renderDataGridCell, useDataGridCell } from './DataGridCell';
export type { DataGridCellSlots, DataGridCellProps, DataGridCellState, DataGridCellFocusMode } from './DataGridCell';

export { DataGridSelectionCell, renderDataGridSelectionCell, useDataGridSelectionCell } from './DataGridSelectionCell';
export type {
DataGridSelectionCellSlots,
DataGridSelectionCellProps,
DataGridSelectionCellState,
} from './DataGridSelectionCell';
Loading
Loading