Implement responsive dark mode theme controller with localStorage persistence (#437)#454
Implement responsive dark mode theme controller with localStorage persistence (#437)#454Aryan0819 wants to merge 4 commits into
Conversation
Add dark mode styles and smooth transition effects.
Added CSS variables for dark and light themes.
|
@Aryan0819 is attempting to deploy a commit to the 007's projects Team on Vercel. A member of the Team first needs to authorize it. |
Thanks for creating a PR for your Issue!
|
Confidence Score: 2/5 - Changes NeededNot safe to merge — this PR introduces duplicate Key Findings:
Files requiring special attention
|
Changed allowTaint option to false for html2canvas.
|
Deployment failed with the following error: |
EntelligenceAI PR SummaryThis PR enforces strict cross-origin image handling in the
Confidence Score: 5/5 - Safe to MergeSafe to merge — this PR makes a targeted, low-risk hardening change to Key Findings:
Files requiring special attention
|
|
Please review this |
|
@pratyushjha06 @mahi-8758 please review it |
|
@Aryan0819 okk |
mahi-8758
left a comment
There was a problem hiding this comment.
This PR is reviewed and has no conflicts.
|
@mahi-8758 can you please merge this pr and add required lables so that i got my gssoc points |
Which issue does this PR close?
Rationale for this change
The student achievements dashboard currently only supports a bright, light-themed user interface. This can cause eye strain during extended nighttime viewing sessions. Additionally, the existing "#mode-toggle" button is present in the HTML markup but lacks the backend or frontend logic to actively modify system theme parameters. Implementing a client-side theme controller solves this by offering a persistent theme preference without breaking existing layout code.
What changes are included in this PR?
styles.css: Added base CSS variable mapping configurations under:rootfor the default dark theme parameters and explicit class variable overrides underbody.light-mode. Introduced a global smooth transition rule forbackground-color,color, andborder-colorfields to prevent harsh snapping flashes when themes toggle.script.js: Implemented a client-side theme manager utilizing an IIFE execution flow to eliminate layout screen-flash on DOM startup. Added accessibility support via ARIA attributes and active cross-tab theme state syncing using the Windowstorageevent listener.Are these changes tested?
Yes, manually verified locally across multiple browser environments:
localStoragestate repository and holds its exact parameters across manual hard page-reloads.prefers-color-scheme).Are there any user-facing changes?
Yes. Users will now see a fully interactive theme control button in the top corner layout. Clicking this button dynamically adjusts the entire interface theme spectrum fluidly between light and dark visual aesthetics.