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

[Lens] Revisit flyout fields style from column to row compressed #120103

Merged
merged 11 commits into from
Dec 14, 2021

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Dec 1, 2021

Summary

Fixes #118391
Fixes #103778

Mostly changed field aspect from columnCompressed to rowCompressed with additional refactoring of EuiSpacers, and Top Values Rank direction component.
Updated test to match the new components.

Screenshot 2021-12-01 at 14 25 31

Screenshot 2021-12-01 at 14 25 38

Screenshot 2021-12-01 at 14 23 38

Screenshot 2021-12-01 at 14 23 49

Screenshot 2021-12-01 at 14 23 58

Screenshot 2021-12-01 at 14 24 08

Screenshot 2021-12-01 at 14 24 16

Screenshot 2021-12-01 at 14 24 25

Screenshot 2021-12-01 at 14 24 33

Screenshot 2021-12-01 at 14 24 43

Screenshot 2021-12-01 at 14 24 52

Screenshot 2021-12-01 at 14 25 04

Screenshot 2021-12-01 at 14 25 16

Some questions

  • given the increased space for form fields, would it make sense to move some of the numeric fields - when possible - to range sliders?
    • For instance Top values > Number of values has both min and max defined. But other fields with min/max defined (i.e. Percentile) can apply as well.

cc @MichaelMarcialis

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@dej611 dej611 added Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:skip Skip the PR/issue when compiling release notes Feature:Lens backport:skip This commit does not require backporting v8.1.0 labels Dec 1, 2021
@dej611 dej611 marked this pull request as ready for review December 1, 2021 16:13
@dej611 dej611 requested a review from a team as a code owner December 1, 2021 16:13
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@MichaelMarcialis
Copy link
Contributor

MichaelMarcialis commented Dec 1, 2021

  • given the increased space for form fields, would it make sense to move some of the numeric fields - when possible - to range sliders?

    • For instance Top values > Number of values has both min and max defined. But other fields with min/max defined (i.e. Percentile) can apply as well.

I'd be OK with adding a supporting range slider to the number inputs assuming 1) there is enough space (i.e. using row compressed), 2) the related number inputs do not support an infinite range of numbers (i.e. they have a finite min and max), and 3) the changes made via the slide provide the user direct feedback via representation in visualization. I just want to make sure we're not relying on sliders alone for items that require precision, as the sliders aren't particularly good at that.

@dej611
Copy link
Contributor Author

dej611 commented Dec 1, 2021

I'd be OK with adding a supporting range slider to the number inputs assuming 1) there is enough space (i.e. using row compressed), 2) the related number inputs do not support an infinite range of numbers (i.e. they have a finite min and max), and 3) the changes made via the slide provide the user direct feedback via representation in visualization. I just want to make sure we're not relying on sliders alone for items that require precision, as the sliders aren't particularly good at that.

Agree on all three conditions.

In both Top values > number of values and Percentile cases:

  • the field would show both a range slide and a number input for precision
  • min and max are a finite value.

Will update the PR with the new components.

@mbondyra
Copy link
Contributor

mbondyra commented Dec 2, 2021

This is not caused by your PR, but could you also fix mobile view for the flyout?
Screenshot 2021-12-02 at 11 31 41
We could either overwrite the max-width style to 100%:
Screenshot 2021-12-02 at 11 32 07
or adding to mobile media query .lnsDimensionContainer left: 10vw; to align it to the right.

@dej611 dej611 requested a review from a team as a code owner December 2, 2021 11:55
@dej611
Copy link
Contributor Author

dej611 commented Dec 2, 2021

Fixed the mobile layout for the flyout as proposed by @mbondyra :
Screenshot 2021-12-02 at 12 54 45

Replaced the Percentile numeric input with a range input:

Screenshot 2021-12-02 at 10 41 47

While the idea of replacing the Top values > Number of values sounded nice, when implemented I've realized that:

  • it doesn't look that good for the best practices of having low values
  • it encourages to set higher values for the function

Screenshot 2021-12-02 at 10 23 20

@flash1293
Copy link
Contributor

@dej611 With your additions for mobile does this fix #103778 as well?

@dej611
Copy link
Contributor Author

dej611 commented Dec 2, 2021

@dej611 With your additions for mobile does this fix #103778 as well?

That looks pretty close @mbondyra 's issue. I'll add the z-index thingy to sortout the search bar problem and link the issue in the main description of the PR 🎉

@dej611
Copy link
Contributor Author

dej611 commented Dec 2, 2021

Sorted also the z-index problem with the search bar:

Screenshot 2021-12-02 at 15 09 03

@dej611
Copy link
Contributor Author

dej611 commented Dec 3, 2021

@elasticmachine merge upstream

@mbondyra
Copy link
Contributor

mbondyra commented Dec 3, 2021

Tested on FF and it looks as expected. Approved!

@@ -26,7 +26,7 @@ export function AdvancedOptions(props: {
<>
{popoverOptions.length > 0 && (
<EuiText textAlign="right">
<EuiSpacer size="s" />
{/* <EuiSpacer size="s" /> */}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can it be removed?

Copy link
Contributor

@MichaelMarcialis MichaelMarcialis left a comment

Choose a reason for hiding this comment

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

Great work on this, @dej611. As mentioned in my comment below, I made a quick design PR for the flyout issue on smaller viewport sizes. Once that PR is merged into this branch, that will address my only concerns. Otherwise, this looks good to go. Approving now, assuming you'll be able to merge that design PR in without issue.

* allow flyout to go full width on small viewports

* remove hiding of layer panel when flyout open
@mbondyra
Copy link
Contributor

mbondyra commented Dec 6, 2021

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
lens 1.1MB 1.1MB -2.1KB

History

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

@dej611 dej611 merged commit 7176dd5 into elastic:main Dec 14, 2021
TinLe pushed a commit to TinLe/kibana that referenced this pull request Dec 22, 2021
…stic#120103)

* 💄 Revisit form style + spacers

* ✅ Fix tests

* ✨ Replace percentile input with range

* 💄 Fix mobile layout

* 💄 Make searchbar go below flyout

* 🔥 Remove unused jsx

* [Lens] Refactor Flyout Design Updates (#14)

* allow flyout to go full width on small viewports

* remove hiding of layer panel when flyout open

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Marcialis <michael@marcial.is>
gbamparop pushed a commit to gbamparop/kibana that referenced this pull request Jan 12, 2022
…stic#120103)

* 💄 Revisit form style + spacers

* ✅ Fix tests

* ✨ Replace percentile input with range

* 💄 Fix mobile layout

* 💄 Make searchbar go below flyout

* 🔥 Remove unused jsx

* [Lens] Refactor Flyout Design Updates (elastic#14)

* allow flyout to go full width on small viewports

* remove hiding of layer panel when flyout open

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Marcialis <michael@marcial.is>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.1.0
Projects
None yet
8 participants