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
F13195623: D15733.diff
Sun, May 12, 10:31 PM
F13179631: D15733.diff
Wed, May 8, 9:19 PM
Unknown Object (File)
Sat, May 4, 6:54 PM
Unknown Object (File)
Wed, May 1, 12:21 AM
Unknown Object (File)
Sun, Apr 21, 3:06 PM
Unknown Object (File)
Fri, Apr 19, 4:30 PM
Unknown Object (File)
Thu, Apr 18, 11:35 PM
Unknown Object (File)
Mar 19 2024, 11:08 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.