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

Refresh the user interface icons, add card brand logos #2326

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Conversation

Changaco
Copy link
Member

- Drop icon fonts (Glyphicons and Forkawesome). Add SVG files from [Bootstrap Icons](https://icons.getbootstrap.com/) as replacements. (See [Inline SVG vs Icon Fonts](https://css-tricks.com/icon-fonts-vs-svg/) and [Stop Using Icon Fonts](https://www.irigoyen.dev/blog/2021/02/17/stop-using-icon-fonts/) for the reasons to drop icon fonts. In short, they're an obsolete hack.)
- Add logos of payment card brands (copied from Stripe) and use them in the payment method selection page.
- Refresh the icons of social platforms, optimize them, and give them text labels. (Closes #2117. Closes #2309.)
@Changaco
Copy link
Member Author

Screenshot showing the added card brand icons


Screenshot of the refreshed icons of social platforms

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 72.97297% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 81.17%. Comparing base (76712b7) to head (54e7684).
Report is 3 commits behind head on master.

Additional details and impacted files
Files Coverage Δ
liberapay/elsewhere/_base.py 73.39% <ø> (-0.07%) ⬇️
liberapay/elsewhere/bitbucket.py 85.29% <ø> (-0.43%) ⬇️
liberapay/elsewhere/github.py 71.66% <ø> (-0.47%) ⬇️
liberapay/elsewhere/gitlab.py 100.00% <ø> (ø)
liberapay/elsewhere/mastodon.py 65.38% <ø> (-0.66%) ⬇️
liberapay/elsewhere/pleroma.py 87.50% <ø> (-1.39%) ⬇️
liberapay/elsewhere/twitch.py 100.00% <ø> (ø)
liberapay/elsewhere/twitter.py 100.00% <ø> (ø)
liberapay/elsewhere/youtube.py 100.00% <ø> (ø)
liberapay/website.py 76.05% <66.66%> (+0.24%) ⬆️
... and 2 more

... and 1 file with indirect coverage changes

@Changaco
Copy link
Member Author

Loading the Liberapay front page currently requires downloading 240.88 kB of data. The changes in this branch should cut that number almost in half.

@Changaco Changaco force-pushed the icons branch 2 times, most recently from d08a58f to fcd8471 Compare March 20, 2024 08:36
This should improve performance by further reducing network traffic.

The SVG file is always loaded from the same domain as the page it's linked from, because cross-domain requests would allegedly be blocked by Chrome and possibly by other browsers.
@Changaco Changaco merged commit 2a3aeda into master Mar 21, 2024
3 of 4 checks passed
@Changaco Changaco deleted the icons branch March 21, 2024 08:32
@iacore
Copy link

iacore commented Mar 21, 2024

Thanks for your work.
The icon vertical alignment is off. How do I contribute? Is there a way to run the app without a database? I only need to change the styles.

you can add vertical-align: middle to button > * and p > *

@Changaco
Copy link
Member Author

@iacore You were still looking at the old icons. The new ones have now been deployed.

All the instructions on contributing are in the README. If you'd like to contribute on CSS issues, Liberapay needs to be updated from Bootstrap v3 to v5: #940.

There is currently no way to run Liberapay without a PostgreSQL database.

@iacore
Copy link

iacore commented Mar 22, 2024

some new icons are not vertically aligned

image

@Changaco
Copy link
Member Author

The icons are vertically centered. The alignment doesn't look as good as in other places because in these buttons the text is larger than the icon (20px vs 16px). I tested scaling the icons to match the text but I didn't really like it better.

@iacore
Copy link

iacore commented Mar 22, 2024

On some Zoom levels, this icon is clipped. (not just the RSS icon, also "info" and "globe", presumably every icon.) The SVG probably need some margin.

image

@Changaco
Copy link
Member Author

It looks like the browser is incorrectly scaling the SVG. There doesn't seem to be any way to work around this bug.

@Changaco
Copy link
Member Author

Changaco commented Mar 22, 2024

Loading the Liberapay front page currently requires downloading 240.88 kB of data. The changes in this branch should cut that number almost in half.

Actual result: 128.39 kB.

(Neither number includes the Ubuntu font files, because my browser has them locally, so it doesn't need to download them.)

@iacore
Copy link

iacore commented Mar 22, 2024

It looks like the browser is incorrectly scaling the SVG. There doesn't seem to be any way to work around this bug.

The SVG need to larger than the icon. Currently the SVG is exactly, as large as the icon (the visible part).

@Changaco
Copy link
Member Author

Increasing the height and width of the SVG view box by one unit does eliminate the scaling overflow.

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.

Update Twitter logo to X Icons of linked accounts do not have text as backup
2 participants