-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Upgrade to Bootstrap 5 #2942
Upgrade to Bootstrap 5 #2942
Conversation
✅ Deploy Preview for hugo-portfolio-theme canceled.
|
✅ Deploy Preview for academic-demo canceled.
|
✅ Deploy Preview for markdown-slides canceled.
|
A few comments:
|
Thank you for the comments:
|
|
Notes about some layout changesI am going to list here some changes I notice with respect to Wowchemy with Bootstrap 4. Content
Post
ComponentsButtons
|
@Agos95 I don't know if you noticed - Github shows that the PR is still failing CI:
If you're unsure how to fix it, you can find more support on the Hugo forums... |
Yes, I noticed. I did not have too much time to work on this last week, and I focused on looking at the templates to find if something broke after the upgrade. I hope to resolve it soon. However, it is a bit strange since, locally, I can do everything without any problem. |
Related to this, it looks like you are trying to load the Bootstrap JS twice - once in https://github.com/wowchemy/wowchemy-hugo-themes/blob/2d67669ce7694d4b2f632994660ca7aeff27f0db/modules/wowchemy/layouts/partials/site_js.html#L5 and then again in wowchemy.js via ESM with |
Ok, I found and fix the problem (it was quite easy actually). I need to import Bootstrap js in This import was not required with Bootstrap 4, since in |
OK, I had a look ton all the templates, and I think almost everything works as before (here the list of layout changings: #2942 (comment)) |
@Agos95 How are we progressing fixing the remaining issues such as those mentioned in #2942 (comment) and removing the second loading of Boostrap JS so that it is only loaded once? |
Regarding to #2942 (comment) :
As for the Bootstrap JS, I need to import the Tooltip component in I also found a (new?) bug with the carousel slider (eg. in research group template). I don't know if this is new beacouse I merged the recent commits in the main branch, or if I did not find it earlier (but I am preatty sure this was not happening before). Now the slider keeps on rapidly changing the slide for some reason. I need to try to revert to older commits. Next week I will be away from home for work, so I am not going to have time to look into that immediately. |
Ok, I fixed the issue with the slider (it was a change in bootstrap not documented in the migration guide). I had another look at the templates, and there should not be major/breaking changes in the layouts compared to the current version with bootstrap 4.6. |
@Agos95 it appears you may have possibly made changes to the files in the Bootstrap folder? The goal is just to import Bootstrap and customise everything in the Bootstrap variables. So if you have edited any files within the Bootstrap folder, please update the PR so that no changes are made to the Bootstrap folder, as that should only be maintained by the Bootstrap team and not us. Also, before this PR can be merged, we need to still resolve the other issues like importing Bootstrap once rather than importing it twice as you have done in the current PR. The Bootstrap and Hugo forum communities can help with only importing Bootstrap once. Ideally, we should really remove the majority of the Wowchemy SCSS when we migrate to Bootstrap 5 as the current Wowchemy CSS largely consists of modifications made as workarounds to Bootstrap 4 to add the functionality which we now have in Bootstrap 5 - and to convert to using the native Bootstrap 5 CSS variables like |
@gcushen The changes in the Bootstrap folder are due to the fact that I upgraded to Bootstrap I removed the Bootsrtap js import from https://github.com/wowchemy/wowchemy-hugo-themes/blob/9fdadd48b880d274612ddf4723d7d79c92078f7d/modules/wowchemy/layouts/partials/site_js.html#L5 I did so by following the example site in the official Hugo bootstrap module. Actually, should we use this Module to package Bootstrap, insead of the current method? The repo is in the official Hugo github, and it is mantained by bep himself. As far as the SCSS, I just fix what it was reported in the Bootstrap migration guide. I think this may be to much to review in a single PR: in my opinion it is better to tackle that (and the removal of jQuery and the other unneeded js) in other PRs. Tomorrow I am leaving for holidays, so in case other fizes are necessary, I will not be able to work on this for the next couple of weeks. |
This PR is stale because it has not had any recent activity. The resources of the project maintainers are limited, and so we are asking for your help. If you feel that the PR is still relevant in the latest release, consider making the PR easier to review and finding developers to help review the PR. Please be mindful that although we encourage PRs, we cannot expand the scope of the project in every possible direction. There will be requests that don't make the roadmap. This PR will automatically close soon if no further activity occurs. Thank you for your contributions. |
Purpose
This PR implements milestone 1 of #1338, by upgrading to Bootstrap
v5.2.3
v5.3
().alpha3
for nowChanges:
overflow-x
is set tohidden
in the body (this was quite hard to fix, since it is not documented anywhere)I did not look over the javascript yet, with the exception of the changes described in the migration guide, but this is the next step I am going to look into. In particular, I can try to remove all the jquery dependencies, since they are not required by Bootstrap 5.
Disclaimer
I am aware that Wowchemy is going towards Tailwind (see #2792) insetad of Bootstrap. However, as mentioned in Discord, this upgrade can also be beneficial for some users (in particular while modules are being ported to Tailwind).
In addition, Bootstrap v5.3 (which is still in alpha), introduces the support for the dark mode. This may be interesting to investigate in the future.