fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

feat: Implement `useTable` state hook

Open ling1726 opened this issue 2 years ago • 4 comments

Implments a useTable state hook to support selection and sort.

Initially I tried this with @tanstack/react-table, but that library is incredibly generic and relies heavily on render functions which I would like to avoid (for now). That library is also enormous because it supports features that are currently not asked for in Fluent UI

image

Addresses #24226

ling1726 avatar Aug 10 '22 20:08 ling1726

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
188.925 kB
51.884 kB
react-components
react-components: FluentProvider & webLightTheme
32.876 kB
10.773 kB
🤖 This report was generated against a0cfab0e5f74e3a3bfa9c269fff574295042d7f2

fabricteam avatar Aug 10 '22 20:08 fabricteam

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 1b3f64a53e9bab430efefc64985c1c18f7d63704:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

codesandbox-ci[bot] avatar Aug 10 '22 20:08 codesandbox-ci[bot]

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: a0cfab0e5f74e3a3bfa9c269fff574295042d7f2 (build)

size-auditor[bot] avatar Aug 10 '22 20:08 size-auditor[bot]

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1275 1267 5000
Button mount 978 970 5000
FluentProvider mount 1593 1586 5000
FluentProviderWithTheme mount 636 633 10
FluentProviderWithTheme virtual-rerender 584 600 10
FluentProviderWithTheme virtual-rerender-with-unmount 624 621 10
MakeStyles mount 1912 1933 50000
SpinButton mount 2513 2507 5000

fabricteam avatar Aug 10 '22 20:08 fabricteam

55kB of JS... wow. good call

Hotell avatar Aug 11 '22 08:08 Hotell