Skip to content

Add information on optional URL parameters #3229

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

Closed
wants to merge 1 commit into from

Conversation

tnorthcutt
Copy link

Closes #2525

Related: #235

@posva
Copy link
Member

posva commented Aug 3, 2020

Thank you for this but I think the documentation is already pointing to the right places at https://router.vuejs.org/guide/essentials/dynamic-matching.html#advanced-matching-patterns

This section of the documentation will be improved in v4 where the path to regex mechanism is internal

@tnorthcutt
Copy link
Author

I understand what you're saying. Respectfully, I think you're missing out on an opportunity to help a lot of people with next to know effort or cost.

It seems extremely likely to me that optional URL parameters are an extremely common use-case among users of vue-router. However, currently the fact that they are possible is buried at the bottom of the page, and is only mentioned in passing as "optional dynamic segments"; to learn how to use them one has to click through to documentation on a dependency and find the examples there.

Introducing the possibility far earlier on the page, right after dynamic segments are introduced, feels much more contextually appropriate, and much more likely to be communicating the right information at the time that a developer might be wondering "can I make these segments optional?".

I really appreciate all of your work on this project, and of course it's your decision to close this. I just wanted to share my reasoning, in the hope that you'll reconsider 😄

@tnorthcutt
Copy link
Author

Also, for what it's worth, as a new contributor it kind of stinks to come across what feels like some missing documentation, then find that there's an already open issue for it (#2525), and think to myself "oh great, I can help out and add this to the docs!", then make a PR and have it closed even though it clearly solves the existing open issue ¯_(ツ)_/¯

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.

Optional dynamic routing parameters in documentation
2 participants