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: autocontrolled useTable hook #24688

Merged
merged 8 commits into from
Sep 8, 2022

Conversation

ling1726
Copy link
Member

@ling1726 ling1726 commented Sep 7, 2022

useTable hook now supports autoncontrolling sort and selection states

Current Behavior

useTable is completely uncontrolled

New Behavior

useTable can be controlled and uncontrolled, added extra stories to that effect

Related Issue(s)

Addresses #24226

`useTable` hook now supports autoncontrolling sort and selection states
@fabricteam
Copy link
Collaborator

fabricteam commented Sep 7, 2022

📊 Bundle size report

Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
189.372 kB
52.027 kB
react-components
react-components: FluentProvider & webLightTheme
33.317 kB
10.983 kB
🤖 This report was generated against 4c31b27421360e80d8435235092a634a67b0418a

@fabricteam
Copy link
Collaborator

fabricteam commented Sep 7, 2022

Perf Analysis (@fluentui/react-components)

No significant results to display.

All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 1325 1260 5000
Button mount 959 940 5000
FluentProvider mount 1527 1552 5000
FluentProviderWithTheme mount 635 628 10
FluentProviderWithTheme virtual-rerender 592 589 10
FluentProviderWithTheme virtual-rerender-with-unmount 631 560 10
MakeStyles mount 1819 1776 50000
SpinButton mount 2431 2439 5000

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 7, 2022

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 6537229:

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

@size-auditor
Copy link

size-auditor bot commented Sep 7, 2022

Asset size changes

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

Baseline commit: 4c31b27421360e80d8435235092a634a67b0418a (build)

@ling1726 ling1726 marked this pull request as ready for review September 7, 2022 08:06
@ling1726 ling1726 requested a review from a team as a code owner September 7, 2022 08:06

defaultSortState?: SortState;
};
export type TableProps = ComponentProps<TableSlots> & {} & Partial<TableContextValue>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
export type TableProps = ComponentProps<TableSlots> & {} & Partial<TableContextValue>;
export type TableProps = ComponentProps<TableSlots> & Partial<TableContextValue>;

Do we need this {}? 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

nope

@ling1726 ling1726 merged commit 5732895 into microsoft:master Sep 8, 2022
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Sep 9, 2022
* master: (63 commits)
  feat: add helper types to assist DOM element handling (microsoft#24722)
  applying package updates
  Textarea/hc bug (microsoft#24701)
  Fix null ref in use slider (microsoft#24728)
  Add Field unit tests, and remove snapshot tests (microsoft#24706)
  Stress Test: add build commands (microsoft#24575)
  Coachmark - useOffsetHeight should cause re-render on each set state to match v7 functionality (microsoft#24702)
  Implement screener tests for Field components (microsoft#24684)
  Update Field types to clean up react-field.api.md (microsoft#24703)
  fix(Popup): remove rotate(360deg) from PopupContent content styles (microsoft#24432)
  fix(FocusZone): should reset tabindex when focus is outside the zone with prop `shouldResetActiveElementWhenTabFromZone` (microsoft#24463)
  Fix greyed out legend key contrast ratio (microsoft#24714)
  fix: Portal compat should apply `focus-visible` ponyfill (microsoft#24712)
  Fix artifact error (microsoft#24717)
  chore(react-dialog): remove localShorthands in favor of griffel shorthands (microsoft#24715)
  Skip screener checks for draft PRs with exception of appropriately la… (microsoft#24694)
  fix: Remove provider classname from focus styles (microsoft#24710)
  feat: autocontrolled `useTable` hook (microsoft#24688)
  feat: add dialog properties to getNativeElementProps (microsoft#24698)
  Using migrate rather than upgrade term (microsoft#24695)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants