Page MenuHomePhabricator

Recognize self-URI links to Diffusion files and give them special rendering behavior

Authored by epriestley on May 21 2019, 4:46 PM.



Depends on D20530. Ref T13291. When users paste links to files in Diffusion into remarkup contexts, identify them and specialize the rendering.

When the URIs are embedded with {...}, parse them in more detail.

This is a lead-up to a {src ...} rule which will use the same View but give users more options to customize presentation.

Test Plan

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.May 21 2019, 4:46 PM
epriestley requested review of this revision.May 21 2019, 4:48 PM
epriestley added inline comments.May 21 2019, 4:56 PM

Currently "branch support" is a property of DiffusionRequest, which is mostly a URI-parsing/routing class that handles bundling up and unbundling all the commit/path/line/branch information in a source/xyz/master/path/to/thing.c;abcd1234$12 URI.

This is a legacy sort of thing; I moved it to Repository instead.


I pulled this piece of logic ("find all the URIs which point to this install [with an HTTP/HTTPS protocol]") up into a parent class.

amckinley accepted this revision.May 21 2019, 7:09 PM
This revision is now accepted and ready to land.May 21 2019, 7:09 PM