Closed
Conversation
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.1 → v0.15.2](astral-sh/ruff-pre-commit@v0.15.1...v0.15.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: course landing page design change * refactor: formatting * refactor: formatting
| {% if courseware_page.thumbnail_image %} | ||
| <img | ||
| src="{% image_version_url courseware_page.thumbnail_image "fill-480x275" %}" | ||
| src="{% image_version_url courseware_page.thumbnail_image " fill-480x275" %}" |
There was a problem hiding this comment.
Bug: The image_version_url template tag is called with a filter spec " fill-480x275" that has a leading space. This is inconsistent with all other usages and likely a typo.
Severity: MEDIUM
Suggested Fix
Remove the leading space from the filter_spec string in the image_version_url template tag call. The argument should be "fill-480x275" to match the convention used elsewhere in the codebase.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: cms/templates/partials/courseware-carousel-base.html#L7
Potential issue: A leading space was added to the `filter_spec` argument of the
`image_version_url` template tag, changing it to `" fill-480x275"`. This is inconsistent
with all other usages of this tag throughout the codebase, which do not have a leading
space. If Wagtail's image processing is sensitive to whitespace, this could cause the
image filter to fail, potentially resulting in broken images in the courseware carousel.
Even if the space is trimmed, this represents non-idiomatic code that was likely an
accidental typo.
Did we get this right? 👍 / 👎 to inform future reviews.
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.
Areeb Sajjad
pre-commit-ci[bot]
renovate[bot]