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

Remove hover_text from Indicator #1282

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Satoshi-Sh
Copy link
Contributor

Related Issue

Fixed #1147

Updates

  • Added div to the Indicator component to capture mouseOver events.

Screenshot

tooltip-demo

Reference

I referred to this link

@trgiangdo trgiangdo added 🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem. labels May 14, 2024
Copy link
Member

@FredLL-Avaiga FredLL-Avaiga 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 afraid that a simple div would force display block ...

orientation={horizontalOrientation ? undefined : "vertical"}
sx={sliderSx}
></Slider>
<div>
Copy link
Member

Choose a reason for hiding this comment

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

I think a span would have less impact of the display ?

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 tried with a span and an empy <> but the tooltip doesn't work.

Do you mean a new test needs to be added to Indicator.spec.tsx?

Copy link
Member

Choose a reason for hiding this comment

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

a simple div like this is not acceptable as it would change the display behavior of the indicator to block: can't put 2 in the same line.
It looks like a tooltip directly on a Mui Slider (as used in indicator) doesn't work because the slider uses the same technique as the tooltip to show it's own different tooltips.
A div with inline display behaves the same as a span ie shows the hover text only below the indicator.
I suppose then that a span is better than nothing but still not great ...
I wonder if we should keep the hover_text all together.
thoughts @FabienLelaquais ?

PS: it looks like the test in Indicator.spec.tsx don't pass anymore ?

@FredLL-Avaiga
Copy link
Member

please update your branch
I guess Indicator.spec.tsx needs change ?

@Satoshi-Sh Satoshi-Sh force-pushed the bug/#1147-fix-hovertext-indicator branch from c36a726 to 52541a5 Compare May 14, 2024 11:45
@FredLL-Avaiga FredLL-Avaiga self-requested a review May 14, 2024 14:16
@FredLL-Avaiga
Copy link
Member

We're having a discussion about this with @FabienLelaquais
We still need to find the right meaning of hover_text for indicator ...
We'll get back here on the beginning of next week

@FredLL-Avaiga
Copy link
Member

Hi @Satoshi-Sh
we've had quite a bit of discussion on this with @FabienLelaquais and we came to the conclusion that hover_text doesn't make sense in the context of indicator.
I'm sorry to say that we want to remove it completely.
Are you still willing to perform this task ?

@Satoshi-Sh
Copy link
Contributor Author

Satoshi-Sh commented May 22, 2024

Sure, I can work on the task of removing the hover_text.

@Satoshi-Sh Satoshi-Sh force-pushed the bug/#1147-fix-hovertext-indicator branch from 52541a5 to 308a42a Compare May 22, 2024 16:27
@Satoshi-Sh Satoshi-Sh changed the title Bug Indicator doesn't show hoverText Remove hover_text from Indicator May 22, 2024
@Satoshi-Sh
Copy link
Contributor Author

I tried to delete the hover_text from the Indicator component. Could you take a look at it? @FredLL-Avaiga

#1147

FredLL-Avaiga
FredLL-Avaiga previously approved these changes May 27, 2024
Copy link
Member

@FredLL-Avaiga FredLL-Avaiga left a comment

Choose a reason for hiding this comment

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

Looks good to me
Could you also remove it in the factory.py file ?
and also add it in the viselements.json file so that it overrides the default description which is in shared ?
I suppose you'll also have to check the indicator.spec.tsx ?

@Satoshi-Sh
Copy link
Contributor Author

Satoshi-Sh commented May 27, 2024

and also add it in the viselements.json file so that it overrides the default description which is in shared ?

I'm not sure about this instruction. What kind of description should I add to hover_text for the indicator?

@FredLL-Avaiga
Copy link
Member

Something like : TODO not implemented

@Satoshi-Sh
Copy link
Contributor Author

I just ran npm test src/components/Taipy/Indicator and it passed. Let me know if there is a proper way to test it.

@FredLL-Avaiga
Copy link
Member

I just ran npm test src/components/Taipy/Indicator and it passed. Let me know if there is a proper way to test it.

Excellent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖰 GUI Related to GUI 💥Malfunction Addresses an identified problem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG- hover_text not showing for indicator
3 participants