-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(react-swatch-picker): fixes after bug bash #31097
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
Merged
ValentinaKozlova
merged 6 commits into
microsoft:master
from
ValentinaKozlova:fix/swatch-picker-bug-bash
Apr 19, 2024
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
867ba9a
fix(react-swatch-picker): fixes after bug bash
ValentinaKozlova 42f4993
updated api
ValentinaKozlova 012879e
change files
ValentinaKozlova 5b86ead
Update change/@fluentui-react-swatch-picker-preview-6246310c-e802-4b7…
ValentinaKozlova 72e6c1c
Update change/@fluentui-react-swatch-picker-preview-6246310c-e802-4b7…
ValentinaKozlova e0534fc
Merge branch 'master' into fix/swatch-picker-bug-bash
ValentinaKozlova File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-swatch-picker-preview-6246310c-e802-4b75-a4dd-6aa211c022b9.json
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "minor", | ||
| "comment": "fix: BREAKING CHANGE - api changes and fixes", | ||
| "packageName": "@fluentui/react-swatch-picker-preview", | ||
| "email": "vkozlova@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
25 changes: 15 additions & 10 deletions
25
...t-swatch-picker-preview/src/components/SwatchPickerRow/useSwatchPickerRowStyles.styles.ts
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,37 @@ | ||
| import { makeResetStyles, mergeClasses } from '@griffel/react'; | ||
| import { makeResetStyles, mergeClasses, makeStyles } from '@griffel/react'; | ||
| import type { SlotClassNames } from '@fluentui/react-utilities'; | ||
| import type { SwatchPickerRowSlots, SwatchPickerRowState } from './SwatchPickerRow.types'; | ||
|
|
||
| export const swatchPickerCSSVars = { | ||
| rowGap: `--fui-SwatchPicker--rowGap`, | ||
| }; | ||
|
|
||
| const { rowGap } = swatchPickerCSSVars; | ||
|
|
||
| export const swatchPickerRowClassNames: SlotClassNames<SwatchPickerRowSlots> = { | ||
| root: 'fui-SwatchPickerRow', | ||
| }; | ||
|
|
||
| /** | ||
| * Styles for the root slot | ||
| */ | ||
| const useStyles = makeResetStyles({ | ||
| const useResetStyles = makeResetStyles({ | ||
| display: 'flex', | ||
| flexDirection: 'row', | ||
| columnGap: `var(${rowGap})`, | ||
| }); | ||
|
|
||
| const useStyles = makeStyles({ | ||
| spacingSmall: { | ||
| columnGap: '2px', | ||
| }, | ||
| spacingMedium: { | ||
| columnGap: '4px', | ||
| }, | ||
| }); | ||
|
|
||
| /** | ||
| * Apply styling to the SwatchPickerRow slots based on the state | ||
| */ | ||
| export const useSwatchPickerRowStyles_unstable = (state: SwatchPickerRowState): SwatchPickerRowState => { | ||
| const resetStyles = useResetStyles(); | ||
| const styles = useStyles(); | ||
| state.root.className = mergeClasses(swatchPickerRowClassNames.root, styles, state.root.className); | ||
| const spacingStyle = state.spacing === 'small' ? styles.spacingSmall : styles.spacingMedium; | ||
|
|
||
| state.root.className = mergeClasses(swatchPickerRowClassNames.root, resetStyles, spacingStyle, state.root.className); | ||
|
|
||
| return state; | ||
| }; |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.