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

update internal link in usage page #55

Conversation

josueayala27
Copy link
Contributor

No description provided.

@WickyNilliams
Copy link
Owner

WickyNilliams commented Jun 26, 2024

oh wow, good catch, not sure how i missed that. Or why i would have ever used an absolute link to localhost 🤔

@josueayala27
Copy link
Contributor Author

josueayala27 commented Jun 26, 2024

The Link component was restricted to accept URLs with the pattern /${string}/ or /, which excluded valid URLs containing hashes (#) or other additional characters after the slash (/).

For example, the URL "/components/calendar-range/#events" was not accepted due to this restriction.

So the href property type has been modified to accept any string starting with /, removing the /${string}/ pattern restriction and thereby allowing more flexible and complete URLs.

It is now possible to use the Link component with URLs containing hashes:

<Link href="/components/calendar-range/#events">events</Link>

This change improves the flexibility of the Link component, allowing a wider range of valid URLs.

@WickyNilliams
Copy link
Owner

Ah I should have tested my suggestion first! I wanted the trailing slash to enforce at the type level some consistency in URLs, avoiding redirects from e.g. /page to /page/

Copy link
Owner

@WickyNilliams WickyNilliams left a comment

Choose a reason for hiding this comment

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

Thanks again!

@WickyNilliams WickyNilliams merged commit 599194f into WickyNilliams:main Jul 1, 2024
1 check passed
@josueayala27 josueayala27 deleted the doc/update-usage-event-redirection branch July 1, 2024 17:48
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