Repository navigation
Improve website performance and update the About section #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
33cd8de
Remove decorative animation loops and stabilise initial content
samanyugoyal2010 03b97f9
Defer optional tools and serve responsive team portraits
samanyugoyal2010 88d9ae9
Fix course totals and clarify learning interfaces
samanyugoyal2010 0a7e5fe
Reduce scroll-time painting and stabilise gallery layout
samanyugoyal2010 8413cec
about section updates
samanyugoyal2010 8c75f5a
Merge branch 'main' into website-performance-cleanup
samanyugoyal2010 ca9bb7f
Preserve natural gallery proportions and correct image slots
samanyugoyal2010 555f8be
Wait for mascot poses and discard stale navigation updates
samanyugoyal2010 f3fb4cd
Clarify account requirements and remove obsolete marquee styles
samanyugoyal2010 ed848ae
Keep merged resources page compatible with performance cleanup
samanyugoyal2010 82dac86
Restore the story video soundtrack
samanyugoyal2010 a300f6c
Merge main into website performance cleanup
samanyugoyal2010 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| # Website loading and UI cleanup | ||
|
|
||
| Branch starts from `main` at `4066564`. | ||
|
|
||
| ## Loading measurements | ||
|
|
||
| Production builds compared on the same machine using `next start`. | ||
| The measurements sum the scripts referenced by each initial HTML response, | ||
| compressing each script with Python gzip. These are reproducible payload estimates, | ||
| not measured network transfer, CPU time, Core Web Vitals, or total eventual downloads. | ||
| On-demand chunks, third-party scripts, media, CSS, and fonts are excluded. | ||
|
|
||
| | Route | Before (gzip bytes) | After (gzip bytes) | Reduction | | ||
| | --- | ---: | ---: | ---: | | ||
| | `/` | 428,940 | 353,652 | 17.6% | | ||
| | `/courses/` | 407,104 | 336,353 | 17.4% | | ||
| | `/dashboard/` | 465,906 | 395,601 | 15.1% | | ||
| | `/about/` | 408,311 | 332,570 | 18.5% | | ||
| | `/impact/` | 403,543 | 331,235 | 17.9% | | ||
|
|
||
| Example avatar: `/team-vetri.png` is 4,988,121 bytes. The image optimiser serves | ||
| its 256px variant as an 8,002-byte WebP. Cards now request responsive sizes instead | ||
| of downloading full-size portraits for small circles. | ||
|
|
||
| ## Changes | ||
|
|
||
| - Render headings, quotes, and impact figures immediately. Previously the hero | ||
| heading was blank at first paint and stat animations reset correct figures to zero. | ||
| - Remove decorative canvas dots, pointer magnets, per-card spotlight listeners, | ||
| repeating tickers, word blur effects, automatic koala easter eggs, and an unused | ||
| commit distribution chart. Keep artwork, useful controls, and the mascot. | ||
| - Stop perpetual decorative CSS pulse, spin, blink, and message fade cycles. | ||
| - Load whiteboard code and styles only when its dashboard tab is opened. | ||
| - Load database synchronisation only after sign-in. Existing sync logic is unchanged. | ||
| - Defer the floating mascot until after the initial page load and omit it from | ||
| lesson readers. Decode its alternate images only when requested; warm hero poses | ||
| after interaction rather than on a startup timer. | ||
| - Use a stable click-to-play video frame instead of changing its height after hydration. | ||
| No movie element or download is created before play is pressed. | ||
| - Keep collapsed impact details inert so keyboard focus cannot enter hidden content. | ||
| - Make course filtering immediate and give filter controls explicit accessible labels. | ||
| - Count all nine tracks in the homepage lesson total and add Computer Vision to the | ||
| dashboard. Both now report 211 chapters. Ignore obsolete or duplicate saved chapter | ||
| slugs when calculating dashboard completion percentages. | ||
| - Clarify account requirements and quick-check completion; simplify the FAQ heading; | ||
| correct British spelling and the remaining inconsistent impact wording in llms.txt. | ||
|
|
||
| ## Validation | ||
|
|
||
| - `npm run check` passed: lint, TypeScript, lesson graph validation, production build. | ||
| - HTTP audit of 237 public prerendered pages: all returned 200, with no broken local | ||
| links or missing rendered image assets. Framework error routes were excluded. | ||
| - Browser checks at 390px and 1440px: homepage headings, navigation, course filters, | ||
| FAQ expansion, video playback, dashboard course list, whiteboard readiness, and | ||
| a Python lesson. The main public pages fit the mobile viewport without horizontal overflow. | ||
| - Story playback reached readyState 4 and played with controls; no browser errors | ||
| were reported in the checked flows. The lesson reader did not mount the floating mascot. | ||
| - Manual browser checks used a signed-out session. Account synchronisation was | ||
| reviewed in code; no production database or account data was changed. | ||
|
|
||
| ## Reproducing the payload comparison | ||
|
|
||
| Build each revision with `npm run build`, serve it with `npm run start`, fetch each | ||
| route's HTML, collect unique `<script src>` URLs, and read the corresponding files | ||
| under `.next/static`. Sum their raw lengths and `gzip.compress()` lengths using the | ||
| same Python version for both builds. Restart the production server after each build | ||
| so its cached asset manifest matches the build directory. | ||
|
|
||
| ## Follow-up: scroll and pointer frame pacing | ||
|
|
||
| The loading improvements above do not establish smooth frame pacing. A second | ||
| source audit found additional work happening during scrolling and pointer movement: | ||
|
|
||
| - Inline artwork measured computed styles and path lengths, then created an animation | ||
| for each SVG shape on viewport entry. It also ran continuous animations inside | ||
| filtered SVG scenes. Artwork now stays fully drawn, with deliberate hover reactions. | ||
| - Page hero photos read their bounding rectangle on each pointer move and updated | ||
| three JavaScript springs. They now use a small CSS transform on hover. | ||
| - Glare panels animated background position with blending across large images. | ||
| They now use an opacity transition on a flat tint. | ||
| - Gallery tiles animated blur on entry and changed their aspect ratio after image | ||
| loading, triggering column reflow and React updates. Tiles now reserve their final | ||
| aspect ratio, use object-cover cropping, and remain visible throughout scrolling. | ||
| - Mascots no longer run continuous idle loops or respond to scroll velocity. | ||
| Their explicit greeting, tap, and pose interactions remain. | ||
|
|
||
| These changes remove identified sources of repeated paint and main-thread work. | ||
| No hardware refresh rate or measured FPS improvement is claimed; device-specific | ||
| frame timing still requires a performance trace on the affected device. | ||
|
|
||
| Follow-up validation: `npm run check` passed. The production About page was | ||
| scrolled through and its loaded gallery retained 4:3 tile ratios. At 390px the | ||
| About page had no horizontal overflow and a team profile opened and closed. | ||
| At 1440px the homepage fit the viewport, retained all 15 illustrations, and | ||
| Koda's greeting changed pose and text on tap. No browser errors were reported | ||
| in these checks. The production preview was restarted with the updated build. | ||
|
|
||
| ## PR review corrections | ||
|
|
||
| All nine review findings were valid. Gallery tiles now use committed intrinsic | ||
| image dimensions rather than fixed crop ratios: portrait photos remain uncropped | ||
| and reserve their natural height before loading, without client measurements. | ||
| Avatar and hero mascot `sizes` now match their actual responsive slots. | ||
|
|
||
| The hero mascot keeps its current pose until Next Image's decoded `onLoad` for | ||
| the optimised next pose. The floating mascot invalidates pending pose updates on | ||
| route changes and unmount, and falls back to image loading when `decode()` is absent. | ||
| The stale marquee comment, track animation CSS, and chip fade mask were removed. | ||
| The FAQ now accurately describes the free account needed to read interactive lessons. | ||
|
|
||
| Validation: `npm run check` passed. Browser checks confirmed intrinsic gallery | ||
| width/height attributes, a successful first hero tap, corrected FAQ content, and | ||
| no horizontal overflow at 390px. No browser errors in the checked flow. Legacy | ||
| browser decode fallback and navigation cancellation were checked in code, not | ||
| with a simulated browser environment. |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| Music: "Catalyst" by Scott Buckley | ||
| Released under Creative Commons Attribution 4.0 (CC BY 4.0). | ||
| www.scottbuckley.com.au | ||
| Track: https://www.scottbuckley.com.au/library/catalyst/ | ||
| License: https://creativecommons.org/licenses/by/4.0/ | ||
|
|
||
| Changes: edited excerpt starting at 70 seconds, trimmed to 39.033 seconds, | ||
| with a short entrance fade, a closing fade, and adjusted playback level. | ||
Binary file not shown.
Binary file not shown.
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.