layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

[Navigation] Fix inactive Button links, missing $external prop for external URLs, and hardcoded domains

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

Description

The Button component (src/reusecore/Button/index.js) expects styled-components transient props ($primary, $secondary, $url, and $external). In several pages across collections and site sections:

  1. Inactive / Dead Buttons: Several buttons use url="..." instead of $url="...", which causes props.$url to evaluate to undefined, rendering completely inactive/unclickable buttons (e.g. "Participate" in LFX 2024 and GSoC 2024, "Get free ebook" in Service Mesh books, and Live stream buttons in events).
  2. Missing $external Prop: Several buttons point to external domains (https://play.meshery.io, https://badges.layer5.io, https://slack.layer5.io, https://smp-spec.io, etc.) without passing $external={true} or by using plain external={true}. Without $external, Button wraps the element in Gatsby's <Link to="...">, attempting client-side SPA routing on external URLs instead of opening standard <a href="..." target="_blank">.
  3. Hardcoded Domains: Several button links hardcode https://layer5.io/... for internal routes, bypassing Gatsby client-side navigation and breaking PR preview environments.
  4. Unprefixed Props: Unprefixed props like primary and secondary are passed to Button, which are ignored by styled-components ($primary / $secondary) and forwarded as invalid attributes to the DOM.

Expected Behavior

  • All button links use $url so that they are active and functional.
  • External links use $external={true} so that they render <a href="..." target="_blank" rel="noreferrer">.
  • Internal Layer5 links use root-relative paths.
  • Transient props ($primary, $secondary) are used consistently for correct button styling.

Affected Locations

  • src/collections/programs/lfx-2024/lfx-2024.mdx
  • src/collections/programs/gsoc-2024/index.mdx
  • src/collections/service-mesh-books/the-enterprise-path-to-service-mesh-architectures-2nd-Edition/index.mdx
  • src/collections/service-mesh-books/the-enterprise-path-to-service-mesh-architectures/index.mdx
  • src/collections/events/2024/making-the-cncf-landscape-interactive-with-meshery/index.mdx
  • src/collections/events/2024/kubecon-EU-2024/index.mdx
  • src/collections/blog/2022/2022-10-19-kubeconna2022/index.mdx
  • src/collections/resources/interview/techstrong-tv.mdx
  • src/sections/Kanvas/Kanvas-design/kanvas-design-banner.js
  • src/sections/Products/index.js
  • src/sections/Projects/SMP/index.js
  • src/sections/gitops/index.js
  • src/sections/Community/index.js
  • src/sections/Community/Members-grid/index.js
  • src/sections/Community/Web-based-from/index.js
  • src/components/Call-To-Actions/CTA_Bottom/index.js
  • src/components/TeaserModal/index.js

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