On Mon, Aug 8, 2016, at 11:35 PM, Boris Zbarsky wrote: > On 8/8/16 9:02 AM, Xidorn Quan wrote: > > Would that make it harder for people to jump into some file directly via > > history (or awesome bar)? > > I _think_ the suggestion is as follows: > > When you click a link to a particular line in dxr, that would normally > navigate from https://dxr/foo to https://dxr/foo#lineno. Instead, have > it navigate to https://dxr/rev/foo#lineno. If done as a straight > navigation, it's annoying, because it reloads the page. So instead, do > it as a pushState that changes the url. > > Where is the bad interaction with the awesome bar?
e.g. assuming you've visited "https://dxr/source/foo" before, and then you input "dxr foo" in the awesome bar in hope that "https://dxr/source/foo" would show up again, however, with this proposal, you may see lots of "https://dxr/rev/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/foo" instead of the short neat url you desired. That is the potential problem. Also I wonder whether it would cause undesired result when restoring pages? If you use pushState to change the url, what url would be used when the browser has to restore the page, assuming the browser drops all cache when exiting? So I'd rather suggest we do the reverse way: allow people to paste non-perma links, but convert them at some point to perma links according to the time they are posted. For example, Bugzilla can do something like, appending a "?time=YYYY-mm-ddTHH:mm:ssZ" to DXR urls, and DXR automatically redirects to the corresponding rev url when there is such parameter. - Xidorn _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform