Skip to content

fix: Tooltips point in wrong direction#11935#12200

Closed
JessieTeng89 wants to merge 5 commits intoargoproj:masterfrom
fidelity-contributions:fidelity-20230119-153729
Closed

fix: Tooltips point in wrong direction#11935#12200
JessieTeng89 wants to merge 5 commits intoargoproj:masterfrom
fidelity-contributions:fidelity-20230119-153729

Conversation

@JessieTeng89
Copy link
Contributor

fix: Tooltips point in wrong direction
Fixes #11935

Signed-off-by: Teng, Jessie <yilin.teng@fmr.com>
Signed-off-by: Teng <yilin.teng@fmr.com>
@JessieTeng89 JessieTeng89 force-pushed the fidelity-20230119-153729 branch from bbdcd4d to 1b5385a Compare January 29, 2023 14:10
@codecov
Copy link

codecov bot commented Jan 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.44%. Comparing base (b17007b) to head (f68f8e0).
Report is 2534 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #12200   +/-   ##
=======================================
  Coverage   47.44%   47.44%           
=======================================
  Files         246      246           
  Lines       41864    41864           
=======================================
  Hits        19862    19862           
  Misses      20004    20004           
  Partials     1998     1998           

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


const tooltipProps = {
onShow: (instance: any) => {
instance.set({
Copy link
Member

Choose a reason for hiding this comment

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

Is it really not possible to do this in pure css?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jsoref I tried to investigate this again, since this tooltip is using a third-party component, all the styles are controlled by itself, but it can be covered when it is initialized just like the code change in this PR.

But also if you don't want to change any code in javascript, we have another option, we need to add a class name on the container level of the tooltip, and then add media query rules for different screen sizes in css.

Please let me know which way you preferred.

Copy link
Member

Choose a reason for hiding this comment

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

In the long term, at least an issue to the 3rd party so that we could eventually fix this with css would be great.

I'm not able to approve, so I can't say whether the project is ok with your current proposal.

If this were my project and you wrote the update ticket+PR, I'd accept this change in the short term.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jsoref Thanks for your comments, either way is good for me, let me ask the owners' thoughts.

Hi @alexec @rbreeze
Could you please help on this PR? Please find more details below:
The issue the sidebar tooltip width is too large for responsive in small screens(less than 590px), I created the PR to change the tooltip width dynamically when it is initialized, but this needs change the code of javascript.

Another solution is we can add a class name on the container level of the tooltip, and then add media query rules for different screen sizes in css, in this way, we only need to change HTML and CSS.

Could you please leave your comment which way you preferred so this can be merged?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @jsoref that this should be taken care by css. That is the media query way, there are many components which need to be responsive in the UI and it would be best to have a consistent approach for all of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@saumeya Thanks for your suggestion, I will create another PR with media query way to fix this issue.

@saumeya
Copy link
Contributor

saumeya commented Feb 21, 2023

Thanks a lot for the contribution @JessieTeng89 , could you also attach the screenshot of the change in description? Thanks, will review it.

@JessieTeng89
Copy link
Contributor Author

JessieTeng89 commented Nov 28, 2023

Thanks a lot for the contribution @JessieTeng89 , could you also attach the screenshot of the change in description? Thanks, will review it.

Hi, @saumeya @jsoref ,
Can you check following PR to fix this issue with media query way?
#12578

After changed, you can see the result after changed in small window with 500px
image

@jsoref
Copy link
Member

jsoref commented Nov 28, 2023

Looks good to me

@JessieTeng89
Copy link
Contributor Author

Close this PR as another related PR was merged

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.

Tooltips point in wrong direction for narrow window

3 participants