-
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: Single Column Wizard. #64436
[ML] Transforms: Single Column Wizard. #64436
Conversation
Pinging @elastic/ml-ui (:ml) |
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.
Overall looks good! Really like the new layout. Just left a couple of comments.
x-pack/plugins/transform/public/app/sections/create_transform/components/wizard/wizard.tsx
Outdated
Show resolved
Hide resolved
<EuiFormRow hasEmptyLabelSpace> | ||
<EuiFlexGroup alignItems="center" justifyContent="spaceBetween"> | ||
<EuiFlexItem grow={false}> | ||
<AdvancedPivotEditorSwitch {...stepDefineForm} /> |
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.
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.
...s/transform/public/app/sections/create_transform/components/step_define/step_define_form.tsx
Show resolved
Hide resolved
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.
Code LGTM ⚡
x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx
Outdated
Show resolved
Hide resolved
...form/public/app/sections/create_transform/components/source_search_bar/source_search_bar.tsx
Outdated
Show resolved
Hide resolved
return aggListNameSplit.some(aggListNamePart => { | ||
aggListNameCheck = | ||
aggListNameCheck === undefined ? aggListNamePart : `${aggListNameCheck}.${aggListNamePart}`; | ||
if (aggListNameCheck === aggName) { | ||
conflicts.push( | ||
i18n.translate('xpack.transform.stepDefineForm.nestedAggListConflictErrorMessage', { | ||
defaultMessage: `Couldn't add configuration '{aggName}' because of a nesting conflict with '{aggListName}'.`, | ||
values: { aggName, aggListName }, | ||
}) | ||
); |
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 don't think it's a good practice when some
method contains a side effect, in this case, push to the collection. Consider using for..of
with break
statement
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.
Good find, this was some older code I copied, changed it in 9d6f488.
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.
just checked, please use loop label names, check https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/break for examples
return groupByListNameSplit.some(groupByListNamePart => { | ||
groupByListNameCheck = | ||
groupByListNameCheck === undefined | ||
? groupByListNamePart | ||
: `${groupByListNameCheck}.${groupByListNamePart}`; | ||
if (groupByListNameCheck === aggName) { | ||
conflicts.push( | ||
i18n.translate('xpack.transform.stepDefineForm.nestedGroupByListConflictErrorMessage', { | ||
defaultMessage: `Couldn't add configuration '{aggName}' because of a nesting conflict with '{groupByListName}'.`, | ||
values: { aggName, groupByListName }, | ||
}) |
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.
same as the comment above
...ugins/transform/public/app/sections/create_transform/components/step_define/hooks/use_agg.ts
Outdated
Show resolved
Hide resolved
...nsform/public/app/sections/create_transform/components/step_define/hooks/use_pivot_config.ts
Outdated
Show resolved
Hide resolved
...nsform/public/app/sections/create_transform/components/step_define/hooks/use_pivot_config.ts
Outdated
Show resolved
Hide resolved
...ns/transform/public/app/sections/create_transform/components/step_define/common/constants.ts
Show resolved
Hide resolved
...rm/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts
Outdated
Show resolved
Hide resolved
...rm/public/app/sections/create_transform/components/step_define/hooks/use_step_define_form.ts
Show resolved
Hide resolved
...ransform/public/app/sections/create_transform/components/step_define/step_define_summary.tsx
Outdated
Show resolved
Hide resolved
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 latest edits and LGTM
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.
Latest changes LGTM! 👍
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Rearranges the layout of the transform wizard pivot configuration step into a single-column. This allows us to have the data grids for source index and pivot preview having the full width. The advanced editors for source query and pivot configuration also cover a wider width.
Summary
<StepDefineForm />
. The code has been rearranged into individual components and hooks. Some optimizations have been added, for exampleReact.memo()
including a custom props compare function avoid a rerender on unrelated changes to the data grids. This optimization is also now available on the analytics results pages.Checklist
Delete any items that are not applicable to this PR.
For maintainers