-
Notifications
You must be signed in to change notification settings - Fork 107
[V12] feat(ui-metric): rework Metric #2240
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
base: v12
Are you sure you want to change the base?
Conversation
|
| ### Upgrade Guide for V12 | ||
|
|
||
| > - theme variable `padding` is now removed, left-right padding can be set now with the `paddingHorizontal` theme variable | ||
| > - theme variable `fontFamily` is now removed, font can be set independently on the value and label elements using the `valueFontFamily` and `labelFontFamily` variables respectively | ||
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.
I put the upgrade guides in the README.md as suggested by Topi, but I can copy these in the Upgrade Guide for Version 12 file started by Matyi
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.
I think these should all the in the same place, the upgrade guide. We dont want to instruct users to open 50+ Readme files.
INSTUI-4838
fffc950 to
4ef79e6
Compare
matyasf
left a comment
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.
see comments
| ### Upgrade Guide for V12 | ||
|
|
||
| > - theme variable `padding` is now removed, left-right padding can be set now with the `paddingHorizontal` theme variable | ||
| > - theme variable `fontFamily` is now removed, font can be set independently on the value and label elements using the `valueFontFamily` and `labelFontFamily` variables respectively | ||
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.
I think these should all the in the same place, the upgrade guide. We dont want to instruct users to open 50+ Readme files.
| ref: Element | null = null | ||
| const styles = useStyle({ | ||
| generateStyle, | ||
| generateComponentTheme, |
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.
generateComponentTheme is no longer used, you can delete it from here and the file too.
| isGroupChild: MetricProps['isGroupChild'] | ||
| themeOverride?: MetricProps['themeOverride'] |
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.
You dont need to supply these 2, they are not used.
| handleRef = (el: Element | null) => { | ||
| this.ref = el | ||
| } | ||
| useImperativeHandle(ref, () => elementRef.current as HTMLDivElement) |
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.
Is this needed for ref? Wont this value returned by default?
| generateComponentTheme, | ||
| componentId: 'MetricGroup', | ||
| displayName: 'MetricGroup' | ||
| }) |
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.
hmm this is not nice, we have to improve useStyle so it can nicely handle style.ts files which have no theme (in a different PR). Can you please put a TODO comment to useStyle that it should be improved to handle generateStyle functions, that dont use params or dont have a theme?
INSTUI-4838
ISSUE:
TEST PLAN: