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

Simplify <Link> active semantics #3231

Closed
taion opened this issue Mar 30, 2016 · 5 comments
Closed

Simplify <Link> active semantics #3231

taion opened this issue Mar 30, 2016 · 5 comments
Labels

Comments

@taion
Copy link
Contributor

taion commented Mar 30, 2016

Prerequisites: #3158, #3172

Once we merge #3158, we'll be able to dramatically simplify the active checking for index-only links – that check will just be a comparison of the link to the path name, with a special case for handling trailing slashes (as the pathname will be canonical outside of the trailing slash).

For consistency, we should consider also updating the semantics on non-index links to just do a prefix check, once we also resolve #3172. Given issues like #3230 (and many related ones), users seem to be confused with the current behavior of path active status calculation. Also, this will dramatically improve #1873, as it will let us avoid running a full route match just to determine if a link path is active.

@taion
Copy link
Contributor Author

taion commented Mar 30, 2016

(but contra what I said in #1873 (comment), in the interest of not making breaking changes without extremely good cause, we should not make onlyActiveOnIndex be the default)

@timdorr
Copy link
Member

timdorr commented Apr 1, 2016

@taion Did you want to tackle the #3158-related issue? I just merged that in.

@taion
Copy link
Contributor Author

taion commented Apr 1, 2016

I want to hold off until we get a release cut. I really don't like having a huge stack of unreleased changes sitting on master.

@taion
Copy link
Contributor Author

taion commented Apr 2, 2016

More people who are confused by the current behavior:

@taion
Copy link
Contributor Author

taion commented Apr 14, 2016

I chatted with @ryanflorence on this. I'm convinced now that the current semantics for route active status are better, because they're more powerful than prefix checking. I'll re-open #3277 and separately just optimize index link handling for now.

@taion taion closed this as completed Apr 14, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants