Currently, links are enabled using the ractive framework, which acts in an onclick handler, and then transitions the DOM between page states using javascript. Links, accordingly, have href values of #, since everything's done in the onclick handler.
Unfortunately, this has two main side effects:
Hovering over a link will not produce the correct URL, potentially confusing users who are somewhat technically savvy
Attempting to interact with the link in certain standard browser ways will fail, instead acting as if the link were for the current page (e.g. copying link URLs, opening it in a new tab or window, etc)
This patch addresses that by giving relevant links accurate href values, so that when the onclick handler doesn't take over, they still work. This couldn't be done for the logout links, however, as there seems to be no non-API route for that to fall back to. As part of this process, it renames the old function, URLForPage, to getPageURLFromObject, to make clearer the difference between it and some new functions.
Currently, links are enabled using the ractive framework, which acts in an onclick handler, and then transitions the DOM between page states using javascript. Links, accordingly, have href values of
#
, since everything's done in the onclick handler.Unfortunately, this has two main side effects:
This patch addresses that by giving relevant links accurate
href
values, so that when the onclick handler doesn't take over, they still work. This couldn't be done for the logout links, however, as there seems to be no non-API route for that to fall back to. As part of this process, it renames the old function,URLForPage
, togetPageURLFromObject
, to make clearer the difference between it and some new functions.