Skip to content
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

fix: support root-relative URLs in EsButton #1554

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

ericdouglaspratt
Copy link
Collaborator

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

  • Previously, EsButton, when given either an href or to prop, would pass those to NuxtLink. NuxtLink will externally navigate with a full URL like https://www.google.com, but if provided a root-relative URL like /market/start/, it will attempt to internally navigate and result in a 404, even though that URL does exist on our domain.
  • This changes EsButton so that if href is provided, we use an <a> tag, and if to is provided, we use a NuxtLink. This allows downstream applications to decide whether they need an internal or external navigation on a link, rather than the design system forcing one upon them that may not work.

πŸ₯Ό Testing

  • Tested locally with es-cms-pages and LandingCtaFullWidthImage

🧐 Feedback Requested / Focus Areas

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.
  • I have documented testing approach

Copy link

swarmia bot commented Oct 23, 2024

Copy link
Contributor

@hroth1994 hroth1994 left a comment

Choose a reason for hiding this comment

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

LGTM! 🌟

@ericdouglaspratt ericdouglaspratt merged commit 34c83e1 into esds-3.0-vue3-primevue Oct 24, 2024
1 check passed
@ericdouglaspratt ericdouglaspratt deleted the ced-1900-es-button-link-fix branch October 24, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants