layer5
layer5 copied to clipboard
[Navigation] Fix inactive Button links, missing $external prop for external URLs, and hardcoded domains
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:
- Inactive / Dead Buttons: Several buttons use
url="..."instead of$url="...", which causesprops.$urlto evaluate toundefined, 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). - Missing
$externalProp: 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 plainexternal={true}. Without$external,Buttonwraps the element in Gatsby's<Link to="...">, attempting client-side SPA routing on external URLs instead of opening standard<a href="..." target="_blank">. - Hardcoded Domains: Several button links hardcode
https://layer5.io/...for internal routes, bypassing Gatsby client-side navigation and breaking PR preview environments. - Unprefixed Props: Unprefixed props like
primaryandsecondaryare passed toButton, which are ignored by styled-components ($primary/$secondary) and forwarded as invalid attributes to the DOM.
Expected Behavior
- All button links use
$urlso 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.mdxsrc/collections/programs/gsoc-2024/index.mdxsrc/collections/service-mesh-books/the-enterprise-path-to-service-mesh-architectures-2nd-Edition/index.mdxsrc/collections/service-mesh-books/the-enterprise-path-to-service-mesh-architectures/index.mdxsrc/collections/events/2024/making-the-cncf-landscape-interactive-with-meshery/index.mdxsrc/collections/events/2024/kubecon-EU-2024/index.mdxsrc/collections/blog/2022/2022-10-19-kubeconna2022/index.mdxsrc/collections/resources/interview/techstrong-tv.mdxsrc/sections/Kanvas/Kanvas-design/kanvas-design-banner.jssrc/sections/Products/index.jssrc/sections/Projects/SMP/index.jssrc/sections/gitops/index.jssrc/sections/Community/index.jssrc/sections/Community/Members-grid/index.jssrc/sections/Community/Web-based-from/index.jssrc/components/Call-To-Actions/CTA_Bottom/index.jssrc/components/TeaserModal/index.js