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
Unknown Object (File)
Tue, May 27, 11:03 AM
Unknown Object (File)
Mon, May 26, 10:36 PM
Unknown Object (File)
Mon, May 26, 7:08 PM
Unknown Object (File)
Mon, May 26, 11:06 AM
Unknown Object (File)
Mon, May 26, 10:23 AM
Unknown Object (File)
Thu, May 8, 9:58 PM
Unknown Object (File)
Tue, May 6, 9:38 AM
Unknown Object (File)
Tue, May 6, 9:38 AM
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.