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

Migrate verification request page to mui material #1777

Open
wants to merge 2 commits into
base: stage
Choose a base branch
from

Conversation

LuizFNJ
Copy link
Collaborator

@LuizFNJ LuizFNJ commented Jan 17, 2025

Description

In this PR, I replaced some Col, Row, Tag, Typography in the page for creating verification requests and in the "verification request" page as well, following the patterns of previous changes. However, this was the first Tag I replaced, and the most accessible in the MUI library, which is the Chip. I adapted how to use them and kept the old design.

Functionality to manually expand text

Basically, it was done with state management and DOM manipulation. First, I added ellipses via CSS to hide the rest of the text when it exceeds 3 lines if the condition is false. Then, I added the button with a function that would make the condition true, and in that way, set the line limit to 'none', displaying the full text.

After that, I used a 'useEffect' with an 'if' statement and 'useRef' to check if the total content value was greater than the visible part. If it was, it would mean the text was being truncated, so the "show" button would appear; otherwise, it would not.

I kept the functionality where the button doesn't appear in recommendations and in search.

Screenshot from 2025-01-18 16-26-05
Screenshot from 2025-01-18 16-06-59
Screenshot from 2025-01-18 16-07-18

Testing

In this PR, I managed to separate the pages as we discussed. The Col and Row were replaced by Grid, and in relation to this, the site's responsiveness needs to be tested. The Tag was replaced by the Chip, which are basically those colored cards inside the report. All the Typography from Ant Design was also replaced, so it’s necessary to check if there is any text that’s out of the pattern or breaking the design.

Components:

A visual document outlining which visual parts of the site need to be tested:
Guia visual testes 1.pdf
This guide was created while I was making the changes. You’ll be able to use it in the following PRs as well.

closes #1715, closes #1718, closes #1726, closes #1727, closes #1739, closes #1740, closes #1745

@LuizFNJ LuizFNJ requested a review from thesocialdev as a code owner January 17, 2025 21:23
@LuizFNJ LuizFNJ changed the title Migrate verification request page for mui material [wip] Migrate verification request page for mui material Jan 17, 2025
@LuizFNJ LuizFNJ changed the title [wip] Migrate verification request page for mui material WIP: Migrate verification request page for mui material Jan 17, 2025
@LuizFNJ LuizFNJ changed the title WIP: Migrate verification request page for mui material WIP: Migrate verification request page to mui material Jan 17, 2025
@LuizFNJ LuizFNJ force-pushed the migrating-verification-request-page-to-mui-material branch from 4798e0c to 17b522d Compare January 18, 2025 16:03
@LuizFNJ LuizFNJ changed the title WIP: Migrate verification request page to mui material Migrate verification request page to mui material Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment