refactor: Eliminate Modal Scrollbars, Mitigate Focus-Scroll Clipping, and Fix Canvas Color Rendering (Fixes #341)#566
Open
prasad-0007 wants to merge 3 commits into
Conversation
|
@prasad-0007 is attempting to deploy a commit to the Anuj's projects Team on Vercel. A member of the Team first needs to authorize it. |
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
This PR addresses all layout, accessibility, and rendering issues inside interactive project modals by implementing dynamic scaling, mitigating programmatic focus scrolls, and correcting invalid canvas stroke properties. It also resolves homepage navbar layout distortions and horizontal page overflow on small/mobile viewports, completely resolving #341.
Closes
Closes #341
Changes Made
main.js): Added a central ResizeObserver-driven scaling routine (applyModalScaling) to automatically scale down modal contents to fit perfectly within the modal viewport, eliminating duplicate scrollbars.main.js,word-scramble.js,typing-speed-tester.js): Updated programmatic.focus()calls to use{ preventScroll: true }to stop browser shifts when modals load.typing-speed-tester.js,color-palette.js): Removed internal.scrollIntoView()calls that shifted the modal containers vertically and clipped the top/bottom panels.collatz.js,projects.js): Fixed invisible graph lines/axes by changing the canvas context strokeStyle from the unsupported CSS variablevar(--text-secondary)to hex color#64748b.index.html,styles.css): Resolved page-level horizontal overflow and layout distortion on mobile viewports by removing the unused, fixed-position off-screen drawer layout on.nav-controls. Implemented a responsive wrap layout so the logo and sound/theme controls display side-by-side on Row 1, and the category filter tabs wrap cleanly to Row 2 to scroll horizontally without vertical stacking. Also fixed a missing closing</div>tag for the nav wrapper.Screenshots & Proof
1. Dynamic Scaling (Pascal's Triangle)

2. Canvas Color Fix (Collatz Graph)

3. Focus-Scroll Mitigation (Word Scramble / Hangman)

Verification & Testing
node --check.