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

🐛 Add tooltip for weight column #1433

Merged
merged 2 commits into from
Oct 5, 2023
Merged

Conversation

ibolton336
Copy link
Member

Screenshot 2023-10-04 at 4 19 00 PM

@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (c5d050a) 41.07% compared to head (91a8a97) 41.07%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1433   +/-   ##
=======================================
  Coverage   41.07%   41.07%           
=======================================
  Files         139      139           
  Lines        4404     4404           
  Branches     1010     1010           
=======================================
  Hits         1809     1809           
  Misses       2583     2583           
  Partials       12       12           
Flag Coverage Δ
client 41.07% <ø> (ø)
server ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

I recommend the style change, but it isn't a blocker.

{...getThProps({ columnKey: "weight" })}
info={{
tooltip:
"This column shows the associated risk weight of an answered question. A red 'X' icon indicates High risk, a yellow warning icon indicates Medium risk, and a green checkmark indicates Low risk.",
Copy link
Member

Choose a reason for hiding this comment

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

Since the tooltip prop can be a ReactNode, I'd rather see a better styled tooltip:

tooltip: (
  <TextContent>
    <Text>This column shows the associated risk weight of an answered question.</Text>
    <List isPlain>
      <ListItem>{getIconByRisk("red")} is High risk</ListItem>
      <ListItem>{getIconByRisk("yellow")} is Medium risk</ListItem>
      <ListItem>{getIconByRisk("green")} is Low risk</ListItem>
    </List>
  </TextContent>
),

Doing some i18n and adding the messages to translation.json would be nice.

Copy link
Member Author

Choose a reason for hiding this comment

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

For some reason this is the result of the tooltip with ReactNode elements
Screenshot 2023-10-05 at 3 00 40 PM

@JustinXHale
Copy link
Member

Screenshot 2023-10-04 at 4 19 00 PM

this looks great

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

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

Given @JustinXHale 's approval, this is ok with me. I still recommend the tooltip content change, but it is not a blocker.

@ibolton336
Copy link
Member Author

image

Signed-off-by: ibolton336 <ibolton@redhat.com>
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.

3 participants