Skip to content
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

[ILM] Delete phase redesign #89451

Closed
wants to merge 18 commits into from
Closed

Conversation

yuliacech
Copy link
Contributor

@yuliacech yuliacech commented Jan 27, 2021

Summary

Continues the ILM re-design implementation work started in #88671

This PR implements the Delete phase and timing blocks for other phases.

Design changes:

  • Delete phase design changes
  • Bottom blocks on other phases with timing
  • Complete style of active highlight

Code changes:

  • Timing footers provider
  • scss for active highlight
  • infinity icon extracted to a separate file

Screenshots

Active highlight and phase bottom blocks
Screenshot 2021-01-27 at 16 42 23

Delete phase redesign
Screenshot 2021-01-27 at 16 42 33

Checklist

Delete any items that are not applicable to this PR.

@yuliacech yuliacech added Feature:ILM release_note:enhancement Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.12.0 v8.0.0 labels Jan 27, 2021
@yuliacech yuliacech marked this pull request as ready for review January 28, 2021 09:59
@yuliacech yuliacech requested review from a team as code owners January 28, 2021 09:59
@elasticmachine
Copy link
Contributor

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

@yuliacech
Copy link
Contributor Author

@elasticmachine merge upstream

.ilmActivePhaseHighlight__line {
height: 100%;
position: absolute;
border-left: $euiBorderWidthThin solid $euiColorLightShade;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can simply use border-left: $euiBorderThin here.

left: calc((#{$euiSize} - #{$euiBorderWidthThin}) / -2);
height: $euiSize;
width: $euiSize;
border: $euiBorderWidthThin solid $euiColorLightShade;
Copy link
Contributor

Choose a reason for hiding this comment

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

Again border: $euiBorderThin


.ilmActivePhaseHighlight__check {
position: absolute;
top: calc(#{$euiSize} * 1.5);
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this is the same as $euiSizeL and so we can remove the calc() function

&.hotPhase {
&.active {
.ilmActivePhaseHighlight__line {
top: calc(#{$euiSize} * 1.5);
Copy link
Contributor

Choose a reason for hiding this comment

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

Again here, perhaps use simply $euiSizeL

@yuliacech
Copy link
Contributor Author

@elasticmachine merge upstream

@yuliacech
Copy link
Contributor Author

Thanks for your review, @mdefazio ! I added your suggestions to the code, would you please have another look?

@cjcenizal
Copy link
Contributor

cjcenizal commented Jan 28, 2021

Hi @yuliacech this is great progress! I reviewed this and I have some UX feedback, some of which may fall outside the scope of this PR. Please let me know which items you'd like to address separately and I'll move them into a new issue. @mdefazio I'd appreciate hearing your thoughts on this feedback too.

Timeline delete icon looks like a button

I tried to click on this, and I worry that others will too. It offers very similar affordances to the "Delete" icon buttons we have throughout our UIs. As a solution, I'd suggest replacing this with another horizontal strip with the label "Delete" below it.

image

Delete phase background color makes it look like a callout

This background color also causes the child callout to lose its contrast with the containing element. It seems a bit lost in there. As a solution, I'd suggest using a standard panel to contain this phase, same as the other phases.

image

"Set delete age" button UX lacks feedback

When I click this button:

image

It's replaced by this:

image

My first point of confusion is around the wording "Set delete age". What does that mean? It doesn't leverage the terms I use in my head when thinking about deleting data after a phase.

My second pain point was after I clicked it, it disappeared and was replaced by a message about timing. "Data remains in this phase for less than a day." Hm. What happened to the delete stuff? Can I change my mind and go back? The delete phase was added to the bottom of the form, but that was offscreen for me, so seeing stuff disappear when I clicked the button was jarring. It felt irreversible and I didn't know what I had done.

I suggest massaging the copy and the "add delete" / "remove delete" UX. Here's an idea of what I mean.

We can change the label to be "Delete data after this phase" or something like this. This tells me explicitly what I'm opting into.

image

Then when it's clicked, let's show the user a button for removing the delete phase. This way it's trivial to undo the action. We've already taught the user to look here for adding the delete phase and it seems logical that they'd want to look here to remove it. This label's copy could use work, but something like "Keep data in this phase" gets the idea across.

image

Putting the action in the last enabled phase section will allow us to remove the "Remove" button from the top right of the delete phase section, which has the nice side effect of aligning the timing fields with the timing fields of the other phases.

image

a11y issues

It looks like the aria-label for the toggles still says "Activate" after they've been activated. It should change to be "Deactivate", so that people using screen readers can predict what will happen when they click it. I suggest auditing the UI thoroughly to be sure all controls communicate their states accurately in a similar manner.

image

Responsiveness issues

You mentioned this to me earlier so I'm just noting this for completeness. When the screen is narrower, controls in the top right of the phase section wrap uncomfortably, breaking the layout. The phase name and toggle also get pushed down.

I'd suggest replacing the "Settings" button with an EuiAccordion pattern. This will also improve the feedback because it will be clear from the state of the accordion caret whether it's open or closed. This "Settings" button doesn't visually communicate whether the settings are open or not -- you have to have the settings area visible on-screen in order to tell.

image

Another solution would be to move it into the body of the section, below the phase description, and adjust the copy to explicitly state "Show settings" and "Hide settings". This is what we do in the mappings editor.

image

@yuliacech
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
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.

@yuliacech great work! I read through the code and left some comments, none of which are blocking.

I am aware some things are still changing based on feedback, but I just wanted to share my thoughts based on the current state:

  1. I wonder if it would be better to not have this copy in a callout, I feel like the delete phase being in red already draws a lot of attention, the extra callout seems like we are really shouting at the user 😄, perhaps we should reserve the callouts for things that we specifically want to emphasise in the delete phase block like non-existent snapshot policies. I suggest keeping that text in line with other description text we have.

Screenshot 2021-01-29 at 13 46 03

  1. I'd like to add that I think CJ's suggestion regarding the "Set delete age" in the grey blocks sounds like a change that would make this great UI even better. The ability to "Keep data" right after enabling the delete phase seems like a solid way to keep users feeling in control.

height: 100%;

&.hotPhase.active {
border-left-color: $euiColorVis9_behindText;
.ilmActivePhaseHighlight__line {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a question on this pattern I see used fairly consistently, is there a reason we are not using &__line here? Not a blocker, perhaps something someone on the design team may have input on @cchaos

@@ -13,5 +12,6 @@ export { DescribedFormRow, ToggleFieldWithDescribedFormRow } from './described_f
export { FieldLoadingError } from './field_loading_error';
export { ActiveHighlight } from './active_highlight';
export { Timeline } from './timeline';
export { TimingFootersProvider, useTimingFooters } from './timing_footers';
Copy link
Contributor

Choose a reason for hiding this comment

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

nit; I know naming is quite tough here, but I wonder if these would be improved by introducing the word "phase" here. Perhaps "PhaseFooterProvider" ("usePhaseFooter") or "PhaseTimingProvider" ("usePhaseTiming"). Let me know what you think!

...field,
value: singleSelectionArray,
} as any
<EuiFormRow
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like it is a pre-exising issue, but there may be a double EuiFormRow here (this one and ComboBoxField below). Maybe not worth addressing here though.

Comment on lines 25 to 31
const phaseTimings = useMemo(() => {
return calculateRelativeTimingMs(formData);
}, [formData]);

const humanReadableTimings = useMemo(() => normalizeTimingsToHumanReadable(phaseTimings), [
phaseTimings,
]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Currently these functions (calculateRelativeTimingMs, and normalizeTimingsToHumanReadable) are being run twice, once here and once in the timeline.tsx component - for the same data. I wonder if it might be worth creating a separate context for this where all components can share the output of these computations. No need to action any of this here, we can do it as a follow up PR. I have some ongoing work to refactor some of the timeline component and timing computation logic: #89422

);

return (
<UseField path={'_meta.delete.enabled'}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit; for here and elsewhere; we usually write static string props using this pattern:

<UseField path="_meta.delete.enabled">

@myasonik
Copy link
Contributor

Any chance you can proactively add a11y tests to this? (Docs)

Will save you the trouble of having to go back and do this when QA goes through it later and makes a follow up ticket for you but you've forgotten all the context around your work. (Meta with many examples)

ILM tests are already started too!

@yuliacech
Copy link
Contributor Author

@elasticmachine merge upstream

@yuliacech
Copy link
Contributor Author

@elasticmachine merge upstream

@ryankeairns
Copy link
Contributor

@yuliacech and @mdefazio this is exceptional work. I really believe this form design sets the bar, well done.

In a quick pass, I switched to the v8 theme and noticed what appears to be an empty panel:

Screen Shot 2021-02-02 at 12 44 35 PM

@yuliacech
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

merge conflict between base and head

@yuliacech yuliacech requested a review from a team February 4, 2021 14:37
@yuliacech yuliacech requested review from a team as code owners February 4, 2021 14:37
@yuliacech
Copy link
Contributor Author

sorry about the ping, team! Struggling with merge conflicts, will close this PR and open a new one for ILM re-design.

@yuliacech yuliacech closed this Feb 4, 2021
@kibanamachine
Copy link
Contributor

kibanamachine commented Feb 4, 2021

💔 Build Failed

Failed CI Steps

Metrics [docs]

‼️ ERROR: metrics for 9cff1a9 were not reported

History

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

@yuliacech yuliacech added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:enhancement labels Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:ILM release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants