Skip to content

fix: Console runtime warnings sitewide#316

Open
jschhie wants to merge 6 commits intopreprodfrom
fix/console-runtime-warnings-sitewide
Open

fix: Console runtime warnings sitewide#316
jschhie wants to merge 6 commits intopreprodfrom
fix/console-runtime-warnings-sitewide

Conversation

@jschhie
Copy link
Copy Markdown
Collaborator

@jschhie jschhie commented Mar 23, 2026

Summary

  • Console Clean Up: Resolved runtime warnings sitewide and fixed undefined variables access
  • Bandwidth Optimization: Restricted Hero image preloading to the Home page only
    • Saved 462.1 kB per session on non-Home pages, improving billable Vercel Fast Data Transfer
  • Screen-Reader Accessibility: Improved WCAG compliance by removing unnecessary alt text on decorative assets

Approach

  • Bandwidth Optimization (Sitewide): Moved preload links from shared index.html into <Hero/> logic only
  • Repo Clean Up: Delete outdated Hero image and OurProjects/Hero.vue & remove unused imports
  • Refactor (Impact Page): Remove access to undefined variables (showAll, smallScreen)

Screenshots: Resolved Warnings

1. Sitewide: Unused preload link

(Non-Home pages did not use either hero images; Home page did not use the outdated hero-illustration.png)

Before (Game Page during gameplay) After
before gameplay runtime preload link warnings after gameplay clear console warnings
Before (Home Page) After
before runtime preload link warnings after clear console warning for unused preload link

2. Chrome DevTools: Network Logs

Tested on personal Vercel in incognito mode with cache disabled

  • Before: All pages preloaded unused Hero assets; each first-time page visit wasted 462.1 kB of bandwidth
  • After: Remove unused asset (hero-illustration.png, a blue geometric shape); only Home page loads actual Hero image (hero-resized.png, Carl mascot)
Network Logs on main branch (Sampled from "Team" Page)
no cache incognito vercel non-home page

3. Impact Page: Access to undefined variables

Before After
impact research tech warnings undefined vars after impact page warnings

Manual Tests

  • Local dev + deployed on personal Vercel
  • Chrome DevTools Console: Resolved warnings above
  • Chrome DevTools Network:
    • Only Home Page preloads Hero image (Priority: u=1, i)
    • Other pages no longer request irrelevant Hero images
  • Gameplay: Sampled 1+ games per category

Future Work

  • Resolve remaining warnings

jschhie added 2 commits March 11, 2026 14:30
- Remove unused pre-load link in index.html to resolve runtime warnings
- Remove unused hero image asset from repo
- Remove unused, undefined vars ('showAll', 'smallScreens') in Research Tech
- Variables were unapplicable since 'items2' array was too small (length = 3)
    but UI logic checked for length between 4-8 items
- Remove unused Tailwind transition classes
@jschhie jschhie self-assigned this Mar 23, 2026
@jschhie jschhie added bug Something isn't working accessibility This issue needs to be resolved for ADA compliance labels Mar 23, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
audemywebsite Ready Ready Preview, Comment Mar 23, 2026 9:37pm

id="div_about_us"
class="flex flex-wrap justify-center gap-6 mt-[40px] tablet:mt-[72px] mb-[32px] w-full transition-all duration-500 ease-in-out"
>
<div
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Before: Inapplicable UI logic/Tailwind classes since items2 array length is 3, but template checks for 4-8 items
  • After: Removed undefined variables (showAll, smallScreen) to resolve access warnings and correctly reflect UI logic

(Initial :class rules appear to be copied from PressList.vue. See below)

`PressList.vue` snippet for reference
<!--- (PressList.vue) -->
<div
  v-for="(item, index) in displayedItems"
  :key="index"
  class="flex animate-fade-slide-in"
  :class="{
    'opacity-0 translate-y-4':
      (smallScreen ? index >= 4 : index >= 8) && !showAll,
    'opacity-100 translate-y-0':
      showAll || (smallScreen ? index < 4 : index < 8),
  }"
>


<script defer type="module" src="/src/main.js"></script>

<link
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Refactored for sitewide performance; see inline docs in modified src/pages/Home/Hero/Hero.vue)

jschhie added 4 commits March 23, 2026 14:35
- Set empty alt text for decorative img tags
- Remove preload link in 'index.html' script  (triggered sitewide console warnings)
- Add matching preload link in onMounted() for <Hero/> (Home Page)
- Improve performance sitewide, reduce extra preloaded image assets
@jschhie jschhie force-pushed the fix/console-runtime-warnings-sitewide branch from feccf7d to 4e97ea7 Compare March 23, 2026 21:36
@jschhie jschhie added the chore Maintenance tasks that don’t affect code logic (ex: Prettier, repo cleanup, file renaming, configs) label Mar 23, 2026
@jschhie jschhie marked this pull request as ready for review March 23, 2026 21:46
@jschhie jschhie requested a review from master-of-none March 23, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility This issue needs to be resolved for ADA compliance bug Something isn't working chore Maintenance tasks that don’t affect code logic (ex: Prettier, repo cleanup, file renaming, configs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant