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] Fix delete button position in dimension panel for long labels #69495

Merged
merged 4 commits into from
Jun 26, 2020

Conversation

mbondyra
Copy link
Contributor

Summary

Fixes #69452

Nitpick: The side effect is that highlighting looks a bit off when clicking to trigger dimension popover. @cchaos do you think it's worth to rethink this solution?
image

@mbondyra mbondyra requested a review from a team as a code owner June 18, 2020 12:04
@mbondyra mbondyra added Feature:Lens release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.9.0 v8.0.0 labels Jun 18, 2020
@elasticmachine
Copy link
Contributor

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

@cchaos
Copy link
Contributor

cchaos commented Jun 18, 2020

Now that we can not worry about IE11, you can use :focus-within to color the whole config button.

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.

I'm not sure whether this fix is enough, I tried it with a veryverylong field name and it seems like I can't press the "x":
Screenshot 2020-06-18 at 17 34 28

Maybe we need some overflow: hidden?

To create my test data:

POST testindex/_doc
{
  "veryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryverylongname": 123,
  "s": 123
}

@mbondyra
Copy link
Contributor Author

It only happens for very longs words, but fair point @flash1293, thanks for noticing! Another option would be to add overflow-wrap: break-word:

image

@flash1293
Copy link
Contributor

@mbondyra I actually like that better, otherwise the user might not be able to see what the field is about at all.

It only happens for very longs words

Well, what about "Rechtsschutzversicherungsgesellschaften"? 🇩🇪

@mbondyra
Copy link
Contributor Author

mbondyra commented Jun 18, 2020

Opinion needed:

  1. Hyphens or no hyphens on word break?
  2. @cchaos :focus-within on the component leads to the effect above, as button also gets its own style with half-transparent background on focus. Do you have any idea how to handle it smartly?

Copy link
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

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

  1. Definitely no hyphens. This alters the perception of the name of the fields.
  2. Can you find a way to remove the focus color from the text portion?

@@ -1,6 +1,7 @@
.lnsDimensionPopover {
line-height: 0;
flex-grow: 1;
max-width: calc(100% - 32px);
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to use eui vars for all px values

Suggested change
max-width: calc(100% - 32px);
max-width: calc(100% - ${euiSizeXL});

@mbondyra
Copy link
Contributor Author

@elasticmachine merge upstream

@mbondyra
Copy link
Contributor Author

@cchaos I've tried to remove focus background from the button but the only option is to overwrite internal stylings from the button. I am not a fan of this solution - what if we leave it as in 7.8 styling-wise?
image

We can come back to it at some point, but I don't think it's a part of this PR. When it comes to bug with long labels it's ready to review.

@mbondyra mbondyra requested a review from cchaos June 25, 2020 07:06
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.

There are also minor issues with this in the field list on the left and while dragging, but the dimension trigger looks perfect. LGTM 👍

We can fix that one separately:
Screenshot 2020-06-25 at 18 33 11

@mbondyra
Copy link
Contributor Author

I've corrected it in FIeld Item too, creating an issue would take longer than this 😅 Thanks for headsup!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

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!

@mbondyra
Copy link
Contributor Author

Merging it - visually nothing has changed so I don't think design review is needed. If there's anything else needed, I can address it in the separate PR.

@mbondyra mbondyra merged commit 8448ae8 into elastic:master Jun 26, 2020
@mbondyra mbondyra deleted the lens/fix-long-columns-name branch June 26, 2020 12:58
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jun 26, 2020
* master: (34 commits)
  Upgrade `elliptic` dependency (`6.5.2` → `6.5.3`). (elastic#70054)
  [License Management] Do not break when `telemetry.enabled:false` (elastic#69711)
  [SECURITY] Redirect app/security to app/security/overview (elastic#70005)
  "Explore underlying data" in-chart action (elastic#69494)
  Api reference docs for state_containers and state_sync (elastic#67354)
  prep state transfer for passing embeddables by value to editor and back (elastic#69991)
  move Metrics API to start (elastic#69787)
  refactor: 💡 fix typo in embeddable (elastic#69417)
  [alerting] migrates the old `alerting` consumer to be `alerts` (elastic#69982)
  [APM]Create API to return data to be used on the Overview page (elastic#69137)
  [Lens] Fix delete button position in dimension panel for long labels (elastic#69495)
  [Lens] Add toolbar api (elastic#69263)
  Fixes bug on color picker defaults on TSVB (elastic#69889)
  [DOCS] Fixes wording in Upload a CSV section (elastic#69969)
  [Discover] Validate timerange before submitting query to ES (elastic#69363)
  [Maps] avoid using MAP_SAVED_OBJECT_TYPE constant when defining URL paths (elastic#69723)
  [Maps] Fix icon palettes are not working (elastic#69937)
  [Ingest Manager] Fix typo in constant name (elastic#69919)
  [test] skip status.allowAnonymous tests on cloud (elastic#69017)
  Fix backport (elastic#70003)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Can't delete columns with long unbroken labels
6 participants