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
Refactoring EditorAction #10894
Refactoring EditorAction #10894
Conversation
|
I think the code climate error might be a false positive. |
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.
Looking good @Rafi993. A small change request.
|
|
||
| const { moreConfigShowing } = this.state; | ||
| const toggleMoreConfig = useCallback( |
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.
refactor (blocking): useCallback seems overkill here. For context, see When to useMemo and useCallback.
| onConfigChange, | ||
| submitting, | ||
| } = this.props; | ||
| const v1 = version === 'v1'; |
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.
nitpick (non-blocking): consider naming these isVersion1 and isVersion2.
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.
Tested this locally and it LGTM. 🚀
Thank you @nickytonline |
What type of PR is this?
Description
Refactoring editor actions
Related Tickets & Documents
closes #10947
QA Instructions, Screenshots, Recordings
Added tests?
Added to documentation?