Skip to content

[Lens] Fix value popover spacing#103081

Merged
dej611 merged 6 commits intoelastic:masterfrom
dej611:fix/value_popover
Jun 30, 2021
Merged

[Lens] Fix value popover spacing#103081
dej611 merged 6 commits intoelastic:masterfrom
dej611:fix/value_popover

Conversation

@dej611
Copy link
Copy Markdown
Contributor

@dej611 dej611 commented Jun 23, 2021

Summary

Before:

Screenshot 2021-06-23 at 12 14 54

After:

Screenshot 2021-06-29 at 17 04 47

Screenshot 2021-06-29 at 17 05 28

Previous version Screenshot 2021-06-23 at 14 33 51

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@dej611 dej611 added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:Lens v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Jun 23, 2021
@dej611 dej611 requested a review from a team June 23, 2021 12:37
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@dej611
Copy link
Copy Markdown
Contributor Author

dej611 commented Jun 23, 2021

@elasticmachine merge upstream

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

This solution appears to work, but does not seem like it will scale for all the other inputs we could add in the future. What if we used a CSS sibling selector to do the spacing instead, like the & + & or & > * + * { pattern that is used in a few places?

@dej611 dej611 requested a review from a team as a code owner June 24, 2021 12:47
@dej611
Copy link
Copy Markdown
Contributor Author

dej611 commented Jun 24, 2021

Reimplemented via CSS:

Screenshot 2021-06-24 at 14 47 13

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

Left one comment/question regarding the margin styling.

Comment on lines +4 to +6
.lnsXyToolbar__visualOption + .lnsXyToolbar__visualOption {
margin-top: $euiSizeL;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this style addition necessary? As far as I'm aware, adjacent sibling EuiFormRow components are already styled by EUI to have a margin-top applied (as shown in the screenshot below). If indeed not needed, I suggest removing this style and related class additions.

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For some reason some Spacers have been iteratively added to the popup, in addition to the regular EuiFormRow spacing, until it reached the initial broken state.
This PR was meant to restore a state where Spacers were uniformly distributed.

Looking at other popups in the same UI it appears that they have only the EuiFormRow margin, which you pointed at. It makes more sense to keep only the original EUI spacing, so I'll remove the additional one from the PR.

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

Haven't retested but thanks for doing the CSS solution, hopefully this will be easier to maintain now.

@dej611
Copy link
Copy Markdown
Contributor Author

dej611 commented Jun 29, 2021

@elasticmachine merge upstream

@dej611
Copy link
Copy Markdown
Contributor Author

dej611 commented Jun 29, 2021

Removed any custom spacing and CSS and made EUI do its thing, now popover spacing is consistent within the UI:

Screenshot 2021-06-29 at 17 04 47

Screenshot 2021-06-29 at 17 04 52

@dej611 dej611 requested a review from MichaelMarcialis June 29, 2021 15:09
Copy link
Copy Markdown
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.

Thanks for making those changes, @dej611! LGTM.

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 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.5MB 1.5MB -315.0B

History

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

@dej611 dej611 merged commit 21858a5 into elastic:master Jun 30, 2021
@dej611 dej611 deleted the fix/value_popover branch June 30, 2021 08:06
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 30, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

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

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jun 30, 2021
…-png-pdf-report-type

* 'master' of github.com:elastic/kibana: (178 commits)
  [test] Migrating to kbn_archiver from es_archiver - for the Maps app (elastic#103028)
  [Reporting] Reintroduce "ILM policy for managing reporting indices" (elastic#103850)
  [Security Solution][Endpoint] Allow activity log scrolling on small screens (elastic#103852)
  Allow zero (0) to unset unenroll_timeout field (elastic#103790)
  [TSVB] Metric count is depicted as `-` instead of 0 (elastic#103717)
  [Query] Es query/field base (elastic#103177)
  Remove add data button from nav (elastic#103810)
  Fix telemetry advanced setting style (elastic#103838)
  [Transform] Fix default naming and sorting fields suggestion for `top_metrics` agg (elastic#103690)
  [APM] use conventional error rate color for correlations (elastic#103500)
  Endpoint Telemetry: Agents Metrics + Policy Config / Response (elastic#102171)
  [Alerting] Fixed search results are not updated when search term is removed on Rules and Connectors page (elastic#103663)
  fix too many rernders (elastic#103672)
  [APM] Add “Analyze Data” button (elastic#103485)
  [Lens] Fix value popover spacing (elastic#103081)
  [TSVB] Fix TSVB is not reporting all categories of Elasticsearch error (elastic#102926)
  [SECURITY] Adds security links to doc link service (elastic#102676)
  Update dependency @elastic/charts to v31 (elastic#102078)
  [Security Solution][CTI] Investigation time enrichment UI (elastic#103383)
  Adds ECS guide to doc links service (elastic#102246)
  ...

# Conflicts:
#	x-pack/plugins/reporting/public/share_context_menu/register_pdf_png_reporting.tsx
@spalger spalger added the v7.15.0 label Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.14.0 v7.15.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants