-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
chore: replace @fluentui/make-styles with @griffel/core #21320
Changes from all commits
9e8dd22
d3dbe8f
b1d3290
daa6cb6
d2b9747
7e23ff3
5a4de4d
1581cb9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "migrate to use @griffel/core", | ||
"packageName": "@fluentui/babel-make-styles", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "migrate to use @griffel/core", | ||
"packageName": "@fluentui/jest-serializer-make-styles", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "migrate to use @griffel/core", | ||
"packageName": "@fluentui/react-make-styles", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { MakeStylesStyle } from '@fluentui/make-styles'; | ||
import { GriffelStyle } from '@griffel/core'; | ||
import { tokens } from '@fluentui/react-theme'; | ||
|
||
export const createMixin = (rule: MakeStylesStyle): MakeStylesStyle => ({ | ||
export const createMixin = (rule: GriffelStyle): GriffelStyle => ({ | ||
color: tokens.colorBrandBackground, | ||
...rule, | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import { MakeStylesStyle } from '@fluentui/make-styles'; | ||
import { GriffelStyle } from '@griffel/core'; | ||
import { tokens } from '@fluentui/react-theme'; | ||
|
||
export const flexStyles: MakeStylesStyle = { | ||
export const flexStyles: GriffelStyle = { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
}; | ||
|
||
export const gridStyles = (gridGap: string): MakeStylesStyle => ({ | ||
export const gridStyles = (gridGap: string): GriffelStyle => ({ | ||
display: 'grid', | ||
gridRowGap: gridGap, | ||
}); | ||
|
||
export const typography: Record<'text' | 'header', MakeStylesStyle> = { | ||
export const typography: Record<'text' | 'header', GriffelStyle> = { | ||
text: { fontWeight: tokens.fontWeightRegular }, | ||
header: { fontWeight: 'bold' }, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { MakeStylesStyle } from '@fluentui/make-styles'; | ||
import { GriffelStyle } from '@griffel/core'; | ||
|
||
export const sharedStyles: Record<string, MakeStylesStyle> = { | ||
export const sharedStyles: Record<string, GriffelStyle> = { | ||
root: { display: 'flex' }, | ||
container: { display: 'grid' }, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
import * as React from 'react'; | ||
import { createReferenceFromClick, Box, Portal, PositioningProps, usePopper } from '@fluentui/react-northstar'; | ||
import { | ||
ICSSInJSStyle, | ||
createReferenceFromClick, | ||
Box, | ||
Portal, | ||
PositioningProps, | ||
usePopper, | ||
} from '@fluentui/react-northstar'; | ||
|
||
const boxStyles: React.CSSProperties = { | ||
const boxStyles: ICSSInJSStyle = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why were changes to N* necssary ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
border: '1px dashed #ccc', | ||
color: 'blue', | ||
textAlign: 'center', | ||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -1,4 +1,4 @@ | ||||
import { mergeClasses } from '@fluentui/make-styles'; | ||||
import { mergeClasses } from '@fluentui/react-make-styles'; | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These tests should use imports from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't understand, why can't these tests depend on Griffel ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh I see you're wrapping Griffel with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, as we have many packages I will replace them one by one.
It's mistake that there was
They should depend on |
||||
import './index'; | ||||
|
||||
type MergeClassesParams = Parameters<typeof mergeClasses>; | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This perf test should migrate sooner or later to Griffel repo itself.