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

Bootstrap5 #463

Merged
merged 92 commits into from
Jun 14, 2023
Merged

Bootstrap5 #463

merged 92 commits into from
Jun 14, 2023

Conversation

zebleck
Copy link
Collaborator

@zebleck zebleck commented Apr 16, 2023

📆 Merge of this branch scheduled for the 14th of June 2023, 10:00pm

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Branch for upgrade from bootstrap 4 to bootstrap 5.

Official link for Bootstrap migration:
https://getbootstrap.com/docs/5.0/migration/

Generally tried to recreate behavior and look as it was in v4.

What still needs to be addressed:

The hack for bootstrap accordions, that we use in v4, is not yet removed in v5.

Thorough testing probably required again (last time was before a lot of fixes).

What has been changed:

Some of the details of the changes (taken from my local documentation):

  • reintroduced the href underlines since they are not underlined in bootstrap 5 by default
  • helpdesks migrated
  • lots of renaming things:
    • form-checkbox -> form-check
    • custom-control-input -> form-check-input
    • badge badge-light -> badge badge-light text-dark
    • “custom-control custom-radio custom-control-inline” -> “form-check form-check-inline”
    • data-toggle=”pill” -> data-bs-toggle=”pill”
    • .pl-* and .pr-* -> .ps-* and .pe-*.
    • .border-left and .border-right -> .border-start and .border-end.
    • .text-left and .text-right -> .text-start and .text-end.
  • Navbars now require a container within (to drastically simplify spacing requirements and CSS required).
  • fixed accordions (for profile/subscriptions, lecture/form and start page)
  • Remove form-group, replace with form-floating mb-3
  • Jumbotron removed, has to be replaced with other utilities

Fixed issues as are outlined in basecamp: https://3.basecamp.com/3978947/buckets/7198402/todos/5678353440#__recording_5887260341

and more changes as are outlined in the official link for migrating v4 to v5.

To migrate an accordion:
change “card” to “accordion-item”
change “div class=”card-header clickable”” zu “button class=”accordion-button collapsed””
change “data-” to “data-bs-
change “card-body” to “accordion-body”

reworked media accordions and all jumbotrons usages
data-dismiss="modal" to data-bs-dismiss="modal"

fixed footer placement for devise views
Renamed .pl-* and .pr-* to .ps-* and .pe-*.
Renamed .border-left and .border-right to .border-start and .border-end.
Renamed .text-left and .text-right to .text-start and .text-end.
Navbars now require a container within (to drastically simplify spacing requirements and CSS required).
Dropped form-specific layout classes for our grid system.
"form-checkbox" to "form-check"
"badge badge-light" to "badge badge-light text-dark"
started adding "form-label" to form-labels and removing "form-group"
fixed helpdesks, added popover js to "bootstrap_modal_turbolinks_fix.coffee"
modals
some dropdowns
navs
collapsibles
accordion
helpdesks
for a lot of select fields
fixed a few helpdesks
fix media search form
fix comment form-checks
fix bg-gray buttons
@zebleck zebleck mentioned this pull request Apr 16, 2023
@Splines
Copy link
Member

Splines commented Apr 21, 2023

Thanks for opening this PR ;) Will look into it soon.

@Splines Splines added the dependencies Pull requests that update a dependency file label Apr 26, 2023
@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

Merging #463 (08c5e4c) into mampf-next (3774442) will decrease coverage by 0.02%.
The diff coverage is 15.38%.

@@              Coverage Diff               @@
##           mampf-next     #463      +/-   ##
==============================================
- Coverage       66.50%   66.48%   -0.02%     
==============================================
  Files             311      311              
  Lines            9412     9417       +5     
==============================================
+ Hits             6259     6261       +2     
- Misses           3153     3156       +3     
Impacted Files Coverage Δ
app/helpers/courses_helper.rb 43.75% <ø> (ø)
app/helpers/lectures_helper.rb 35.18% <ø> (ø)
app/helpers/talks_helper.rb 45.00% <ø> (ø)
app/models/quiz_round.rb 58.62% <0.00%> (ø)
app/helpers/application_helper.rb 37.76% <11.11%> (-0.81%) ⬇️
app/controllers/main_controller.rb 42.42% <20.00%> (+1.79%) ⬆️
app/models/medium.rb 54.85% <50.00%> (ø)

... and 1 file with indirect coverage changes

Splines added 5 commits May 28, 2023 23:19
(referring to the CSS class names)
This file was already deleted in commit a0557b8 in mampf-next.
However, due to unknown reasons, during a merge of mampf-next
into this branch, I reintroduced the file [1]. This is why this commit
deletes it again.

[1] 843854f#diff-f971a7862ba60ddb68800528aa4209773ddb3622a1507a123b0afc5aa3271a98
Reason: see commit message in commit d0f6541
This change was actually done in [1] but somehow got reintroduced in this branch again, so we remove it here manually.

[1] a0557b8#diff-6d58d1f5718d589c6e138b97441c26ea8caaa3e0973f7c2c73ba7a64d600aec7
@Splines Splines requested a review from fosterfarrell9 May 28, 2023 22:19
fosterfarrell9
fosterfarrell9 previously approved these changes May 29, 2023
Splines added 5 commits June 12, 2023 09:02
text-secondary (gray) instead of text-dark (black)
We replace its id by 'lecture-content-card' as this is the key
used in the respective lectures.coffee file to
add or remove the class 'col-xxxl-9'
@Splines Splines requested a review from fosterfarrell9 June 14, 2023 18:31
@Splines Splines merged commit 3a189a8 into mampf-next Jun 14, 2023
@Splines Splines deleted the bootstrap5 branch June 14, 2023 18:54
@Splines Splines mentioned this pull request Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants