Skip to content

refactor(client): replace Bootstrap button component on Show Certification page - #52204

Merged
Sembauke merged 4 commits into
freeCodeCamp:mainfrom
huyenltnguyen:refactor/migrate-button-show-certification
Nov 8, 2023
Merged

Sembauke merged 4 commits into
freeCodeCamp:mainfrom
huyenltnguyen:refactor/migrate-button-show-certification

Conversation

@huyenltnguyen

@huyenltnguyen huyenltnguyen commented Nov 2, 2023 •

Copy link
Copy Markdown
Member

Checklist:

This PR:

The font size and padding values of the ui-components Button are greater than the Bootstrap one, so the new buttons are larger compared to the old ones. This is because we changed the default font size (16px) set by browsers to 18px (in the tools/ui-components/src/global-element-styles.css file of https://github.com/freeCodeCamp/freeCodeCamp/pull/50465/files#diff-6f798c796a1046a87fe31ef9cafadaf2b84713b39e822eb77b55c67126269bb2R72), and the padding values were increased because they were implemented using the rem unit.

The differences between the Bootstrap and the ui-components Button are:

Bootstrap ui-components
font-size 23px 24px
line-height 30.6667px 32px
padding-bottom 10px 11.25px
padding-left 16px 18px
padding-right 16px 18px
padding-top 10px 11.25px

I'm not sure if we are okay with the new button size or we want to change it. IMHO, the change should be made to the root font-size (from 18px to 16px) rather than making Button overriding it, but I'm not 100% certain that this is a safe change.

(Btw, I went back to #45357 to check the proposed padding values, and confirmed that we wanted the padding to remain the same.)

Steps to test

Screenshots

I don't think it's possible to compare the result with just images, but I'm adding them anyway.

Before After
Add / share buttons Screenshot 2023-11-02 at 13 29 58 Screenshot 2023-11-02 at 13 33 20
Close button Screenshot 2023-11-02 at 14 28 46 Screenshot 2023-11-02 at 14 20 53

@github-actions github-actions Bot added platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. scope: tools/scripts Scripts for supporting dev work, generating config and build artifacts, etc. labels Nov 2, 2023
@huyenltnguyen huyenltnguyen changed the title refactor: replace Bootstrap button component refactor(client): replace Bootstrap button component on Show Certification page Nov 2, 2023
@ghost

ghost commented Nov 2, 2023 •

Copy link
Copy Markdown

👀 Review this PR in a CodeSee Review Map

View the CodeSee Map of this change

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@huyenltnguyen
huyenltnguyen marked this pull request as ready for review November 2, 2023 10:41
@huyenltnguyen
huyenltnguyen requested a review from a team November 2, 2023 10:41
@raisedadead raisedadead added the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Nov 4, 2023
@raisedadead
raisedadead requested a review from ahmaxed November 4, 2023 05:28
@Sembauke
Sembauke merged commit f3a5a1f into freeCodeCamp:main Nov 8, 2023
@huyenltnguyen
huyenltnguyen deleted the refactor/migrate-button-show-certification branch November 9, 2023 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. scope: tools/scripts Scripts for supporting dev work, generating config and build artifacts, etc. status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants