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

Update Bootstrap to v5.3.3 #2328

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

iacore
Copy link

@iacore iacore commented Mar 23, 2024

Closes #940.

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

@@ -0,0 +1,42 @@
// Responsive images (ensure images don't scale beyond their parents)
//
// This is purposefully opt-in via an explicit class rather than being the default for all `<img>`s.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative. This is a problem for people using screen readers.

@iacore
Copy link
Author

iacore commented Mar 23, 2024

libsass refuse to compile this version of the Bootstrap. @Changaco I think Bootstrap 5 need Dart Sass.

@Changaco
Copy link
Member

@iacore There's a Dart SASS package in PyPI. It's very heavy because it isn't optimized, but that could be fixed.

@iacore
Copy link
Author

iacore commented Mar 23, 2024

Can you refactor current usage of sass to running the command sass (Dart Sass)? That's better supported.

@Changaco
Copy link
Member

I see no need to change how the SASS compiler is called. The difficulty is automating its installation, not calling it once it's installed. An automatic installation through PyPI is the best option from the point of view of a Liberapay developer. When a dependency isn't installed through PyPI, which is notably the case of PostgreSQL, it adds friction to the development and deployment of Liberapay. (I started working on getting rid of SQL last year, so I don't plan to work on automating the installation of PostgreSQL anymore.)

@iacore
Copy link
Author

iacore commented Mar 23, 2024

(I started working on getting rid of SQL last year, so I don't plan to work on automating the installation of PostgreSQL anymore.)

I'm curious. Can you link to that work?

@iacore
Copy link
Author

iacore commented Mar 23, 2024

Now the server returned css/bootstrap.css is empty. That's to be expected, since we don't have any code that uses bootstrap in that file.

Bootstrap tooltip need need bootstrap.bundle.min.js

https://getbootstrap.com/docs/5.0/components/tooltips/
@iacore
Copy link
Author

iacore commented Mar 23, 2024

Now I don't see any JS error on page load. Hopefully tooltip is the only feature Liberapay uses from Bootstrap.

Unfortunately this is as far as I can go without knowing anything about Bootstrap. You will have to fix the styles yourself.

@Changaco
Copy link
Member

I'm curious. Can you link to that work?

I'm not ready to push any code yet, but you can now find basic information in #2330, and ask further questions there if you want.

Unfortunately this is as far as I can go without knowing anything about Bootstrap.

Bootstrap mostly provides classes that are added to HTML elements, so the migration mostly consists in replacing, in Liberapay's HTML code, obsolete Bootstrap v3 class names with new Bootstrap v5 class names. This is simple but long and not particularly interesting work, although someone who doesn't know Bootstrap could acquire a decent understanding of it and its history by working on this update.

@Changaco
Copy link
Member

I had forgotten about it, but there was already a pull request for this: #1963.

@iacore
Copy link
Author

iacore commented Mar 29, 2024

This is simple but long and not particularly interesting work, although someone who doesn't know Bootstrap could acquire a decent understanding of it and its history by working on this update.

I don't want to learn bootstrap, sorry. Framework burn out is real.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Bootstrap 5
2 participants