Open tijmenbaarda opened 4 days ago
Regarding links that should be handled by the backend rather than the SPA, I think it will suffice if you include the domain and a scheme in the URL. For example, change <a href="/login">
into <a href="//localhost:8000/login">
.
As for an <a role=button href="#">
, I agree that it should not be intercepted by the link enabler. But what if the href
is something more elaborate? Is there really such a strict semantic that anything with role=button
should never lead to route changes?
As for an
<a role=button href="#">
, I agree that it should not be intercepted by the link enabler. But what if thehref
is something more elaborate? Is there really such a strict semantic that anything withrole=button
should never lead to route changes?
Now I think of it more carefully: I think you are right. Take GrETEL, where the application state can be very carefully reproduced from the URL. This application also tracks the configuration, which is set using buttons, in the URL. These buttons are clearly not links, but they do change the URL.
Would you rather make an exception for <a href="#">
?
Yes, I think an exception for href="#"
(also with <area>
elements) would be useful.
In the the EDPOP vre, we have certain internal links in the UI that are not handled by the SPA but instead by the backend. There are also a number of
<a>
elements that act like buttons (they have#
as their anchor and they include therole="button"
property). I don't see a way inmakeLinkEnabler
to exclude specific links. I would propose the following:<a>
elements withclass="backbone-util-no-spa"
(better suggestions welcome)<a>
elements withrole="button"
, because they should never act as links@jgonggrijp : if you agree, I will create a pull request for these changes.