You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### `ui-components`
- [x] Package the current Storybook preview resetters with the component library
- [x] Replace the preview resetters with a recent copy or a complete copy of normalizeCSS, resetCSS, or the default tailwind set - https://github.com/freeCodeCamp/ui/pull/114
- [x] Move the `@freecodecamp/ui/dist/base.css` import to an outer layer https://github.com/freeCodeCamp/freeCodeCamp/blob/523f4de26f7e6614041179b3ab3e2bd196b02263/client/src/components/solution-display-widget/index.tsx#L10 - #55068
### Remove Bootstrap
- [x] Remove @freecodecamp/react-bootstrap as a dependency - #54289
- [x] Remove bootstrap.min.css injection. - #55068
### Clean up
- [ ] Migrate usages of native elements in /learn to `ui-components`.
- [x] Move UI Components to its repo.
- [ ] Remove `img-responsive` class usages as it is the default (in Tailwind preflight) - #55190
- [ ] Removed CSS rules that are to override Bootstrap styles.
@ahmaxed I'm looking into the Bootstrap stylesheet removal, and would like to double check the strategy with you to ensure I understand things correctly.
In order to remove the Bootstrap stylesheet, we need to do the following steps:
Have an official version of our reset/normalize stylesheet in @freecodecamp/ui
Include the normalize stylesheet in the package bundle
Replace the Bootstrap stylesheet with the @freecodecamp/ui one, check and fix any UI issues introduced by the change
Remove CSS rules that were previously needed to override Bootstrap from global.css (I think this work would need to be done at the same time as the migration of native HTML elements, since we still need the styles in global.css for these at the moment)
Does the list look correct to you? Is there anything I missed?
There are still some implementation details that I'm a little unsure, but I think it's easier to discuss on a PR, where we have the code to look at.
I locally replaced the minified bootstrap file with minified normalize.css v8.0.1, and things look fine :)
There are some missing element paddings here and there, since some elements use bootstrap classes (.btn, etc) for styling.
So one actionable item should be removing/restyle bootstrap classes before we remove bootstrap.
We are adding the ui-comopnents stylesheet as @freecodecamp/ui/dist/base.css. I will leave it to you to decide where to properly place it and if it needs to be injected in the head.
(2): We have migrated those that were blocking the Bootstrap removal. The remaining elements can be migrated gradually and opportunistically. Also note that there are a couple of components in /client that don't have a replacement in @freecodecamp/ui (the CTA button is an example), so we will need to continue with the library development as well, in order to enable the migration.
(3): I did remove a handful of Bootstrap overrides during the removal. There are some rules that still need to stay in order to style the native elements – those in (2) that we are not able to migrate yet. The cleanup of those rules will be part of the next round of component migration.
I'm closing this issue as the work needed for the Bootstrap removal has been completed.
Activity
[-]Remove bootstrap from the codebase[/-][+]Remove Bootstrap from the codebase[/+]huyenltnguyen commentedon Apr 5, 2024
@ahmaxed I'm looking into the Bootstrap stylesheet removal, and would like to double check the strategy with you to ensure I understand things correctly.
In order to remove the Bootstrap stylesheet, we need to do the following steps:
@freecodecamp/ui@freecodecamp/uione, check and fix any UI issues introduced by the changeglobal.css(I think this work would need to be done at the same time as the migration of native HTML elements, since we still need the styles inglobal.cssfor these at the moment)Does the list look correct to you? Is there anything I missed?
There are still some implementation details that I'm a little unsure, but I think it's easier to discuss on a PR, where we have the code to look at.
cc'ing @Sembauke.
ahmaxed commentedon Apr 5, 2024
The is correct. Here are some insights:
I locally replaced the minified bootstrap file with minified normalize.css v8.0.1, and things look fine :)
There are some missing element paddings here and there, since some elements use bootstrap classes (.btn, etc) for styling.
So one actionable item should be removing/restyle bootstrap classes before we remove bootstrap.
We are adding the ui-comopnents stylesheet as @freecodecamp/ui/dist/base.css. I will leave it to you to decide where to properly place it and if it needs to be injected in the head.
huyenltnguyen commentedon May 23, 2024
(This is my working notes, please ignore)
Details
Bootstrap classes
.link-btnfreeCodeCamp/client/src/components/Map/index.tsx
Line 105 in 6fe2b08
super-block-linkclass, specific to this component, and move all the styles under it.btn-lgfreeCodeCamp/client/src/components/Map/index.tsx
Line 105 in 6fe2b08
freeCodeCamp/client/src/templates/Challenges/components/help-modal.css
Line 29 in 6fe2b08
freeCodeCamp/client/src/templates/Challenges/components/completion-modal.css
Line 73 in 6fe2b08
freeCodeCamp/client/src/components/profile/components/certifications.tsx
Line 50 in 6fe2b08
Button?freeCodeCamp/client/src/templates/Introduction/intro.tsx
Line 62 in 6fe2b08
super-block-linkclass above? Or this<Link>should be turned into a reusable component (SuperBlockLink)?.btn-cta-bigfreeCodeCamp/client/src/components/Header/components/login.tsx
Line 36 in 6fe2b08
global.cssand into a class specific to the component.button-groupfreeCodeCamp/client/src/templates/Challenges/components/tool-panel.tsx
Line 73 in 6fe2b08
button-groupclass #54964.btn-primaryglobal.css. The gatsbyLinkneeds to use this class to have proper styles..alertand.alert-info.img-responsiveimgresponsive by defaulthuyenltnguyen commentedon Jun 14, 2024
The remaining items are:
img-responsiveclass@freecodecamp/ui@freecodecamp/ui(the CTA button is an example), so we will need to continue with the library development as well, in order to enable the migration.I'm closing this issue as the work needed for the Bootstrap removal has been completed.