Fix #2887: Sponsor logo collides with section header text#2930
Open
iampujan wants to merge 5 commits intopython:mainfrom
Open
Fix #2887: Sponsor logo collides with section header text#2930iampujan wants to merge 5 commits intopython:mainfrom
iampujan wants to merge 5 commits intopython:mainfrom
Conversation
- Replaced 0fr with 1fr in the CSS Grid template for the sponsor listings to prevent overflow on wrapping. - Removed hardcoded 'grid-template-rows' logic that caused implicit rows to overlap. - Handled missing image logo metadata by resolving 'ValueError' in the 'ideal_size' sponsor templatetag.
There was a problem hiding this comment.
Pull request overview
This pull request fixes issue #2887 where sponsor logos were colliding with section header text on the sponsors page. The fix addresses two related problems: incorrect CSS grid properties causing layout overflow, and a server error from missing image handling.
Changes:
- Fixed CSS grid layout by replacing invalid
0frvalues with1frand removing the hardcoded single row constraint to allow proper wrapping - Added
ValueErrorexception handling in theideal_sizetemplate filter to handle corrupted or invalid image files - Added bottom margin spacing between sponsor sections
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/sponsors/templates/sponsors/partials/sponsors-list.html | Updated CSS grid properties from 0fr to 1fr, removed single-row constraint, and added section spacing to fix logo overflow issue |
| apps/sponsors/templatetags/sponsors.py | Added ValueError to exception handling in ideal_size filter to prevent 500 errors from invalid image files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Covers FileNotFoundError and ValueError exception handling for missing image files.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 #2887. Replaces invalid 0fr column grid properties with 1fr, and removes hardcoded 1 row rule to correctly let sponsor items naturally wrap to multiple rows without overflowing into the next section. Also fixes a 500 error triggered by missing image file paths in the 'ideal_size' filter.