-
-
Notifications
You must be signed in to change notification settings - Fork 842
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
Use Link component for links instead of mithril route patch #2315
Conversation
Huh? I thought we changed all occurrences of |
I'm fine with that, I just want to get the core structure finalized before updating 30 extensions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm globally ok with the change, I'm just unsure how much we want to document the changes to LinkButton
?
Previously all links would be handled internally, unless an empty config
method was passed to override the default m.route
.
Now the new implementation uses what I see at line 26 of the Link
component that is based on absolute vs relative links.
Don't we also sometime use absolute links for internal routing? Like for Mentions. That would be a change of behavior. I'm not entirely convinced it's a good idea to change the type on link based on whether the link is absolute. Also is the includes()
test completely resilient against ://
appearing elsewhere in the URL?
You bring up a good point. The absolute/relative link thing would be cool, but needs more testing and discussion to make sure it is right. Let's remove that part for now, but keep the rest? |
That would seem good to me 👍 We just need to add some way for |
Yeah that sounds good... Actually.... I suppose we could pass that "external" flag all the way to Link, and use that instead of ://? Would still be nicer than what we're doing now for notifications |
…inks are now handled by the Link component
df8f2b6
to
e98ab11
Compare
Any reason why we are specifying external links? Does m.route.Link not work with external links? Apart from that, LGTM. |
From what I remember, it doesn't |
I approved, but I do also wonder why we decided to not extend m.route.Link. It's not important tho, and without extending it we can handle external links as well. |
Given that the goal is to make things more direct, I thought that explictly including one link or another by composition would be preferable |
This PR:
route
mithril patch. This is deprecated and not removed because: