[ILM] Change "wait for snapshot" policy text field to EuiCombobox#70627
[ILM] Change "wait for snapshot" policy text field to EuiCombobox#70627yuliacech merged 19 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
|
@elasticmachine merge upstream |
86eecd9 to
4c6b46a
Compare
4c6b46a to
dd5409a
Compare
|
@elasticmachine merge upstream |
jloleysens
left a comment
There was a problem hiding this comment.
This is looking really good @yuliacech and thanks for the cleanup you did too!
Before approving (everything looks to be mostly in order!) I left a few suggestions and nits (nothing to block on) but just wanted remark on the UX:
- Currently, when clicking in the combobox to start typing the list of available snapshots does not appear. Only when I start typing do the suggestions appear. As a user it would be nice to have all the information before I start typing so that I don't have to try and remember what snapshots policies I currently have. I think this might be caused by use of
noSuggestions. - I really like the addition of the callouts you added, but I think it competes with what the combobox already gives us. If I type in a snapshot policy name that does not match an existing policy I get the screenshot below. This kind of already indicates that I am going off track in terms of policy names and I think the copy in the description already guides the user to the exact use of this field. My inclination is to say that we can remove the callouts and keep just the one that says we could not retrieve any policy names for the autocomplete. Although I think if we are in that position ILM policy page would also not have loaded in the first place 😅
Non-matching policy name output

Let me know what you think!
...s/index_lifecycle_management/__jest__/client_integration/edit_policy/edit_policy.helpers.tsx
Outdated
Show resolved
Hide resolved
...ugins/index_lifecycle_management/__jest__/client_integration/edit_policy/edit_policy.test.ts
Show resolved
Hide resolved
...cle_management/public/application/sections/edit_policy/components/snapshot_policies/index.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/index_lifecycle_management/public/application/services/api.ts
Show resolved
Hide resolved
x-pack/plugins/index_lifecycle_management/public/application/services/api.ts
Outdated
Show resolved
Hide resolved
...ugins/index_lifecycle_management/server/routes/api/snapshot_policies/register_fetch_route.ts
Outdated
Show resolved
Hide resolved
...t/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx
Outdated
Show resolved
Hide resolved
|
@jloleysens Hi Jean-Louis, thank you so much for your detailed review! I agree with your code improvement suggestions and will get esdocs team to have a look at the copy.
|
It might be some edge case bug that we are running into, but they seem to be working as expected here: https://elastic.github.io/eui/#/forms/combo-box. I'm sure the EUI team could help out! |
|
@jloleysens I ended up opening an issue in eui repo, because it does seem like some weird bug/edge case. |
jloleysens
left a comment
There was a problem hiding this comment.
Overall looks good, happy that we could improve the UX of the combobox slightly (did not re-test this though).
It would be good to bring the code a bit more in line with our other patterns per the comments and get copy review from esdocs. Code-wise LGTM.
lockewritesdocs
left a comment
There was a problem hiding this comment.
Added some suggested revisions to the UI text for these changes.
...t/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx
Outdated
Show resolved
Hide resolved
...t/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx
Outdated
Show resolved
Hide resolved
...t/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx
Outdated
Show resolved
Hide resolved
...t/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx
Outdated
Show resolved
Hide resolved
...t/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx
Outdated
Show resolved
Hide resolved
...t/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx
Outdated
Show resolved
Hide resolved
|
@elasticmachine merge upstream |
…ections/edit_policy/components/snapshot_policies/snapshot_policies.tsx Co-authored-by: Adam Locke <adam.locke@elastic.co>
…ections/edit_policy/components/snapshot_policies/snapshot_policies.tsx Co-authored-by: Adam Locke <adam.locke@elastic.co>
…ections/edit_policy/components/snapshot_policies/snapshot_policies.tsx Co-authored-by: Adam Locke <adam.locke@elastic.co>
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
…astic#70627) * [ILM] Change "Wait for snapshot policy" text field to a dropdown in Delete phase * [ILM] Change "wait for snapshot" field to a EuiCombobox and update jest tests * [ILM] Update jest tests to check callouts * [ILM] Implement PR review suggestions * Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx Co-authored-by: Adam Locke <adam.locke@elastic.co> * Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx Co-authored-by: Adam Locke <adam.locke@elastic.co> * Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx Co-authored-by: Adam Locke <adam.locke@elastic.co> * [ILM] Fix copy * [ILM] Fix copy * [ILM] Fix build error * [ILM] Delete periods in callout titles Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Adam Locke <adam.locke@elastic.co>
…0627) (#71293) * [ILM] Change "Wait for snapshot policy" text field to a dropdown in Delete phase * [ILM] Change "wait for snapshot" field to a EuiCombobox and update jest tests * [ILM] Update jest tests to check callouts * [ILM] Implement PR review suggestions * Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx Co-authored-by: Adam Locke <adam.locke@elastic.co> * Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx Co-authored-by: Adam Locke <adam.locke@elastic.co> * Update x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/snapshot_policies/snapshot_policies.tsx Co-authored-by: Adam Locke <adam.locke@elastic.co> * [ILM] Fix copy * [ILM] Fix copy * [ILM] Fix build error * [ILM] Delete periods in callout titles Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Adam Locke <adam.locke@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Adam Locke <adam.locke@elastic.co>

Summary
This PR updates "wait for snapshot" text field in Delete phase of an index lifecycle policy to use a EuiCombobox.

Selecting a policy from the list
Input value doesn't match any existing policies
No snapshot policies exist

In the next PR, I will add a link to the words "snapshot policies" that navigates to SLM.Error loading policies (with a reload button)
How to test
yarn es snapshot -E path.repo=./my_repo_testChecklist
Delete any items that are not applicable to this PR.
Release Note
We updated the snapshot policy name field in Delete phase of index lifecycle policy. This component now display a list of existing snapshot policies and warns the user if their input doesn't match any existing policies.