1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00
phorge-phorge/webroot/rsrc/css/phui
epriestley 4811e6e7c1 Require several advanced postgraduate degrees to understand object policies
Summary:
Fixes T11836. See some prior discussion in T8376#120613.

The policy hint in headers in the UI is not exhaustive, and can not reasonably be exhaustive. For example, on a revision, it may say "All Users", but really mean "All users who can see the space this object is in and the repository it belongs to, plus the revision author and reviewers".

These rules are explained if you click (and, often, in the documentation), but "All Users" is still at least somewhat misleading.

I don't think there's any perfect solution here that balances the needs of both new and experienced users perfectly, but this change tries to do a bit better about avoiding cases where we say something very open (like "All Users") when the real policy is not very open.

Specifically, I've made these changes to the header:

  - Spaces are now listed in the tag, so it will say `(S3 > All Users)` instead of `(All Users)`. They're already listed in the header, this just makes it more explicit that Spaces are a policy container and part of the view policy.
  - Extended policy objects are now listed in the tag, so it will say `(S3 > rARC > All Users)` for a revision in the Arcanist repository which is also in Space 3.
  - Objects can now provide a "Policy Codex", which is an object that represents a rulebook of more sophisticated policy descriptions. This codex can replace the tag with something else.
    - Imported calendar events now say "Uses Import Policy" instead of, e.g., "All Users".

I've made these changes to the policy dialog:

  - Split it into more visually separate sections.
  - Added an explicit section for extended policies ("You must also have access to these other objects: ...").
  - Broken the object policy rules into a "Special Rules" section (for rules like "you can only see a revision if you can see the repository it is part of") and an "Object Policy" section (for the actual object policy).
  - Tried to make it a little more readable?
  - The new policy dialogs are great to curl up with in front of a fire with a nice cup of cocoa.

I've made these changes to infrastructure:

  - Implementing `PhabricatorPolicyInterface` no longer requires you to implement `describeAutomaticCapability()`.
  - Instead, implement `PhabricatorPolicyCodexInterface` and return a `PhabricatorPolicyCodex` object.
  - This "codex" is a policy rulebook which can set all the policy icons, labels, colors, rules, etc., to properly explain complex policies.
  - Broadly, the old method was usually either not useful (most objects have no special rules) or not powerful enough (objects with special rules often need to do more in order to explain them).

Test Plan:
{F1912860}

{F1912861}

{F1912862}

{F1912863}

Reviewers: chad

Reviewed By: chad

Subscribers: avivey

Maniphest Tasks: T11836

Differential Revision: https://secure.phabricator.com/D16830
2016-11-09 15:05:38 -08:00
..
calendar Redesign Application Search 2016-08-01 12:23:36 -07:00
workboards Revert "Clean up more Quicksand" 2016-10-01 12:58:30 -07:00
phui-action-list.css
phui-action-panel.css
phui-badge.css Links on badge card should be accessible 2016-04-15 07:55:31 -07:00
phui-basic-nav-view.css Revert "Clean up more Quicksand" 2016-10-01 12:58:30 -07:00
phui-big-info-view.css
phui-box.css Increase specificity in blue property boxes 2016-05-03 17:26:31 -07:00
phui-button.css Clean up menu folding in action list 2016-06-21 14:39:55 -07:00
phui-chart.css
phui-cms.css Rough in of NUX Guide steps 2016-08-20 14:05:12 -07:00
phui-comment-form.css Redesign Comment Box 2016-11-09 10:36:25 -08:00
phui-crumbs-view.css Printable pages for PHUIDocumentViewPro 2016-09-08 19:14:32 -07:00
phui-curtain-view.css Add a few more high contrast CSS rules 2016-09-07 11:03:05 -07:00
phui-document-pro.css Printable pages for PHUIDocumentViewPro 2016-09-08 19:14:32 -07:00
phui-document-summary.css
phui-document.css Remove PHUIDocumentView 2016-08-08 09:39:48 -07:00
phui-feed-story.css Remove box-shadow from feed story actors 2016-10-11 11:15:02 -07:00
phui-fontkit.css
phui-form-view.css Redesign Comment Box 2016-11-09 10:36:25 -08:00
phui-form.css
phui-head-thing.css Update Diffusion UI 2016-03-17 12:05:14 -07:00
phui-header-view.css Require several advanced postgraduate degrees to understand object policies 2016-11-09 15:05:38 -08:00
phui-hovercard.css
phui-icon-set-selector.css
phui-icon.css Basic Conpherence Search in Thread 2016-10-13 12:29:50 -07:00
phui-image-mask.css
phui-info-panel.css
phui-info-view.css Update Diffusion UI 2016-03-17 12:05:14 -07:00
phui-invisible-character-view.css Added initial class for displaying invisible chars 2016-09-12 21:57:01 -04:00
phui-list.css
phui-object-box.css Convert Differential to new layout 2016-03-12 13:04:21 -08:00
phui-object-item-list-view.css Add some icons/color to Config Settings UI 2016-08-30 12:58:15 -07:00
phui-pager.css
phui-pinboard-view.css
phui-profile-menu.css Fix collapse background color on profile-menu 2016-10-05 15:16:45 -07:00
phui-property-list-view.css Break white-space on tags in any property list 2016-06-24 13:42:53 -07:00
phui-remarkup-preview.css
phui-segment-bar-view.css
phui-spacing.css
phui-status.css New icons, colors for per reviewer status 2016-05-01 12:52:40 -07:00
phui-tag-view.css Update Maniphest for PHUITwoColumnView 2016-03-04 17:26:38 -08:00
phui-timeline-view.css add renderValue() in transactions 2016-07-08 16:59:25 -07:00
phui-two-column-view.css Clean up mobile css on config page 2016-10-19 15:03:47 -07:00