fix: add theme support to 403 and 405 pages#788
Open
Monica-CodingWorld wants to merge 1 commit into
Open
Conversation
|
@Monica-CodingWorld is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
Hi @komalharshita During testing I also noticed that theme switching functionality is not active on these pages because script.js is not loaded in 403.html and 405.html. I did not modify that behavior because it was outside the scope of the issue, but I'm happy to add it if maintainers would like the toggle to be fully functional. |
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.
Summary [required]
This PR fixes theme support inconsistencies on the 403 (Forbidden) and 405 (Method Not Allowed) error pages. Both templates were missing the theme_head.html partial responsible for applying the saved theme before rendering, which could result in a Flash of Unstyled Content (FOUC) for users with dark mode enabled. They were also missing the theme toggle button available on other error pages, preventing users from switching themes from these pages.
Related Issue [required]
Closes #756
Type of Change [required]
data/projects.jsonWhat Was Changed [required]
How to Test This PR [required]
Expected test output:
Test Results [required]
Screenshots (if UI change)
|


|
|
Self-Review Checklist [required]
feat/,fix/,docs/,data/,style/,test/python tests/test_basic.pyand all 27 tests passflake8 .locally and there are no errorsprint()orconsole.log()debug statementsNotes for Reviewer
While working on this issue, I noticed that templates/500.html currently contains the theme toggle include but does not contain partials/theme_head.html. I left it unchanged to keep this PR strictly scoped to the reported issue affecting 403.html and 405.html.
also
This PR addresses the reported issue by adding the missing theme_head.html and theme_toggle.html includes to the 403 and 405 error pages so they match the other error templates.
During testing I also noticed that theme switching functionality is not active on these pages because script.js is not loaded in 403.html and 405.html. I did not modify that behavior because it was outside the scope of the issue, but I'm happy to add it if maintainers would like the toggle to be fully functional.