-
Notifications
You must be signed in to change notification settings - Fork 190
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(compass-editor): refactor JSON editor actions container into its own component #6441
Conversation
224314b
to
306b116
Compare
@@ -14,3 +14,16 @@ export type CompletionWithServerInfo = { | |||
/** Optional completion description */ | |||
description?: string; | |||
}; | |||
|
|||
export type EditorRef = { |
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.
Moved this here to be able to reference it from both editor.tsx
and actions-container.tsx
without introducing a circular import dependency.
@@ -1537,7 +1468,7 @@ const MultilineEditor = React.forwardRef<EditorRef, MultilineEditorProps>( | |||
className={cx( | |||
multilineEditorContainerStyle, | |||
darkMode && multilineEditorContainerDarkModeStyle, | |||
!!actions.length && multilineEditorContainerWithActionsStyle, | |||
hasActions && multilineEditorContainerWithActionsStyle, |
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.
The actions.length
was actually always > 0
, since we didn't trim the array from false
values that could arise from the copyable
or formattable
being false.
216642b
to
409137a
Compare
409137a
to
fe4442e
Compare
Description
As a preparation for COMPASS-4635 this refactors the JSON editor, extracting the actions container into its own component. This refactor brings no additional features or visual changes.
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes