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

Colors #10

Merged
Merged

Conversation

HiDeoo
Copy link
Collaborator

@HiDeoo HiDeoo commented Feb 20, 2023

Each commit should be small and focused enough to understand the intent of the changes by checking them individually but here are some few highlights.

Warning
This PR requires to run npm install before checking it out.

Layouts

This PR lays the groundwork for using multiple layouts all based on a 'base' layout. Not sure yet how many layouts we'll need but it should be fairly easy to add more and fits more with the Astro philosophy.

Directories

I moved the new website to site-new instead of src as src does not make any sense considering the bootstrap repo is not a monorepo and the "source" of bootstrap are not in a src directory. I also moved the dist folder to dist-site-new for the moment as I have no idea what is Bootstrap deal with the committed dist. I gitignored it for now.

Note
I noticed you commited changes related to the new website in the dist folder prior to this PR. I guess this should be cleaned up.

Config

I removed your temporary config and we are now parsing the existing config.yml file but also validating its content in order to strictly type the config object.

The reasonning behind this change is to avoid changing too much of the old habits of the current maintainers as they know this file and it may even be used for something else.

For the strict validation process, we want to break the build process if an invalid edit is made to the config file so we can catch it early and avoid deploying a broken website and also make it easier for the developers when using the config object in the code as you get autocompletion for any known property.

Prettier

I added Prettier as we discussed. It's only used for the new website of course.

To make things easier, having a Prettier extension to your editor is recommended and I also suggest to add this to your VSC settings to specify the default formatter for the astro files:

"[astro]": {
  "editor.defaultFormatter": "astro-build.astro-vscode"
},

Note: this config change won't affect any other files.

Linting

I added a new script astro-lint to the root package.json that checks the following:

  • Prettier formatting (this only a check, nothing is written to the files automatically).
  • astro check that runs Astro related diagnostics (such as type-checking within .astro files).
  • Runs the TypeScript compiler (without emitting any files) to check for any type related errors.

ESLint is not yet part of this combo even tho ESLint seems to be used in Bootstrap's codebase. I'll add it later but I need to more time to allocate to this and understand how it's used in Bootstrap.

The prettier config is extracted from https://github.com/HiDeoo/prettier-config but it seems to be pretty close to the JS shipped by Boostrap.

Navigation links

I extracted the header navigation links to their own components (not all of them yet, some requires more work). I think you should take a look at this change specifically as the syntax you used was close to being valid but not quite.

Colors are back

This PR adds existing styles, this will properly be refactored but this is enough to get started, specially for you to get a more visual feedback on your progress.

localhost_3000_

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4225483277

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.06%

Totals Coverage Status
Change from base Build 4217019694: 0.0%
Covered Lines: 2020
Relevant Lines: 2070

💛 - Coveralls

@HiDeoo
Copy link
Collaborator Author

HiDeoo commented Feb 20, 2023

Hmmm, not sure we actually want to run GitHub Actions on this kind of PRs at the moment, or at least until we get actions related stuff for the new website.

Maybe this should be disabled temporarily on the fork or on PRs from me, w/e you prefer.

@julien-deramond julien-deramond merged commit 4435422 into julien-deramond:main-jd-bootstrap-astro Feb 20, 2023
julien-deramond pushed a commit that referenced this pull request Mar 6, 2023
* fix: remove useless astro script and fix package.json indentation

* fix: remove default template content

* feat: refactor layouts

* feat: move new site src & dist folders

* feat: load configm from config.yml

* feat: add prettier

* fix: config type

* feat: add astro check

* feat: add typecheck to lint script

* fix: eqeqeq

* feat: rename and move DocsNavbar & DocsVersions

* feat: move skippy

* feat: move scripts & icons

* feat: add head component

* feat: add header component

* fix: stricten layout type in components

* fix: add missing docs layout

* feat: add canonical url

* feat: refactor navigation links

* chore: add todo

* refactor: production check to avoid a string

* refactor: versioned docs path

* fix: docsearch doc version

* feat: page title

* chore: add todo

* feat: add social

* chore: add todos

* feat: load styles

* fix: disable prettier in base layout

* chore: add todos

* refactor: move style imports
julien-deramond pushed a commit that referenced this pull request Mar 24, 2023
* fix: remove useless astro script and fix package.json indentation

* fix: remove default template content

* feat: refactor layouts

* feat: move new site src & dist folders

* feat: load configm from config.yml

* feat: add prettier

* fix: config type

* feat: add astro check

* feat: add typecheck to lint script

* fix: eqeqeq

* feat: rename and move DocsNavbar & DocsVersions

* feat: move skippy

* feat: move scripts & icons

* feat: add head component

* feat: add header component

* fix: stricten layout type in components

* fix: add missing docs layout

* feat: add canonical url

* feat: refactor navigation links

* chore: add todo

* refactor: production check to avoid a string

* refactor: versioned docs path

* fix: docsearch doc version

* feat: page title

* chore: add todo

* feat: add social

* chore: add todos

* feat: load styles

* fix: disable prettier in base layout

* chore: add todos

* refactor: move style imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants