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] Move configuration popover to flyout #76046

Merged
merged 29 commits into from
Sep 14, 2020

Conversation

cchaos
Copy link
Contributor

@cchaos cchaos commented Aug 26, 2020

Fixes #75568

This PR changes the Lens configuration popover to be a flyout (contained within the sidebar). It doesn't use EuiFlyout because we want it to be specially positioned. But it does use the EUI flyout mixin to align styling.

Screen Shot 2020-08-26 at 18 07 53 PM

Checklist

Delete any items that are not applicable to this PR.

Comment on lines -158 to +165
isInvalid={Boolean(incompatibleSelectedOperationType && selectedColumnOperationType)}
isInvalid={Boolean(incompatibleSelectedOperationType)}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the info style callout about the field selection missing in favor of now just showing it as invalid if they've already chosen an aggregation. It keeps the content from jumping around with the callout jumping in and out.

Screen Shot 2020-08-26 at 18 36 40 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But what I do need help with is that once the user selects a field, it completely re-renders the flyout, therefore restarting the fly in animation.

Screen Recording 2020-08-26 at 05 20 35 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

Resolved!

Comment on lines 225 to 246
<EuiFormLabel>Choose a function</EuiFormLabel>
<EuiSpacer size="s" />
<EuiListGroup
className={sideNavItems.length > 3 ? 'lnsIndexPatternDimensionEditor__columns' : ''}
gutterSize="none"
listItems={sideNavItems}
maxWidth={false}
/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need to check the a11y of this group. Likely needs to change to some sort of fieldset and legend combo.

Comment on lines -303 to -316
<EuiCallOut
data-test-subj="indexPattern-invalid-operation"
title={i18n.translate('xpack.lens.indexPattern.invalidOperationLabel', {
defaultMessage: 'To use this function, select a different field.',
})}
color="warning"
size="s"
iconType="sortUp"
/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This callout is also gone in favor of helpText on the input itself. Which means the DTS's for both callouts are gone and I'll need help updating the tests.

Screen Shot 2020-08-26 at 19 07 44 PM

@cchaos
Copy link
Contributor Author

cchaos commented Aug 26, 2020

@wylieconlon / @mbondyra : I'll need help fixing the tests on this one. I still have to evaluate a bit of accessibility and browser test, but those should be minimal and shouldn't affect tests. Please feel free to commit directly to this branch.

@dej611
Copy link
Contributor

dej611 commented Sep 2, 2020

I can help with the tests @cchaos

@mbondyra
Copy link
Contributor

mbondyra commented Sep 9, 2020

@cchaos I've submitted a PR with naming changes. Other than that, is this PR still in the draft mode? I'm happy to merge it as it is (after naming changes), I just have one question: is it intentional that the copy for flyout title for non configured dimension is not the same as for the configured one (x-axis vs x-axis configuration)? If so, why is this?

Copy link
Contributor

@mbondyra mbondyra left a comment

Choose a reason for hiding this comment

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

Tested on Firefox and Chrome.
Code looks good to me 🥇
Thanks for a great job!

@cchaos
Copy link
Contributor Author

cchaos commented Sep 9, 2020

Thanks @mbondyra and @dej611 for taking this one forward!

I've submitted a PR with naming changes.

I commented on that PR about the name itself. But I can pull this one out of draft now and see if there's time to merge that one first or do a follow up.

is it intentional that the copy for flyout title for non configured dimension is not the same as for the configured one (x-axis vs x-axis configuration)? If so, why is this?

This was not intentional but an oversight. If you know where that title is can you update it by adding configuration?

@cchaos cchaos added release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v8.0.0 labels Sep 9, 2020
@cchaos cchaos marked this pull request as ready for review September 9, 2020 14:15
@cchaos cchaos requested a review from a team September 9, 2020 14:15
@cchaos cchaos requested a review from a team as a code owner September 9, 2020 14:15
@mbondyra
Copy link
Contributor

mbondyra commented Sep 9, 2020

@elasticmachine merge upstream

@cchaos
Copy link
Contributor Author

cchaos commented Sep 9, 2020

Hey @mbondyra I found some a11y issues that needed fixing, but in turn screwed up the it('should close the DimensionContainer when the active visualization changes') test. Could you have a look at the new useEffect method I'm using in the DimensionContainer?

Copy link
Contributor

@wylieconlon wylieconlon left a comment

Choose a reason for hiding this comment

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

Looking and feeling good! Found a bug, steps to reproduce:

  1. Start from an already-configured XY chart
  2. Click the empty Y axis that isn't configured yet
  3. Once you finish configuring the minimum required fields (just Count, or field + function) the flyout stays in the empty state
  4. When you close the flyout, it reveals that there were actually 2 flyouts: the empty one, and the previously configured dimension

In general, I found that I was really missing the ability to click outside the flyout to close it, like we previously had with the popover. It feels like this is higher-commitment flow because it's harder to close. Maybe I'll get used to it, but if we can bring it back I think we should.

@flash1293
Copy link
Contributor

I pushed a fix for the hidden popover - this should also fix the tests.

@cchaos
Copy link
Contributor Author

cchaos commented Sep 10, 2020

When you close the flyout, it reveals that there were actually 2 flyouts: the empty one, and the previously configured dimension

I'm not really sure how to solve this one as I think it has to do with something outside of the flyout itself.

In general, I found that I was really missing the ability to click outside the flyout to close it, like we previously had with the popover. It feels like this is higher-commitment flow because it's harder to close. Maybe I'll get used to it, but if we can bring it back I think we should.

I totally understand and agree that the extra click can be a bit annoying. However, I do see it as a feature that it stays open as you play with other settings and we don't want to obscure the chart with the mask overlay. One thing I thought about doing is somehow adding a timer that starts when focus leaves the flyout and closes the flyout automatically after like 5 seconds or something.

@flash1293
Copy link
Contributor

@cchaos the first part with the empty flyout is what I fixed earlier today

@cchaos cchaos requested a review from wylieconlon September 10, 2020 18:16
Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Reviewed and looks mostly good to me. The readme (https://github.com/elastic/kibana/blob/9186171ad160ead3fb9ec977f3465904fd293aa0/x-pack/plugins/lens/readme.md) is still referencing the popover, could you update it?

@flash1293
Copy link
Contributor

@elasticmachine merge upstream

@cchaos cchaos requested a review from flash1293 September 14, 2020 19:56
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
lens 433 +18 415

page load bundle size

id value diff baseline
lens 1.0MB +14.6KB 1.0MB

History

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

Copy link
Contributor

@wylieconlon wylieconlon left a comment

Choose a reason for hiding this comment

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

LGTM, tested and couldn't find any issues!

@cchaos cchaos merged commit 5a2f7ae into elastic:master Sep 14, 2020
cchaos added a commit to cchaos/kibana that referenced this pull request Sep 14, 2020
* Moving to a Flyout implementation
* Fix up inner layout of flyout
* Fix up form rows
@cchaos cchaos deleted the lens/config_flyout branch September 14, 2020 22:29
gmmorris added a commit to gmmorris/kibana that referenced this pull request Sep 15, 2020
* master: (25 commits)
  [Security Solution] Add unit tests for Network search strategy (elastic#77416)
  [Alerting] Improves performance of the authorization filter in AlertsClient.find by skipping KQL parsing (elastic#77040)
  [Ingest Manager] Add route for package installation by upload (elastic#77044)
  [APM-UI][E2E] filter PRs from the uptime GH team (elastic#77359)
  [APM] Remove useLocation and some minor route improvements (elastic#76343)
  [Enterprise Search] Update enterpriseSearchRequestHandler to manage range of errors + add handleAPIErrors helper (elastic#77258)
  [SECURITY_SOLUTION] Task/hostname policy response ux updates (elastic#76444)
  Move remaining uses of serviceName away from urlParams (elastic#77248)
  [Lens] Move configuration popover to flyout (elastic#76046)
  [Ingest Manager] Manually build Fleet kuery with Node arguments (elastic#76589)
  skip flaky suite (elastic#59975)
  Neutral-naming in reporting plugin (elastic#77371)
  [Enterprise Search] Add UserIcon styles (elastic#77385)
  [RUM Dashboard] Added loading state to visitor breakdown pie charts (elastic#77201)
  [Ingest Manager] Fix polling for new agent action (elastic#77339)
  Remote cluster - Functional UI test to change the superuser to a test_user with limited role (elastic#77212)
  Stacked headers and navigational search (elastic#72331)
  [ML] DF Analytics creation wizard: Fixing field loading race condition (elastic#77326)
  [Monitoring] Handle no mappings found for sort and collapse fields (elastic#77099)
  Add Lens to Recently Accessed (elastic#77249)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Sep 15, 2020
* master: (293 commits)
  Fix tsvb filter ration for table (elastic#77272)
  [Security Solution] Add unit tests for Network search strategy (elastic#77416)
  [Alerting] Improves performance of the authorization filter in AlertsClient.find by skipping KQL parsing (elastic#77040)
  [Ingest Manager] Add route for package installation by upload (elastic#77044)
  [APM-UI][E2E] filter PRs from the uptime GH team (elastic#77359)
  [APM] Remove useLocation and some minor route improvements (elastic#76343)
  [Enterprise Search] Update enterpriseSearchRequestHandler to manage range of errors + add handleAPIErrors helper (elastic#77258)
  [SECURITY_SOLUTION] Task/hostname policy response ux updates (elastic#76444)
  Move remaining uses of serviceName away from urlParams (elastic#77248)
  [Lens] Move configuration popover to flyout (elastic#76046)
  [Ingest Manager] Manually build Fleet kuery with Node arguments (elastic#76589)
  skip flaky suite (elastic#59975)
  Neutral-naming in reporting plugin (elastic#77371)
  [Enterprise Search] Add UserIcon styles (elastic#77385)
  [RUM Dashboard] Added loading state to visitor breakdown pie charts (elastic#77201)
  [Ingest Manager] Fix polling for new agent action (elastic#77339)
  Remote cluster - Functional UI test to change the superuser to a test_user with limited role (elastic#77212)
  Stacked headers and navigational search (elastic#72331)
  [ML] DF Analytics creation wizard: Fixing field loading race condition (elastic#77326)
  [Monitoring] Handle no mappings found for sort and collapse fields (elastic#77099)
  ...
cchaos added a commit to cchaos/kibana that referenced this pull request Sep 15, 2020
* Moving to a Flyout implementation
* Fix up inner layout of flyout
* Fix up form rows
cchaos added a commit that referenced this pull request Sep 15, 2020
* Moving to a Flyout implementation
* Fix up inner layout of flyout
* Fix up form rows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Move dimension settings to flyout
7 participants