-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] Transforms: replace deprecated EuiCodeEditor #108310
[ML] Transforms: replace deprecated EuiCodeEditor #108310
Conversation
Pinging @elastic/ml-ui (:ml) |
bdf539b
to
8df0a85
Compare
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 and just left a couple of comments.
@@ -25,13 +19,9 @@ export const ExpandedRowJsonPane: FC<Props> = ({ json }) => { | |||
<EuiFlexGroup> | |||
<EuiFlexItem> | |||
<EuiSpacer size="s" /> | |||
<EuiCodeEditor | |||
<EuiCodeBlock fontSize="s" language="json" paddingSize="s" style={{ width: '100%' }}> |
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 should add an aria-label
, something like JSON of transform configuration
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 in 80c039b
@@ -25,13 +19,9 @@ export const ExpandedRowJsonPane: FC<Props> = ({ json }) => { | |||
<EuiFlexGroup> | |||
<EuiFlexItem> | |||
<EuiSpacer size="s" /> | |||
<EuiCodeEditor | |||
<EuiCodeBlock fontSize="s" language="json" paddingSize="s" style={{ width: '100%' }}> |
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 there a reason why this doesn't have isCopyable
set? It is set for the DFA one.
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 in 80c039b
.../transform/public/app/sections/create_transform/components/aggregation_list/popover_form.tsx
Outdated
Show resolved
Hide resolved
...ins/transform/public/app/sections/create_transform/components/group_by_list/popover_form.tsx
Outdated
Show resolved
Hide resolved
...ections/create_transform/components/step_define/common/filter_agg/components/editor_form.tsx
Show resolved
Hide resolved
...ections/create_transform/components/step_define/common/filter_agg/components/editor_form.tsx
Show resolved
Hide resolved
Tested the runtime field editor, query/source editor, and pivot agg editor and functionally they all work great. Left a few comments but otherwise LGTM 🎉 |
91e9df1
to
a30a25b
Compare
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Latest changes LGTM 🎉 |
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.
LGTM
Fixing a typo in the code from when the JSON editor was [converted](#108310) from using `EuiCodeEditor` **Before** ![image](https://user-images.githubusercontent.com/22172091/209140230-fcb3fff5-0040-487a-bffc-581a8fe2f4e4.png) **After** ![image](https://user-images.githubusercontent.com/22172091/209140326-98eecef0-d9bf-4145-8342-788b4166b28d.png)
Fixing a typo in the code from when the JSON editor was [converted](elastic#108310) from using `EuiCodeEditor` **Before** ![image](https://user-images.githubusercontent.com/22172091/209140230-fcb3fff5-0040-487a-bffc-581a8fe2f4e4.png) **After** ![image](https://user-images.githubusercontent.com/22172091/209140326-98eecef0-d9bf-4145-8342-788b4166b28d.png) (cherry picked from commit ba06f68)
# Backport This will backport the following commits from `main` to `8.6`: - [[ML] Transforms: Fix transforms JSON display (#147996)](#147996) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"James Gowdy","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-01-09T14:58:56Z","message":"[ML] Transforms: Fix transforms JSON display (#147996)\n\nFixing a typo in the code from when the JSON editor was\r\n[converted](#108310) from using\r\n`EuiCodeEditor`\r\n\r\n**Before**\r\n\r\n![image](https://user-images.githubusercontent.com/22172091/209140230-fcb3fff5-0040-487a-bffc-581a8fe2f4e4.png)\r\n\r\n**After**\r\n\r\n![image](https://user-images.githubusercontent.com/22172091/209140326-98eecef0-d9bf-4145-8342-788b4166b28d.png)","sha":"ba06f687522fed393036ff01d9230f341e37d710","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix",":ml","Feature:Transforms","v8.6.0","v8.7.0"],"number":147996,"url":"https://github.com/elastic/kibana/pull/147996","mergeCommit":{"message":"[ML] Transforms: Fix transforms JSON display (#147996)\n\nFixing a typo in the code from when the JSON editor was\r\n[converted](#108310) from using\r\n`EuiCodeEditor`\r\n\r\n**Before**\r\n\r\n![image](https://user-images.githubusercontent.com/22172091/209140230-fcb3fff5-0040-487a-bffc-581a8fe2f4e4.png)\r\n\r\n**After**\r\n\r\n![image](https://user-images.githubusercontent.com/22172091/209140326-98eecef0-d9bf-4145-8342-788b4166b28d.png)","sha":"ba06f687522fed393036ff01d9230f341e37d710"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/147996","number":147996,"mergeCommit":{"message":"[ML] Transforms: Fix transforms JSON display (#147996)\n\nFixing a typo in the code from when the JSON editor was\r\n[converted](#108310) from using\r\n`EuiCodeEditor`\r\n\r\n**Before**\r\n\r\n![image](https://user-images.githubusercontent.com/22172091/209140230-fcb3fff5-0040-487a-bffc-581a8fe2f4e4.png)\r\n\r\n**After**\r\n\r\n![image](https://user-images.githubusercontent.com/22172091/209140326-98eecef0-d9bf-4145-8342-788b4166b28d.png)","sha":"ba06f687522fed393036ff01d9230f341e37d710"}}]}] BACKPORT--> Co-authored-by: James Gowdy <[email protected]>
Summary
Related meta issue: #107082
Replaces deprecated EuiCodeEditor in Transforms:
Checklist
Delete any items that are not applicable to this PR.
Fixes #41832