-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix(Types): ShorthandCollection #13050
Merged
assuncaocharles
merged 44 commits into
microsoft:master
from
assuncaocharles:fix/type-shorthand
May 21, 2020
Merged
fix(Types): ShorthandCollection #13050
assuncaocharles
merged 44 commits into
microsoft:master
from
assuncaocharles:fix/type-shorthand
May 21, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assuncaocharles
requested review from
dvdzkwsk,
dzearing,
jurokapsiar,
layershifter,
levithomason,
miroslavstastny,
mnajdova and
pompomon
as code owners
May 7, 2020 16:34
msft-github-bot
added
the
Fluent UI react-northstar (v0)
Work related to Fluent UI V0
label
May 7, 2020
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 73cbfd0c0d41af4839d32070f2b6134cc4b3f471 (build) |
export type ShorthandCollection<P, K = Record<string, {}>> = ShorthandValue<
P & { kind?: keyof K } & Partial<K[keyof K]>
>[]; It works, what you think about? |
packages/fluentui/react-northstar/src/components/Dropdown/Dropdown.tsx
Outdated
Show resolved
Hide resolved
…ix/type-shorthand � Conflicts: � packages/fluentui/react-northstar/src/components/Menu/Menu.tsx
@layershifter added the solution we agreed. |
packages/fluentui/docs/src/components/ComponentDoc/ComponentControls/ComponentControls.tsx
Outdated
Show resolved
Hide resolved
layershifter
approved these changes
May 21, 2020
miroslavstastny
pushed a commit
to levithomason/fluentui
that referenced
this pull request
Jun 8, 2020
* fix(Types): fix shorthandCollection Definition * fix(Types): add never * fix(Types): key in keyof * fix(types): shorthand * fix(types): optional * fix(Types): fix shorthandCollection Definition * fix(Types): add never * fix(Types): key in keyof * fix(types): shorthand * fix(types): optional * fix(Types): Partial typ * fix(Types): Fix toolbar usage * fix(Types): remove log * fix(Types): UIComponentProps * fix(Types): Shorthand type * fix(Types): Simplify * Update packages/fluentui/docs/src/examples/components/Toolbar/Performance/CustomToolbar.perf.tsx Co-authored-by: Oleksandr Fediashov <[email protected]> * Revert "Update packages/fluentui/docs/src/examples/components/Toolbar/Performance/CustomToolbar.perf.tsx" This reverts commit 6d1e555. * fix(Types): change type * fix(Types): fix usage * fix(types): fix usage * fix(types): Using PROPS * fix(types): Fix import * fix(types): fix usage * fix(types): fix usage * fix(Types): change default generic * chore(types): fix usage * improve typings in Toolbar * restore Dropdown to master * fix typings issues * prettify example * remove useless object parens * fix(types): kind selector * fix(types): add shorthand value * fix(Types): change items type in example * fix(types): kind optinal * fix(types): fix Co-authored-by: Oleksandr Fediashov <[email protected]> Co-authored-by: Oleksandr Fediashov <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request checklist
$ yarn change
Description of changes
In #1605 was done an update for ShorthandCollection but it was not fully complete:
It's not enough because for kind="divider" we should have ToolbarDividerProps.
This PR implements the proposed solution:
To achieve that the
ShorthandCollection
type had to be changed to:And alternative solution that can better is to create a new type:
And then replace the places where
ShorthandCollection
are used together with kind.Focus areas to test
(optional)
Microsoft Reviewers: Open in CodeFlow
Microsoft Reviewers: Open in CodeFlow