layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

[Static Assets] Apply withPrefix to brand asset downloads, add $external on case study PDF buttons, and improve modal accessibility

Open ayushbuilds-code opened this issue 3 weeks ago • 0 comments

Description

Across several brand assets and collection case studies:

  1. Brand Kit Downloads Missing withPrefix: In PR #8356, withPrefix was added to layer5.js and brand-guide.js so that static asset downloads resolve correctly in PR preview deployments (PATH_PREFIX=pr-preview/pr-XYZ). However, 16 other brand kit download links in src/sections/Company/Brand/ still use plain href="/brand/*.zip", causing 404s on preview builds.
  2. Case Study PDF Buttons Missing $external={true}: In src/collections/resources/case-study/*, the "Download Case Study" buttons link to static /case-studies/*.pdf files but lack $external={true}. Without $external, Button wraps the download in Gatsby's <Link to="...">, attempting client-side SPA routing instead of downloading the static PDF.
  3. Automatic withPrefix in Button: Update Button (src/reusecore/Button/index.js) to automatically pass root-relative $external URLs through Gatsby's withPrefix so static file downloads (e.g. PDFs, slides) always resolve cleanly in both production and preview deployments.
  4. Hardcoded Domain in Blog Post: In src/collections/blog/2023/08-23-importance-of-github-stars/index.mdx, replace https://layer5.io/five/vol1/... with the site-relative path.
  5. Modal Close Button Accessibility: Add aria-label="Close modal" to the TeaserModal close button (src/components/TeaserModal/index.js) so assistive technologies can identify the button.

Expected Behavior

  • All static brand kit zip download links use withPrefix.
  • Case study PDF buttons include $external={true} and open as standard downloads.
  • Static asset buttons with root-relative paths automatically resolve using withPrefix.
  • TeaserModal close button is accessible with an aria-label.

Affected Locations

  • src/reusecore/Button/index.js
  • src/components/TeaserModal/index.js
  • src/sections/Company/Brand/index.js
  • src/sections/Company/Brand/Brand-components/*.js (15 components)
  • src/collections/resources/case-study/* (3 case studies)
  • src/collections/blog/2023/08-23-importance-of-github-stars/index.mdx

ayushbuilds-code avatar Nov 10 '26 20:11 ayushbuilds-code