-
Notifications
You must be signed in to change notification settings - Fork 22
refactor(react-components): Change type of uniqueId and buttonType in the entire code #5249
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5249 +/- ##
==========================================
- Coverage 63.85% 63.85% -0.01%
==========================================
Files 1170 1171 +1
Lines 82508 82503 -5
Branches 7404 7401 -3
==========================================
- Hits 52685 52680 -5
Misses 29682 29682
Partials 141 141
🚀 New features to boost your workflow:
|
return this._uniqueId; | ||
} | ||
|
||
public set uniqueId(value: number) { | ||
protected set uniqueId(value: UniqueId) { |
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.
Changed to protected. This should be used with care, so it is better
|
||
export type UniqueId = string; | ||
|
||
export function generateUniqueId(): UniqueId { |
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.
Added this so it is done in the same way for both cases where I use UniqueId
@@ -0,0 +1,7 @@ | |||
export type ButtonType = 'ghost' | 'ghost-destructive' | 'primary'; | |||
|
|||
export type UniqueId = string; |
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 add readability in the code.
return getKey(child); | ||
} | ||
|
||
function getKey(command: BaseCommand): string { |
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 is not needed anymore
@@ -27,11 +27,6 @@ export function getTooltipPlacement(toolbarPlacement: PlacementType): PlacementT | |||
} | |||
} | |||
|
|||
export function getButtonType(command: BaseCommand): ButtonType { |
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.
Not needed anymore
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.
risk review ok
Type of change
Description 📝
uniqueId
is made from Guid (before it was made from a counter)ByttonType
type instead of stringButtonType
andUniqueId
to architecture/utility/types.tsHow has this been tested? 🔍
I relay on the unit tests
Checklist ☑️