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

fix: set default max-width: 40ch on the tooltip overlay #4833

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

web-padawan
Copy link
Member

Description

Fixes #4815

Type of change

  • Bugfix

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@jouni
Copy link
Member

jouni commented Oct 25, 2022

I noticed now, as the screenshot has two lines, that we should reduce the line height in Lumo. I changed that in #4837

@sissbruecker sissbruecker merged commit 3e102cd into master Oct 25, 2022
@sissbruecker sissbruecker deleted the fix/tooltip-max-width branch October 25, 2022 14:09
sissbruecker pushed a commit that referenced this pull request Oct 25, 2022
@@ -10,6 +10,10 @@ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themab
registerStyles(
'vaadin-tooltip-overlay',
css`
[part='overlay'] {
max-width: 40ch;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm probably really pedantic but should there be some upper bound as well to make sure it doesn't have the full width on mobile / smaller / zoomed view ports? Like using 90% as well like Rolf had in his original idea?

Copy link
Member

Choose a reason for hiding this comment

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

I assume the re is a "safe area" around the overlay already, so there shouldn't be a need to limit the width, as it will never be 100% wide.

Copy link
Contributor

Choose a reason for hiding this comment

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

Quick test on the sample in docs (without this max-width) does seem to indicate that, yes
image

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch! Thanks 🙇‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply a max-width to Tooltips
6 participants