Skip to content

Migrate all popover and tooltip#1708

Merged
thesocialdev merged 5 commits intostagefrom
Change-all-popover-and-tooltip
Jan 15, 2025
Merged

Migrate all popover and tooltip#1708
thesocialdev merged 5 commits intostagefrom
Change-all-popover-and-tooltip

Conversation

@LuizFNJ
Copy link
Collaborator

@LuizFNJ LuizFNJ commented Jan 15, 2025

Description

In this PR, I replaced all the avatars, tooltips, and popovers from Ant Design to MUI. I also replaced some Col, Row, Divider, and Typography components that were together and hadn’t been replaced yet.

Where the Ant Design popover was used on the platform solely to display informational messages without user interaction, and which was triggered on hover, I decided to use the MUI Material tooltip, defining two types within this component (a styled one and a standard one). When calling the component, the developer can specify which one to use in the props.

Where the popover with user interaction was used and triggered by a click, I replaced it with the MUI Material popover, implementing the functionality manually. I grouped this into a component to be reused wherever necessary.

The SentencePopover component no longer exists, and its functionality has been moved to ClaimSentence, where it was originally called, but now using InfoTooltip.tsx.

Does it make sense?

Testing

To test the tooltip components, you should hover the mouse over the child component and check if the message appears. The popover should be triggered by a user click. Avatars, Col, Row, Divider, and Typography should be tested more for the visual aspect. I’m creating a document with screenshots to make the testing process easier.

components:

A visual document outlining which visual parts of the site are intended to facilitate testing:
teste popover e tooltips.pdf

closes #1502 closes #1529 closes #1539 closes #1555 closes #1563 closes #1564 closes #1569 closes #1638 closes #1667 closes #1695 closes #1696 closes #1697 closes #1698 closes #1699 closes #1700 closes #1701 closes #1702 closes #1703 closes #1707

@LuizFNJ LuizFNJ requested a review from thesocialdev as a code owner January 15, 2025 01:17
@LuizFNJ
Copy link
Collaborator Author

LuizFNJ commented Jan 15, 2025

There was a style change that came by default with the library. I can replicate the old style if necessary. Is it necessary?
before:
Screenshot from 2025-01-14 23-12-40
after:
Screenshot from 2025-01-14 23-12-01

@LuizFNJ LuizFNJ force-pushed the Change-all-popover-and-tooltip branch from 6e4e7d7 to fd01b85 Compare January 15, 2025 17:40
@sonarqubecloud
Copy link

@thesocialdev
Copy link
Collaborator

With the transition to MUI, we will have some slight UI changes that are not a problem. We should not try to match every style Antd have.

@thesocialdev thesocialdev merged commit 08c1e0a into stage Jan 15, 2025
6 of 7 checks passed
@thesocialdev thesocialdev deleted the Change-all-popover-and-tooltip branch January 15, 2025 20:45
@LuizFNJ LuizFNJ changed the title Change all popover and tooltip Migrate all popover and tooltip Jan 22, 2025
@thesocialdev thesocialdev mentioned this pull request Jan 26, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment