Skip to content

[ILM] Change "wait for snapshot" policy text field to EuiCombobox#70627

Merged
yuliacech merged 19 commits intoelastic:masterfrom
yuliacech:wait_for_snapshot_dropdown
Jul 9, 2020
Merged

[ILM] Change "wait for snapshot" policy text field to EuiCombobox#70627
yuliacech merged 19 commits intoelastic:masterfrom
yuliacech:wait_for_snapshot_dropdown

Conversation

@yuliacech
Copy link
Copy Markdown
Contributor

@yuliacech yuliacech commented Jul 2, 2020

Summary

This PR updates "wait for snapshot" text field in Delete phase of an index lifecycle policy to use a EuiCombobox.
Jul-02-2020 19-00-32

Selecting a policy from the list

Screenshot 2020-07-02 at 18 42 39

Input value doesn't match any existing policies

Screenshot 2020-07-02 at 18 42 56

No snapshot policies exist

Screenshot 2020-07-02 at 18 45 05

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)

Screenshot 2020-07-02 at 18 49 10

How to test

  1. Start es locally with a repo path argument: yarn es snapshot -E path.repo=./my_repo_test
  2. Create a repository and several snapshot policies in "Snapshot and Restore" UI
  3. Create or edit an existing ILM policy and activate "Delete phase"

Checklist

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.

@yuliacech yuliacech marked this pull request as ready for review July 2, 2020 16:53
@yuliacech yuliacech requested a review from a team as a code owner July 2, 2020 16:53
@yuliacech yuliacech added Feature:ILM release_note:enhancement Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v7.9.0 v8.0.0 labels Jul 2, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@yuliacech
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@yuliacech yuliacech force-pushed the wait_for_snapshot_dropdown branch from 86eecd9 to 4c6b46a Compare July 3, 2020 09:33
@yuliacech yuliacech force-pushed the wait_for_snapshot_dropdown branch from 4c6b46a to dd5409a Compare July 6, 2020 11:07
@jloleysens jloleysens self-requested a review July 6, 2020 16:01
@jloleysens
Copy link
Copy Markdown
Contributor

@elasticmachine merge upstream

Copy link
Copy Markdown
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. 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.
  2. 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
Screenshot 2020-07-07 at 10 53 11

Let me know what you think!

@yuliacech
Copy link
Copy Markdown
Contributor Author

@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.

  1. I'm trying to figure out why the option list is not shown before the user types anything in. Doesn't seem to be caused by noSuggestions, maybe something with the focus is wrong 🤔
  2. I agree that customPolicy callout might be an overkill but I'm not sure that the hard-coded combo box text "Hit Enter ..." makes sense here either. According to the EUI team, it can't be changed currently.

@jloleysens
Copy link
Copy Markdown
Contributor

I'm trying to figure out why the option list is not shown before the user types anything in. Doesn't seem to be caused by noSuggestions, maybe something with the focus is wrong 🤔

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!

@yuliacech
Copy link
Copy Markdown
Contributor Author

@jloleysens I ended up opening an issue in eui repo, because it does seem like some weird bug/edge case.
I can solve the issue when there is no value, so the options list drops down on click. But when there is any value in the combobox the options will only show after deleting the input or starting typing.
options_list_policies

Copy link
Copy Markdown
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 lockewritesdocs self-requested a review July 7, 2020 15:34
Copy link
Copy Markdown

@lockewritesdocs lockewritesdocs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some suggested revisions to the UI text for these changes.

@yuliacech
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

elasticmachine and others added 2 commits July 8, 2020 05:54
…ections/edit_policy/components/snapshot_policies/snapshot_policies.tsx

Co-authored-by: Adam Locke <adam.locke@elastic.co>
yuliacech and others added 4 commits July 8, 2020 15:02
…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>
@yuliacech
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@yuliacech
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@yuliacech
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@yuliacech
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@yuliacech
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@yuliacech yuliacech merged commit 733f338 into elastic:master Jul 9, 2020
@yuliacech yuliacech deleted the wait_for_snapshot_dropdown branch July 9, 2020 18:37
@yuliacech yuliacech restored the wait_for_snapshot_dropdown branch July 9, 2020 18:37
yuliacech added a commit to yuliacech/kibana that referenced this pull request Jul 9, 2020
…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>
yuliacech added a commit that referenced this pull request Jul 10, 2020
…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>
@yuliacech yuliacech deleted the wait_for_snapshot_dropdown branch July 20, 2020 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:ILM release_note:enhancement Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// v7.9.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants