Repository navigation
feat: store logos taller and at a higher quality - #5309
Merged
Merged
Conversation
An uploaded logo was stored 60px tall as WebP at Intervention's default quality of 75. The header shows it at most 30px tall, so 3x screens scaled it up, and small lettering in it smeared. The forum logo and the dark mode logo are now stored 90px tall at quality 90. Extend\Theme::logo() sets either value for a theme that shows the logo differently.
6 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: no issue filed.
Changes proposed in this pull request:
An uploaded logo is stored 60px tall, as WebP at Intervention's default quality of 75. The header shows it at most 30px tall, so on a 3x screen, which most phones have, the browser scales it up. At quality 75, small lettering in a logo also smears. A theme that shows the logo larger makes both problems worse, and nothing can change either value short of replacing the upload controller.
The forum logo and the dark mode logo are now stored 90px tall as WebP at quality 90. The header CSS still caps the logo at 30px, so it looks the same size as before, only sharper. Measured with the default GD driver, the Flarum wordmark grows from 2.9KB to 4.6KB.
Extend\Theme::logo()sets either value for a theme that needs something else:Reviewers should focus on:
flarum.forum.logocontainer binding, which the extender merges into. Callinglogo()with only one argument leaves the other value at its default.Necessity
Confirmed
yarn testinjs/). (No frontend changes.)composer test). (Unit suite green locally. Integration suite green apart from three tests that also fail on 2.x against a local MariaDB 11.8.9.)Required changes: