You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the user visits the URL /path/example/view, and a route /Path/Example/mode(View|Edit) is registered in the router, and router uses case insensitive matching, (and maybe if a flag is set on the route/globally), router should replace the current URL with /Path/Example/View.
Why: to have the best of both case sensitive and insensitive matching - a canonical URL for a single resource, users won't have to remember letter cases, and aesthetic preference of /Path/Example/View to /pAtH/eXaMpLe/ViEw.
What does the proposed API look like?
If this should be behind a flag, I see two ways to do that:
A new boolean option, eg. normalizeLetterCases in RouteConfig interface, or
Since 0. would be non-orthogonal with the caseSensitive option, they could be merged into a single letterCase option of type 'strict'|'normalize'|'ignore'
The text was updated successfully, but these errors were encountered:
Unfortunately, there are quite a few edge cases we wouldn't be able to handle like properly changing params or being inflexible by always forcing an option and this being a very specific need that can be solved in user land by doing the needed string manipulation in an afterEach + replace, I would rather keep it that way
What problem does this feature solve?
If the user visits the URL
/path/example/view
, and a route/Path/Example/mode(View|Edit)
is registered in the router, and router uses case insensitive matching, (and maybe if a flag is set on the route/globally), router should replace the current URL with/Path/Example/View
.Why: to have the best of both case sensitive and insensitive matching - a canonical URL for a single resource, users won't have to remember letter cases, and aesthetic preference of
/Path/Example/View
to/pAtH/eXaMpLe/ViEw
.What does the proposed API look like?
If this should be behind a flag, I see two ways to do that:
normalizeLetterCases
inRouteConfig
interface, orcaseSensitive
option, they could be merged into a singleletterCase
option of type'strict'|'normalize'|'ignore'
The text was updated successfully, but these errors were encountered: