1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-02 11:42:42 +01:00
phorge-phorge/src/applications
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
..
almanac Convert complex query subclasses to use internal cursors 2019-03-19 13:02:16 -07:00
aphlict Add a CLI workflow for testing that notifications are being delivered 2018-12-10 16:05:53 -08:00
arcanist/conduit Remove remaining arcanist project code 2015-07-08 19:37:28 +10:00
audit Make "bin/audit delete" synchronize commit audit status, and improve "bin/audit synchronize" documentation 2019-02-13 05:50:14 -08:00
auth Fix an issue with Duo not live-updating properly on login gates 2019-03-29 11:00:38 -07:00
badges Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
base Don't show a "Manage" button in Legalpad if the user is signing a TOS document 2019-03-25 11:30:46 -07:00
cache Remove an old digest in Celerity code and some obsolete configuration options 2019-01-04 13:43:38 -08:00
calendar Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
celerity Fix "Actions" button on Phame standalone/live pages (bonus: JX.sprintf()) 2019-04-04 06:10:14 -07:00
chatlog Replace "getRequestURI()->setQueryParams(array())" with "getPath()" 2019-02-12 14:43:33 -08:00
conduit Fix an exception with user cache generation in "bin/conduit call --as <user>" 2019-03-07 11:48:24 -08:00
config Refine the "Mangled Webserver Response" setup check 2019-03-05 12:58:32 -08:00
conpherence Improve Conpherence behavior for logged out users. 2019-04-02 14:03:08 -07:00
console Fix some minor errors (DarkConsole warning, unstable Ferret sort) 2018-03-18 15:12:25 -07:00
countdown Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
daemon Track total time from task creation to task archival 2019-02-20 14:44:29 -08:00
dashboard Make Portals reachable without knowing the URI 2019-04-02 15:23:36 -07:00
differential Fix the incorrect link target for "Create Revision" as a Menu Item 2019-04-02 15:21:59 -07:00
diffusion Give the "Code" tab in Diffusion more consistent (path-retaining) behavior 2019-03-25 14:45:02 -07:00
diviner Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
doorkeeper Allow Doorkeeper references to have multiple display variations (full, short, etc.) 2018-03-13 11:29:52 -07:00
draft/storage When purging drafts after a transaction edit, purge all drafts 2018-02-11 06:01:09 -08:00
drydock Fix a typo in Drydock "Land" operations 2019-03-15 14:53:05 -07:00
fact Replace all "setQueryParam()" calls with "remove/replaceQueryParam()" 2019-02-14 11:56:39 -08:00
favorites Automatically build mobile menus from navigation, and clean up external ProfileMenu API 2019-04-02 15:17:44 -07:00
feed Convert complex query subclasses to use internal cursors 2019-03-19 13:02:16 -07:00
files Replace all "setQueryParam()" calls with "remove/replaceQueryParam()" 2019-02-14 11:56:39 -08:00
flag Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
fund Improve UI/UX when users try to add an invalid card with Stripe 2019-02-09 05:54:42 -08:00
guides Rename "PHUIDocumentViewPro" to "PHUIDocumentView" 2018-08-28 14:53:07 -07:00
harbormaster Provide a clearer UI for "view all results" in partial result panels 2019-03-25 14:35:08 -07:00
help Redesign header menus and search 2017-01-17 12:13:06 -08:00
herald Index "Call Webhook" in Herald, and show calling rules on the Webhook page 2019-03-07 14:48:14 -08:00
home Update all existing ProfileMenuItems for the more-structured API 2019-04-02 15:20:39 -07:00
legalpad Don't show a "Manage" button in Legalpad if the user is signing a TOS document 2019-03-25 11:30:46 -07:00
lipsum Add "--force" and "--quickly" flags to bin/lipsum 2017-02-27 09:09:41 -08:00
macro Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
maniphest Prevent users from removing task titles with "Bulk Edit" 2019-03-28 09:06:56 -07:00
meta Modularize Repository transactions 2018-11-28 14:29:18 -08:00
metamta Allow "SMTP" and "Sendmail" mailers to have "Message-ID" behavior configured in "cluster.mailers" 2019-03-16 12:35:55 -07:00
multimeter Fix a PhutilURI issue in Multimeter 2019-02-17 17:39:34 -08:00
notification Replace all "setQueryParam()" calls with "remove/replaceQueryParam()" 2019-02-14 11:56:39 -08:00
nuance Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
oauthserver Replace all "setQueryParam()" calls with "remove/replaceQueryParam()" 2019-02-14 11:56:39 -08:00
owners Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
packages Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
passphrase Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
paste Remove "metamta.*.subject-prefix" options 2019-01-17 19:18:50 -08:00
people Update all existing ProfileMenuItems for the more-structured API 2019-04-02 15:20:39 -07:00
phame Fix "Actions" button on Phame standalone/live pages (bonus: JX.sprintf()) 2019-04-04 06:10:14 -07:00
phid Truncate package names in diff table of contents views 2018-06-07 13:17:01 -07:00
phlux Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
pholio Replace all "setQueryParam()" calls with "remove/replaceQueryParam()" 2019-02-14 11:56:39 -08:00
phortune Replace all "setQueryParam()" calls with "remove/replaceQueryParam()" 2019-02-14 11:56:39 -08:00
phpast Update phpast for new UI 2016-04-05 13:52:59 -07:00
phragment Update many Phabricator queries for new %Q query semantics 2018-11-15 03:48:10 -08:00
phrequent Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
phriction Reference raw "title" row in Phriction paging, not "c.title" 2019-03-23 07:27:42 -07:00
phurl Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
policy Update "bin/policy unlock" to be more surgical, flexible, modular, and modern 2019-03-07 12:24:25 -08:00
ponder Replace all "setQueryParam()" calls with "remove/replaceQueryParam()" 2019-02-14 11:56:39 -08:00
project Update all existing ProfileMenuItems for the more-structured API 2019-04-02 15:20:39 -07:00
releeph Convert simple query subclasses to use internal cursors 2019-03-19 13:00:27 -07:00
remarkup/conduit
repository When a repository is inactive, mark its handle as "closed" 2019-03-25 11:25:37 -07:00
search When picking a default menu item to render, don't pick disabled items 2019-04-02 15:21:27 -07:00
settings Fix two minor timezone display issues 2019-03-25 10:53:36 -07:00
slowvote Fix two very, very minor correctness issues in Slowvote 2019-02-07 12:45:11 -08:00
spaces Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08:00
subscriptions Make "Subscribe/Unsubscribe" require only "CAN_VIEW", not "CAN_INTERACT" 2019-02-19 10:52:34 -08:00
support/application
system Allow objects to specify custom policy unlocking behavior, and tasks to have owners unlocked 2019-03-07 12:27:11 -08:00
tokens Allow tokens to be awarded to MFA-required objects 2018-12-28 00:14:48 -08:00
transactions Fix the incorrect link target for "Create Revision" as a Menu Item 2019-04-02 15:21:59 -07:00
typeahead Fix URI construction of typeahead browse "more" pager 2019-02-22 18:09:16 -08:00
uiexample Reduce the cost of generating default user profile images 2018-03-01 16:53:17 -08:00
xhprof Allow XHProf profiles to be drag-and-dropped to upload them 2017-02-23 11:16:19 -08:00