Skip to content

Update Bootstrap to v5.3.3 - #2328

Draft
iacore wants to merge 4 commits into
liberapay:masterfrom
iacore:bootstrap-5
Draft

Update Bootstrap to v5.3.3#2328
iacore wants to merge 4 commits into
liberapay:masterfrom
iacore:bootstrap-5

Conversation

@iacore

@iacore iacore commented Mar 23, 2024

Copy link
Copy Markdown

Closes #940.

@accesslint accesslint Bot left a comment

Copy link
Copy Markdown

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
Copy Markdown

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

iacore commented Mar 23, 2024

Copy link
Copy Markdown
Author

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

@Changaco

Copy link
Copy Markdown
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

iacore commented Mar 23, 2024

Copy link
Copy Markdown
Author

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

@Changaco

Copy link
Copy Markdown
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

iacore commented Mar 23, 2024

Copy link
Copy Markdown
Author

(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

iacore commented Mar 23, 2024

Copy link
Copy Markdown
Author

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

iacore commented Mar 23, 2024

Copy link
Copy Markdown
Author

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
Copy Markdown
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
Copy Markdown
Member

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

@iacore

iacore commented Mar 29, 2024

Copy link
Copy Markdown
Author

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