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

Display the correct introduced event tooltip #2341

Merged

Conversation

zahraaalizadeh
Copy link
Contributor

Prior to this change, when the introduced version in the affected range was 0, the tooltip displayed: "The exact introduced commit is unknown".

This change, updates the html block to be more readable, and displays a more descriptive tooltip based on the type of the range, indicating if it has versions or commits.

resolves: #2336

Sample output for GIT range:
Screenshot 2024-06-25 at 12 31 10 PM

Sample output for other type of ranges:
Screenshot 2024-06-25 at 12 30 53 PM

Copy link
Contributor Author

@zahraaalizadeh zahraaalizadeh left a comment

Choose a reason for hiding this comment

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

I slightly updated the suggested text for the tooltip to get it fit a single line. I'm open to suggestions though.

Comment on lines 235 to 237
<span class="tooltiptext">Unknown commit / All previous commits are affected</span>
{% else -%}
<span class="tooltiptext">Unknown version / All previous versions are affected</span>
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 slightly updated the suggested text for the tooltip to get it fit a single line. With long messages the introduced and fixed rows will be one line apart:
Screenshot 2024-06-25 at 12 17 20 PM

@zahraaalizadeh zahraaalizadeh changed the title Display the correct introduced tooltip Display the correct introduced event tooltip Jun 25, 2024
@another-rex
Copy link
Contributor

I think it's important to have the "introduced" in there, can we change the max-width in the css to make it fit on one line?

Copy link
Contributor Author

@zahraaalizadeh zahraaalizadeh left a comment

Choose a reason for hiding this comment

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

Desktop:
Screenshot 2024-06-26 at 7 19 53 PM

Mobile:
Screenshot 2024-06-26 at 7 19 40 PM

@@ -219,24 +219,26 @@ <h3 class="mdc-layout-grid__cell--span-3">
<dd>
<div class="mdc-layout-grid__inner events">
{% for event in range.events -%}
<div class="mdc-layout-grid__cell--span-3">
<div class="mdc-layout-grid__cell--span-2">
Copy link
Contributor

Choose a reason for hiding this comment

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

Are the layout width changes intentional? I do prefer to keep the width the same here if possible.

Copy link
Contributor Author

@zahraaalizadeh zahraaalizadeh Jun 27, 2024

Choose a reason for hiding this comment

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

@another-rex Ah, yesterday, I had an afternoon brain and tried a few options, but none worked. Just re-tried and now it's been fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-06-27 at 10 38 06 AM

@zahraaalizadeh zahraaalizadeh force-pushed the issue-2336/affected-range-tooltip-text branch from 5b9c8d4 to 3a33842 Compare June 27, 2024 00:46
@another-rex
Copy link
Contributor

Thanks! I think just merging in the main branch should fix the PR check.

Prior to this change, when the introduced version
in the affected range was 0, the tooltip displayed:
"The exact introduced commit is unknown".

This change, updates the html block to be more
readable, and displays a more descriptive tooltip
based on the type of the range, indicating if it has
versions or commits.
@zahraaalizadeh zahraaalizadeh force-pushed the issue-2336/affected-range-tooltip-text branch from 3a33842 to d713932 Compare June 27, 2024 01:39
@another-rex another-rex merged commit e4f0227 into google:master Jun 27, 2024
11 checks passed
@G-Rath G-Rath deleted the issue-2336/affected-range-tooltip-text branch August 20, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect tooltip text on osv.dev when starting affected version is 0
2 participants