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

Get rid of Bootstrap style imports #29200

Closed
valerybugakov opened this issue Dec 17, 2021 · 8 comments · Fixed by #32306 or #41401
Closed

Get rid of Bootstrap style imports #29200

valerybugakov opened this issue Dec 17, 2021 · 8 comments · Fixed by #32306 or #41401
Assignees
Labels
frontend-platform Issues related to our frontend platform, owned collectively by our frontend crew. gitstart Contract partner

Comments

@valerybugakov
Copy link
Member

valerybugakov commented Dec 17, 2021

Problem statement

We depend on Bootstrap styles in our global styles a lot. But we don't plan to move forward with Bootstrap because we're working on the Wildcard design system. To ease the transition to our styles and gain more control over visual changes, we want to move Bootstrap styles that we need into our codebase and eventually drop Bootstrap dependency.

Success criteria

  1. All bootstrap CSS rules that we need are moved into our codebase.
  2. The bootstrap package is removed from the monorepo dependencies.

Linked issues

Implementation details

Let's start with these SCSS files and create a separate PR for each one:

  1. client/branded/src/global-styles/list-group.scss
  2. client/branded/src/global-styles/nav.scss

Notes:

  1. We want to migrate away from SCSS variables to CSS variables when we bring Bootstrap styles to our codebase.
    • Some Bootstrap SCSS variables redefined on our side are located here: client/branded/src/global-styles/index.scss. Keep that in mind while migrating to CSS variables.
  2. We don't need to bring all styles defined in the imported Bootstrap package. Check what styles do we use in the codebase first.

Time estimate

  • Pull requests with ~450 lines changed should take 6 hours at maximum. Ping the reviewer in the spec pull request if time-consuming changes are required.
  • Split the work into multiple pull requests if the total diff is bigger than 450 lines of code.

/cc @taylorsperry @muratsu

@gitstart-app
Copy link
Contributor

gitstart-app bot commented Dec 17, 2021

Here is the GitStart Ticket for this issue: https://app.gitstart.com/clients/sourcegraph/tickets/SG-29200

@valerybugakov
Copy link
Member Author

valerybugakov commented Dec 24, 2021

@gitstart-sourcegraph, let's also remove the following imports and copy CSS rules that we need to our CSS files:

  1. @import 'bootstrap/scss/progress';
  2. @import 'bootstrap/scss/button-group';

Feel free to create a separate issue for each import.

@gitstart-sourcegraph
Copy link
Collaborator

Hi @valerybugakov here are some bootstrap imports on codebase we could work on as part of this issue, kindly take a look.

  • Button @import 'bootstrap/scss/buttons'
  • Forms @import 'bootstrap/scss/forms'
  • Custom Forms @import 'bootstrap/scss/custom-forms
  • Input Group @import 'bootstrap/scss/input-group'
  • Dropdown @import 'bootstrap/scss/dropdown'
  • Popover @import 'bootstrap/scss/popover'

@valerybugakov
Copy link
Member Author

@gitstart-sourcegraph, let's create issues and spec PRs for selected items from the list above.

@gitstart-sourcegraph
Copy link
Collaborator

As discussed with @valerybugakov
would proceed with extraction of @import 'bootstrap/scss/tables'

@valerybugakov
Copy link
Member Author

@gitstart-sourcegraph, let's also extract @import 'bootstrap/scss/grid. The file is pretty small: ETA 2-3h.

@valerybugakov
Copy link
Member Author

valerybugakov commented Jul 22, 2022

@gitstart-sourcegraph, created an issue to unblock bootstrap removal from the VSCode package. Let me know if you have questions!

@valerybugakov
Copy link
Member Author

@gitstart-sourcegraph, after addressing feedback here, could you take a look at importing the remaining Bootstrap imports into our codebase? We want to bring utility classes and mixins used by our codebase. Please drop classes and mixins if they are not used anywhere.

@import 'bootstrap/scss/functions';
@import 'bootstrap/scss/variables';
@import 'bootstrap/scss/mixins';
@import 'bootstrap/scss/reboot';
@import 'bootstrap/scss/utilities';

Let's split this work into multiple PRs – one PR per import removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend-platform Issues related to our frontend platform, owned collectively by our frontend crew. gitstart Contract partner
Projects
Status: Done
2 participants