1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-02 09:58:24 +01:00
phorge-phorge/webroot/rsrc/css/phui
epriestley 248d79f36d Fix "Actions" button on Phame standalone/live pages (bonus: JX.sprintf())
Summary:
See <https://discourse.phabricator-community.org/t/non-functional-actions-menu-on-live-phame-views/2593>. Several layers here:

The "Actions" button is broken because a menu behavior is failing, since we aren't rendering the menu.

When a behavior fails to initialize, catch and log the exception and continue. Previously, we stopped initializing behaviors if any failed, but behaviors are usually independent and continuing with an explicit exception seems reasonable.

Give "JX.log()" some "sprintf()" semantics to make logging the behavior failure easier. We can probably afford these extra 200 bytes now in 2019.

This fixes the button and gives us explicit errors in the log. So far, so good.

Then, when a page won't render chrome, don't try to render the main menu. This fixes the actual errors (we no longer try to initialize menu behaviors for nodes which don't exist).

Completely hide the "Actions" and "Comment" flows if the viewer isn't logged in. Although this isn't completely consistent with other applications, I think it's more appropriate for Phame. In applications like Maniphest, we show a full set of controls (but disable them) so that users who are not currently logged in have a clear path to interact with the content, under the assumption that this is a relatively common workflow. This is probably less common for Phame, where we expect most anonymous viewers not to log in or interact.

Finally, parametrize a one-off border color and add a border under the crumbs at the top of the page.

Test Plan:
  - Viewed a "Live" Phame blog post page, clicked "Actions", got a dropdown.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20378
2019-04-04 06:10:14 -07:00
..
button Allow Phriction document edits to be saved as drafts 2018-09-12 13:30:40 -07:00
calendar Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
object-item Allow profile menu items to be locked to the top or bottom of the menu 2019-04-02 15:08:20 -07:00
workboards Give workboard column header actions a more clickable appearance 2019-03-27 14:56:18 -07:00
phui-action-list.css Allow users to be approved from the profile "Manage" page, alongside other similar actions 2019-02-07 15:04:23 -08:00
phui-action-panel.css Add setImage to PHUIActionPanelView 2017-07-30 13:20:26 -07:00
phui-badge.css Build a Badges page for Profiles 2017-02-24 13:15:42 -08:00
phui-basic-nav-view.css Align sidenavs better, use sky to highlight 2017-08-28 16:36:41 -07:00
phui-big-info-view.css Allow images to be used with PHUIBigInfoView 2017-08-03 18:56:19 -07:00
phui-box.css Make bulk editor working set editable and more homogenous 2018-01-19 12:39:27 -08:00
phui-bulk-editor.css Restore bulk edit support for remarkup fields (description, add comment) 2018-01-19 12:45:34 -08:00
phui-chart.css Swap charts from gRaphael to D3 2016-02-01 10:36:59 -08:00
phui-cms.css Rough in of NUX Guide steps 2016-08-20 14:05:12 -07:00
phui-comment-form.css Lots of little fixes for Dark Mode (Experimental) 2017-07-19 14:41:23 -07:00
phui-comment-panel.css Hide badges in phui-comment-panel 2016-12-02 11:02:53 -08:00
phui-crumbs-view.css Allow navigation breadcrumbs to be marked as "always visible" so they show up on phones 2018-05-09 13:21:47 -07:00
phui-curtain-view.css Make PHUITwoColumnView a little more printable 2017-09-25 19:56:22 +00:00
phui-document-pro.css Fix "Actions" button on Phame standalone/live pages (bonus: JX.sprintf()) 2019-04-04 06:10:14 -07:00
phui-document-summary.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-document.css Add a UI element for navigating between versions of a Phriction document 2018-08-29 13:49:15 -07:00
phui-feed-story.css Remove box-shadow from feed story actors 2016-10-11 11:15:02 -07:00
phui-fontkit.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-form-view.css When users confirm Duo MFA in the mobile app, live-update the UI 2019-02-15 14:38:15 -08:00
phui-form.css Fix Firefox select dropdowns, maybe 2017-07-27 19:24:12 -07:00
phui-head-thing.css Update Diffusion UI 2016-03-17 12:05:14 -07:00
phui-header-view.css Allow task statuses to specify that either "comments" or "edits" are "locked" 2019-02-15 19:18:40 -08:00
phui-hovercard.css Improve text overflow behavior for hovercards with (for example) long package names 2018-11-15 20:43:10 -08:00
phui-icon-set-selector.css Add more color/CSS to phui-icon-selector 2017-02-04 10:13:32 -08:00
phui-icon.css When an edit overrides an object lock, note it in the transaction record 2019-02-09 06:10:07 -08:00
phui-image-mask.css Move rgba rules into CelerityDefaultPostprocessor 2016-02-16 09:54:43 -08:00
phui-info-view.css Add CSRF to SMS challenges, and pave the way for more MFA types (including Duo) 2019-01-24 15:10:57 -08:00
phui-invisible-character-view.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-left-right.css Update Diffusion File UI for single column 2017-08-21 13:35:25 -07:00
phui-lightbox.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-list.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-object-box.css When users follow an email login link but an install does not use passwords, try to get them to link an account 2019-02-15 14:41:31 -08:00
phui-pager.css Add a selected color state to PHUIPagerView 2017-06-06 17:00:39 -07:00
phui-pinboard-view.css Add an Experimental Dark Mode to Phabricator 2017-07-18 06:44:32 -07:00
phui-property-list-view.css Add "max-width: 100%;" to stop large images from overflowing the new rendering engine UI 2018-06-01 14:53:10 -07:00
phui-remarkup-preview.css Clean up Remarkup Preview on mobile 2017-04-17 22:11:08 +00:00
phui-segment-bar-view.css Redesign Home/Profile/Projects side navigation 2017-01-31 08:59:01 -08:00
phui-spacing.css PHUIButtonView class 2013-06-12 18:23:35 -07:00
phui-status.css New icons, colors for per reviewer status 2016-05-01 12:52:40 -07:00
phui-tag-view.css Show user availability dots (red = away, orange = busy) in typeaheads, tokenizer tokens, and autocompletes 2019-02-19 10:57:20 -08:00
phui-timeline-view.css Remove the caret dropdown from transaction lists when no actions are available 2018-01-29 15:14:59 -08:00
phui-two-column-view.css Make PHUITwoColumnView a little more printable 2017-09-25 19:56:22 +00:00