Upgrade to Bootstrap 5 & realign themes#3506
Conversation
…pgraded to Bootstrap 5.3.3
… side of its label fix
There was a problem hiding this comment.
@Wout-atmire : Thanks for the quick changes! Overall, this is looking better. But, I noticed two issues still remain:
- You still appear to be accidentally undoing the changes of #3227 (see inline comment below). That prior feedback was not addressed.
- I agree with @FrancescoMolinaro that I don't believe you can remove all the
--bs-*variables defined in the_bootstrap_variables_mapping.scssfile. If you search our codebase many of these styles are still referenced in other files. Either we need to remove all those references, or we need to restore the--bs-*mappings in some way.- I gave one example in a comment below, but if I search for
--bs-in our codebase after applying this PR, I still see 78 references that exist (and almost all of these--bs-variables have been removed from the_bootstrap_variables_mapping.scss, which means those styles will have broken or be slightly different).
- I gave one example in a comment below, but if I search for
Overall though, everything else that I previously reported has been fixed.
|
Hi @FrancescoMolinaro @tdonohue , thanks for the feedback. I added the mappings from https://github.com/DSpace/dspace-angular/blob/main/src/styles/_bootstrap_variables_mapping.scss and only removed the ones that didn't have any reference in the code & didn't have a value in bootstrap 5. @FrancescoMolinaro Regarding the (collection selector in submission li:hover) Please let me know if any further changes are needed. I appreciate your review. |
tdonohue
left a comment
There was a problem hiding this comment.
@Wout-atmire : Thanks for the updates! This is looking much better now. However, I've stumbled on two more small styling bugs.
-
The tooltip (hover over) for Entities (or ORCIDs) is no longer readable. The text should be either light gray or white. See https://demo.dspace.org/entities/publication/c491122e-9192-4ecd-a3d7-04062701432f as an example. Here's what it looks like in this PR:

-
On the Edit Item -> Bitstreams tab, the bitstream listing shows the filename under the drag handle. On the demo site, the filename appears next to the drag handle. This is minor, but I think we should fix it. Here's what it looks like in this PR with the filename wrapped under the drag handle.

Beyond that, it's looking great for me now. I think it's nearly ready to merge.
|
Hi @Wout-atmire, thanks again for the swift response, I agree with @tdonohue on the couple of issues he found and I believe that other than that the PR looks good. Thanks again for looking into it. |
|
Hi @FrancescoMolinaro @tdonohue, |
|
@tdonohue @FrancescoMolinaro Our original intent was to trim down the SCSS → CSS variable mappings to what's not provided by Bootstrap 5 out of the box. E.g. if you revert 4e61b5f you'll still see |
|
@ybnd and @Wout-atmire : I see. That was not clear to me at all. If these However, if we wish to go that route, then I'd highly recommend we add some code comments to our The reason I found the original changes so confusing was that I was not aware these are now being set by Bootstrap 5 itself. |
|
@ybnd and @Wout-atmire : Just a quick note though, I'm still not sure if we can revert all of 4e61b5f because Bootstrap says it only defines around 24 variables....namely the ones which reference colors/fonts listed here: https://getbootstrap.com/docs/5.0/customize/css-variables/#root-variables It looks to me like 4e61b5f modified many more variables than just those colors/fonts. So, we may only be able to remove the colors/fonts in favor of those defined by Bootstrap already. |
|
@tdonohue @Wout-atmire we're upgrading to Bootstrap 5.3, so the full variable list includes a few more: https://getbootstrap.com/docs/5.3/customize/css-variables/#root-variables We'll go over this once more to make sure everything we removed is covered. 100% agree about documenting this, the confusion is on me, sorry about that. |
|
Hi @FrancescoMolinaro @tdonohue, |
tdonohue
left a comment
There was a problem hiding this comment.
👍 Thanks @Wout-atmire and @ybnd ! This now looks good to me. I gave it another test today and verified that everything previously reported is still fixed. I also verified @FrancescoMolinaro 's prior feedback still seems to be resolved.
Because @FrancescoMolinaro submitted a prior approval, I'm going to consider this +2 approval, and merge it immediately.
However, as a sidenote, I will have to "squash merge" this PR (as a single commit) because the commit history has gotten very messy & lengthy (over 120 commits, some of which look unrelated to this PR). In the future, you can avoid this by rebasing your own commits to squash them down yourself (using git rebase -i or similar).

References
Description
This PR aims to change the Bootstrap version of DSpace from Bootstrap version 4 to Bootstrap version 5 because version 4 is out of date. This version upgrade includes the required visual changes to maintain the same look as the DSpace version with Bootstrap 4.
Instructions for Reviewers
List of changes in this PR:
@ng-bootstrap/ng-bootstrapto version^12.0.0andbootstrapto version^5.3text-righttotext-end,ml-4toms-4, ...)To test this you can start a local Angular instance in combination with the REST of host:
demo.dspace.org. You can then compare it in another browser tab with DSpace that still uses Bootstrap 4https://demo.dspace.org.Note that we deliberately left in some style changes:
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).Reason: This is an upgrade for a major dependency and thus it affects a lot of code.
npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.