Setup for PG dark mode. - #3145
Open
drgrice1 wants to merge 1 commit into
Open
Conversation
drgrice1
force-pushed
the
pg-dark-mode-support
branch
2 times, most recently
from
August 20, 2026 19:07
9a1cccd to
b34b1cf
Compare
Rework all of the problem rendering to support dark mode for PG.
This is straightforward for problems in sets. All of the code added to
force light mode for problems just needed to be removed.
For the problem editor and all of the places that problems are rendered
in an iframe via the `render_rpc` end point, a little work was needed to
allow the parent to control the color scheme. The child (whose content
is rendered via `templates/RPCRenderFormats/default.html.ep`) now sends
a message to the parent to signal that it has loaded. This occurs at the
beginning of the page load (it is important that this is earlier than
the iframe `load` event or flickering will occur), and then the parent
posts a message back to the child with the data `{ theme: 'mode' }`
where `mode` is either `dark` or `light` to set the mode of the iframe.
The problem editor is generally reworked so that everything is properly
rendered in dark mode such as hardcopy theme xml and PG critic results.
drgrice1
force-pushed
the
pg-dark-mode-support
branch
from
August 20, 2026 22:13
b34b1cf to
81311fc
Compare
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.
Rework all of the problem rendering to support dark mode for PG.
This is straightforward for problems in sets. All of the code added to force light mode for problems just needed to be removed.
For the problem editor and all of the places that problems are rendered in an iframe via the
render_rpcend point, a little work was needed to allow the parent to control the color scheme. The child (whose content is rendered viatemplates/RPCRenderFormats/default.html.ep) now sends a message to the parent to signal that it has loaded. This occurs at the beginning of the page load (it is important that this is earlier than the iframeloadevent or flickering will occur), and then the parent posts a message back to the child with the data{ theme: 'mode' }wheremodeis eitherdarkorlightto set the mode of the iframe.The problem editor is generally reworked so that everything is properly rendered in dark mode such as hardcopy theme xml and PG critic results.