Skip to content

chore(client): remove bootstrap.min.css - #55068

Merged
Sembauke merged 47 commits into
freeCodeCamp:mainfrom
huyenltnguyen:refactor/remove-bootstrap-stylesheet
Jun 13, 2024
Merged

Sembauke merged 47 commits into
freeCodeCamp:mainfrom
huyenltnguyen:refactor/remove-bootstrap-stylesheet

Conversation

@huyenltnguyen

@huyenltnguyen huyenltnguyen commented Jun 3, 2024 •

Copy link
Copy Markdown
Member

Checklist:

This PR:

I'll comment on the code to explain each change, but the high-level approach is:

  • We don't just rip bootstrap.min.css out, but we are replacing it with the base.css stylesheet exported from @freecodecamp/ui.
  • We revised base.css and decided to include the Tailwind preflight in the file, which helps remove the inconsistencies in browser default styles. This change to base.css requires a @freecodecamp/ui major version bump.
  • I wrote a script that grabs all class names from the Bootstrap stylesheet and finds the files in /client that have class names match those classes. I then checked the files and decided either to remove the classes or bring the classes/styles from bootstrap.css to global.css. I moved the CSS styles to an existing/custom class if the Bootstrap style is simple or used by a single component; otherwise I copy-pasted the styles from Bootstrap and would have another cleanup round (some require a considerable amount of code refactoring, I so would rather split that work to a separate PR).
  • I also manually performed regression testing by going through each page and comparing the UI with production.

Note for reviewers: Be sure to run pnpm i when testing the PR locally.

Testing

Places I've checked (this is where I'm not methodical, I just wrote down a list of areas popped up in my head and checked them one by one)
  • Help modal
  • Donation modal
  • Completion modal
  • Shortcuts modal
  • Donation alert boxes
  • CTA buttons
  • Profile image and its responsiveness
  • Step-based grid
  • Lower jaw and upper jaw
  • Breadcrumb
  • C# challenges
  • C# exam
  • C# survey modal
  • RWD challenges
  • JS challenges
  • Python challenge
  • Certification project
  • A2 English challenges
  • Video-based lessons
  • The Odin project
  • Home page (/)
  • /learn
  • /settings
  • Profile page
  • /donate
  • /supporters
  • 404 page
  • /blocked
  • Certification page
  • Solution modal (on /settings)
  • Search box (on the nav)
  • Nav menu
  • Nav language selector
  • Footer

@huyenltnguyen
huyenltnguyen force-pushed the refactor/remove-bootstrap-stylesheet branch from 20bd9cd to 0ef31cb Compare June 5, 2024 16:11
@huyenltnguyen
huyenltnguyen marked this pull request as ready for review June 5, 2024 17:00
@huyenltnguyen
huyenltnguyen requested a review from a team June 5, 2024 17:00
@Sembauke

Sembauke commented Jun 6, 2024

Copy link
Copy Markdown
Member
image

The placeholders inside the card input seem no longer centred.

@huyenltnguyen

Copy link
Copy Markdown
Member Author

Thanks for catching that, Sem!

The placeholder text is also not perfectly centered in production. I'll see if I can fix that, too.

Screenshot 2024-06-06 at 15 11 07

@Sembauke Sembauke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some of the margins are a little off in the footer could you take a look at that?

@huyenltnguyen
huyenltnguyen force-pushed the refactor/remove-bootstrap-stylesheet branch from e61b4bd to 5b72b4c Compare June 7, 2024 05:33
Comment thread client/src/components/Footer/footer.css Resolved
@huyenltnguyen

Copy link
Copy Markdown
Member Author

@SocketSecurity ignore-all

@ahmaxed

ahmaxed commented Jun 7, 2024

Copy link
Copy Markdown
Member

The border of the alert buttons seems affected:

Screenshot 2024-06-07 at 3 37 24 PM Screenshot 2024-06-07 at 4 14 13 PM

@huyenltnguyen huyenltnguyen added the status: blocked In a transient & temporary hold. label Jun 11, 2024
@huyenltnguyen

Copy link
Copy Markdown
Member Author

Added the blocked label as a reminder to keep this PR open and only merge after the next prod deployment is done (I would like to keep the changes in main a little longer to be safe).

@huyenltnguyen huyenltnguyen removed the status: blocked In a transient & temporary hold. label Jun 13, 2024

@Sembauke Sembauke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🎉 CONGRATULATIONS 🎉

@Sembauke
Sembauke merged commit 6890264 into freeCodeCamp:main Jun 13, 2024
@huyenltnguyen
huyenltnguyen deleted the refactor/remove-bootstrap-stylesheet branch June 13, 2024 08:04
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants