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] Adjust alignment of field errors + timeline icon #104084

Merged
merged 9 commits into from
Jul 30, 2021

Conversation

sabarasaba
Copy link
Member

@sabarasaba sabarasaba commented Jul 1, 2021

Fixes #101378

This PR fixes the alignment of field errors in hot-phase rollover when not using default values and the alignment of the trashcan icon against the timeline.

Screenshots

Screenshot 2021-07-30 at 08 09 34

Screenshot 2021-07-01 at 14 32 37

@sabarasaba sabarasaba added Feature:ILM Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes v7.15.0 v8.0.0 labels Jul 1, 2021
@sabarasaba sabarasaba self-assigned this Jul 1, 2021
@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@sabarasaba sabarasaba requested a review from yuliacech July 1, 2021 12:02
@sabarasaba sabarasaba marked this pull request as ready for review July 1, 2021 12:02
@sabarasaba sabarasaba requested review from a team as code owners July 1, 2021 12:02
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-management (Team:Stack Management)

Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

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

Thanks a lot for fixing this, @sabarasaba!
Checked locally and everything looks great, code changes LGTM too 👍

Copy link
Contributor

@mdefazio mdefazio left a comment

Choose a reason for hiding this comment

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

Looks like there is an extra 2px of top margin on form rows without a label that is causing them to not be fully aligned. Am I right to think this is likely an EUI bug?

@sabarasaba
Copy link
Member Author

sabarasaba commented Jul 4, 2021

@mdefazio Interesting I didn't noticed it when I did the small changes, but you are 100% right they are off by 2px! I tried to replicate it in a codepen to see if it was a EUI bug but seems to be display "correctly" there, but if I try to put the exact same code snippet in kibana the EuiFormRow's are not aligned. Seems the eui form label ends up being 16px of height due to font attributes while in reality it should either be 18px height or the offset of the euiFormRow--hasEmptyLabelSpace should be 2px less than what it is now.

This can be seen in other apps inside kibana, not just in ILM. I'm unsure if this is a kibana or eui problem though, maybe @chandlerprall could shed some light on this?

Group 1

@chandlerprall
Copy link
Contributor

I don't see the 2 pixel offset on master branch, but I do see it when running this PR, even with merging master back in. Looks like it was introduced by these changes.

Copy link
Contributor

@mdefazio mdefazio left a comment

Choose a reason for hiding this comment

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

Screenshot below shows first formRow with flexEnd and the second with flexStart
image

The change to flexStart is what's causing the 2px offset. And I can see why we made the change to accommodate for the invalid fields.

Instead of modifying the CSS on the EUI side, I think we should consider instead using an append with an EuiPopover. You can see an example of it here.

Unfortunately, the use of two form fields was an error in the original mockup that was carried over into dev (totally my fault—didn't see this error coming).

Below is a screenshot of the append usage on my local branch.
image

And here is an updated form mockup that shows all fields with their added 'Append' options (first one showing how the help text will now extend beyond the number input)
image

After writing this, its possible that the button might stand out too much. If this is the case, we could simply apply color="text to the appended button. I think it's a matter of knowing its clickable vs standing out too much.
Example:
image

@mdefazio
Copy link
Contributor

mdefazio commented Jul 9, 2021

Correction on the above, it should be EuiButtonEmpty, not just EuiButton as shown in the EUI doc example.

@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@sabarasaba
Copy link
Member Author

sabarasaba commented Jul 20, 2021

Thanks for the guidance @mdefazio! I was able to make your suggested implementation using the append prop and EuiPopover 💥

Screenshot 2021-07-20 at 13 45 42

@sabarasaba sabarasaba requested a review from mdefazio July 22, 2021 15:06
@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Contributor

@mdefazio mdefazio left a comment

Choose a reason for hiding this comment

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

Thanks for making these changes. One slight nit would be to change the error callout size to small. But not a blocker as it wasn't really the goal of this PR.

Additionally, I think this is probably worth design taking another look at and considering another layout where the inputs aren't so long. (Would someone be entering in a number any larger than 4 numbers typically?). But again, outside of this PR.

@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
indexLifecycleManagement 211 212 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexLifecycleManagement 246.3KB 247.1KB +800.0B

History

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

cc @sabarasaba

Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

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

Looks great, @sabarasaba!
I really like the new design and didn't see any regressions while testing locally.

@sabarasaba sabarasaba merged commit f079775 into elastic:master Jul 30, 2021
sabarasaba added a commit to sabarasaba/kibana that referenced this pull request Jul 30, 2021
* adjust alignment of field errors + timeline icon

* Use options popover instead of two continuous inputs

* Set max row size

* Reduce error callout size to s

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
sabarasaba added a commit that referenced this pull request Jul 30, 2021
…7257)

* adjust alignment of field errors + timeline icon

* Use options popover instead of two continuous inputs

* Set max row size

* Reduce error callout size to s

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
streamich pushed a commit to vadimkibana/kibana that referenced this pull request Aug 8, 2021
* adjust alignment of field errors + timeline icon

* Use options popover instead of two continuous inputs

* Set max row size

* Reduce error callout size to s

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
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.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix small UI nuances in ILM edit policy flow
6 participants