Page MenuHomePhabricator

Show missing Phriction documents as red links, invisible documents with a lock
ClosedPublic

Authored by hach-que on Apr 16 2016, 4:05 AM.
Tags
None
Referenced Files
F13288704: D15733.diff
Tue, Jun 4, 10:49 AM
F13254480: D15733.diff
Sat, May 25, 3:26 AM
F13246807: D15733.id37915.diff
Thu, May 23, 2:09 PM
F13233768: D15733.diff
Tue, May 21, 2:34 AM
F13218657: D15733.diff
Sat, May 18, 1:02 PM
F13211987: D15733.diff
Fri, May 17, 6:17 AM
F13195623: D15733.diff
Sun, May 12, 10:31 PM
F13179631: D15733.diff
Wed, May 8, 9:19 PM
Subscribers

Details

Summary

Ref T7691 (errata). This shows links to Phriction documents in red if they're missing, and links to Phriction documents in grey with a lock icon if the user doesn't have the correct permissions to see the document.

Test Plan

Tested a bunch of different configurations:

[[ ./../ ]] Back to Main Document
[[ ./../subdocument_2]] Mmmm more documents
[[ ./../invisible_document]] Mmmm more documents

[[ ./../ | Explicit Title ]] Back to Main Document
[[ ./../subdocument_2 | Explicit Title ]] Mmmm more documents
[[ ./../invisible_document | Explicit Title ]] Mmmm more documents

[[ ]] Absolute link
[[ subdocument_2 ]] Absolute link
[[ invisible_document ]] Absolute link

[[ | Explicit Title ]] Absolute link
[[ subdocument_2 | Explicit Title ]] Absolute link
[[ invisible_document | Explicit Title ]] Absolute link

Got the expected result:

pasted_file (439×324 px, 38 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

hach-que retitled this revision from to Show missing Phriction documents as red links, invisible documents with strikethrough.
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.
webroot/rsrc/css/application/phriction/phriction-document-css.css
48

I don't think strikethrough means 'no-permissions', it usually means closed/inactive/deleted. Probably no text-decoration might be better?

webroot/rsrc/css/application/phriction/phriction-document-css.css
48

oh yeah i'm a derp

hach-que edited edge metadata.

i fixed it

hach-que retitled this revision from Show missing Phriction documents as red links, invisible documents with strikethrough to Show missing Phriction documents as red links, invisible documents with a lock.Apr 16 2016, 4:29 AM
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que edited edge metadata.
epriestley edited edge metadata.

Vague stylistic nitpicks inline, thanks for fixing this stuff!

src/applications/phriction/markup/PhrictionRemarkupRule.php
60–62

Maybe simpler as:

$link = rtrim($link, '/').'/';
135–142

You can omit null as the third parameter to idx(), since it's the default.

152

This should just be $visible_documents[$link] I think?

This revision is now accepted and ready to land.Apr 16 2016, 6:54 AM
hach-que edited edge metadata.

Stylistic nitpicks

This revision was automatically updated to reflect the committed changes.