@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve style of notifications

Summary:
- Gets about 25% of the way toward @chad's notification mocks.
- YES: Hover states, entire notification is a click target, border, header, footer.
- NO: Profile pictures (lazy), timestamps (want to refactor time code before introducing a new formatting style), app icons (they'd look funny without timestamps I think)
- Deletes some old files.
- Mostly trying to get this good enough to turn on by default.

Test Plan: Looked at notifications. Clicked some notifications.

Reviewers: chad, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D4119

+149 -89
+76 -75
src/__celerity_resource_map__.php
··· 942 942 ), 943 943 'javelin-behavior-aphlict-dropdown' => 944 944 array( 945 - 'uri' => '/res/e9b6fd18/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js', 945 + 'uri' => '/res/f09bc90d/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js', 946 946 'type' => 'js', 947 947 'requires' => 948 948 array( ··· 951 951 2 => 'javelin-stratcom', 952 952 3 => 'javelin-vector', 953 953 4 => 'javelin-dom', 954 + 5 => 'javelin-uri', 954 955 ), 955 956 'disk' => '/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js', 956 957 ), ··· 2638 2639 ), 2639 2640 'phabricator-notification-menu-css' => 2640 2641 array( 2641 - 'uri' => '/res/b0d1caec/rsrc/css/application/base/notification-menu.css', 2642 + 'uri' => '/res/a9ff4f31/rsrc/css/application/base/notification-menu.css', 2642 2643 'type' => 'css', 2643 2644 'requires' => 2644 2645 array( ··· 3192 3193 ), array( 3193 3194 'packages' => 3194 3195 array( 3195 - '668bdb91' => 3196 + '6e75f775' => 3196 3197 array( 3197 3198 'name' => 'core.pkg.css', 3198 3199 'symbols' => ··· 3236 3237 36 => 'phabricator-crumbs-view-css', 3237 3238 37 => 'phabricator-object-item-list-view-css', 3238 3239 ), 3239 - 'uri' => '/res/pkg/668bdb91/core.pkg.css', 3240 + 'uri' => '/res/pkg/6e75f775/core.pkg.css', 3240 3241 'type' => 'css', 3241 3242 ), 3242 - '5673560d' => 3243 + '5bcc25b6' => 3243 3244 array( 3244 3245 'name' => 'core.pkg.js', 3245 3246 'symbols' => ··· 3276 3277 29 => 'phabricator-textareautils', 3277 3278 30 => 'phabricator-file-upload', 3278 3279 ), 3279 - 'uri' => '/res/pkg/5673560d/core.pkg.js', 3280 + 'uri' => '/res/pkg/5bcc25b6/core.pkg.js', 3280 3281 'type' => 'js', 3281 3282 ), 3282 3283 '3c5efda9' => ··· 3424 3425 'reverse' => 3425 3426 array( 3426 3427 'aphront-attached-file-view-css' => '7839ae2d', 3427 - 'aphront-crumbs-view-css' => '668bdb91', 3428 - 'aphront-dialog-view-css' => '668bdb91', 3429 - 'aphront-error-view-css' => '668bdb91', 3430 - 'aphront-form-view-css' => '668bdb91', 3428 + 'aphront-crumbs-view-css' => '6e75f775', 3429 + 'aphront-dialog-view-css' => '6e75f775', 3430 + 'aphront-error-view-css' => '6e75f775', 3431 + 'aphront-form-view-css' => '6e75f775', 3431 3432 'aphront-headsup-action-list-view-css' => 'c904bbee', 3432 - 'aphront-headsup-view-css' => '668bdb91', 3433 - 'aphront-list-filter-view-css' => '668bdb91', 3434 - 'aphront-pager-view-css' => '668bdb91', 3435 - 'aphront-panel-view-css' => '668bdb91', 3436 - 'aphront-side-nav-view-css' => '668bdb91', 3437 - 'aphront-table-view-css' => '668bdb91', 3438 - 'aphront-tokenizer-control-css' => '668bdb91', 3439 - 'aphront-tooltip-css' => '668bdb91', 3440 - 'aphront-typeahead-control-css' => '668bdb91', 3433 + 'aphront-headsup-view-css' => '6e75f775', 3434 + 'aphront-list-filter-view-css' => '6e75f775', 3435 + 'aphront-pager-view-css' => '6e75f775', 3436 + 'aphront-panel-view-css' => '6e75f775', 3437 + 'aphront-side-nav-view-css' => '6e75f775', 3438 + 'aphront-table-view-css' => '6e75f775', 3439 + 'aphront-tokenizer-control-css' => '6e75f775', 3440 + 'aphront-tooltip-css' => '6e75f775', 3441 + 'aphront-typeahead-control-css' => '6e75f775', 3441 3442 'differential-changeset-view-css' => 'c904bbee', 3442 3443 'differential-core-view-css' => 'c904bbee', 3443 3444 'differential-inline-comment-editor' => '7ecd31fa', ··· 3452 3453 'diffusion-commit-view-css' => 'c8ce2d88', 3453 3454 'diffusion-icons-css' => 'c8ce2d88', 3454 3455 'inline-comment-summary-css' => 'c904bbee', 3455 - 'javelin-aphlict' => '5673560d', 3456 + 'javelin-aphlict' => '5bcc25b6', 3456 3457 'javelin-behavior' => 'db6d724d', 3457 - 'javelin-behavior-aphlict-dropdown' => '5673560d', 3458 - 'javelin-behavior-aphlict-listen' => '5673560d', 3459 - 'javelin-behavior-aphront-basic-tokenizer' => '5673560d', 3458 + 'javelin-behavior-aphlict-dropdown' => '5bcc25b6', 3459 + 'javelin-behavior-aphlict-listen' => '5bcc25b6', 3460 + 'javelin-behavior-aphront-basic-tokenizer' => '5bcc25b6', 3460 3461 'javelin-behavior-aphront-drag-and-drop' => '7ecd31fa', 3461 3462 'javelin-behavior-aphront-drag-and-drop-textarea' => '7ecd31fa', 3462 - 'javelin-behavior-aphront-form-disable-on-submit' => '5673560d', 3463 + 'javelin-behavior-aphront-form-disable-on-submit' => '5bcc25b6', 3463 3464 'javelin-behavior-audit-preview' => '5e68be89', 3464 3465 'javelin-behavior-dark-console' => '3c5efda9', 3465 3466 'javelin-behavior-dark-console-ajax' => '3c5efda9', 3466 - 'javelin-behavior-device' => '5673560d', 3467 + 'javelin-behavior-device' => '5bcc25b6', 3467 3468 'javelin-behavior-differential-accept-with-errors' => '7ecd31fa', 3468 3469 'javelin-behavior-differential-add-reviewers-and-ccs' => '7ecd31fa', 3469 3470 'javelin-behavior-differential-comment-jump' => '7ecd31fa', ··· 3479 3480 'javelin-behavior-diffusion-commit-graph' => '5e68be89', 3480 3481 'javelin-behavior-diffusion-pull-lastmodified' => '5e68be89', 3481 3482 'javelin-behavior-error-log' => '3c5efda9', 3482 - 'javelin-behavior-konami' => '5673560d', 3483 - 'javelin-behavior-lightbox-attachments' => '5673560d', 3483 + 'javelin-behavior-konami' => '5bcc25b6', 3484 + 'javelin-behavior-lightbox-attachments' => '5bcc25b6', 3484 3485 'javelin-behavior-maniphest-batch-selector' => '7707de41', 3485 3486 'javelin-behavior-maniphest-subpriority-editor' => '7707de41', 3486 3487 'javelin-behavior-maniphest-transaction-controls' => '7707de41', 3487 3488 'javelin-behavior-maniphest-transaction-expand' => '7707de41', 3488 3489 'javelin-behavior-maniphest-transaction-preview' => '7707de41', 3489 - 'javelin-behavior-phabricator-active-nav' => '5673560d', 3490 - 'javelin-behavior-phabricator-autofocus' => '5673560d', 3491 - 'javelin-behavior-phabricator-keyboard-shortcuts' => '5673560d', 3492 - 'javelin-behavior-phabricator-nav' => '5673560d', 3490 + 'javelin-behavior-phabricator-active-nav' => '5bcc25b6', 3491 + 'javelin-behavior-phabricator-autofocus' => '5bcc25b6', 3492 + 'javelin-behavior-phabricator-keyboard-shortcuts' => '5bcc25b6', 3493 + 'javelin-behavior-phabricator-nav' => '5bcc25b6', 3493 3494 'javelin-behavior-phabricator-object-selector' => '7ecd31fa', 3494 - 'javelin-behavior-phabricator-oncopy' => '5673560d', 3495 - 'javelin-behavior-phabricator-remarkup-assist' => '5673560d', 3496 - 'javelin-behavior-phabricator-search-typeahead' => '5673560d', 3497 - 'javelin-behavior-phabricator-tooltips' => '5673560d', 3498 - 'javelin-behavior-phabricator-watch-anchor' => '5673560d', 3499 - 'javelin-behavior-refresh-csrf' => '5673560d', 3495 + 'javelin-behavior-phabricator-oncopy' => '5bcc25b6', 3496 + 'javelin-behavior-phabricator-remarkup-assist' => '5bcc25b6', 3497 + 'javelin-behavior-phabricator-search-typeahead' => '5bcc25b6', 3498 + 'javelin-behavior-phabricator-tooltips' => '5bcc25b6', 3499 + 'javelin-behavior-phabricator-watch-anchor' => '5bcc25b6', 3500 + 'javelin-behavior-refresh-csrf' => '5bcc25b6', 3500 3501 'javelin-behavior-repository-crossreference' => '7ecd31fa', 3501 - 'javelin-behavior-toggle-class' => '5673560d', 3502 - 'javelin-behavior-workflow' => '5673560d', 3502 + 'javelin-behavior-toggle-class' => '5bcc25b6', 3503 + 'javelin-behavior-workflow' => '5bcc25b6', 3503 3504 'javelin-dom' => 'db6d724d', 3504 3505 'javelin-event' => 'db6d724d', 3505 3506 'javelin-install' => 'db6d724d', ··· 3518 3519 'javelin-util' => 'db6d724d', 3519 3520 'javelin-vector' => 'db6d724d', 3520 3521 'javelin-workflow' => 'db6d724d', 3521 - 'lightbox-attachment-css' => '668bdb91', 3522 + 'lightbox-attachment-css' => '6e75f775', 3522 3523 'maniphest-task-summary-css' => '7839ae2d', 3523 3524 'maniphest-transaction-detail-css' => '7839ae2d', 3524 - 'phabricator-app-buttons-css' => '668bdb91', 3525 - 'phabricator-busy' => '5673560d', 3525 + 'phabricator-app-buttons-css' => '6e75f775', 3526 + 'phabricator-busy' => '5bcc25b6', 3526 3527 'phabricator-content-source-view-css' => 'c904bbee', 3527 - 'phabricator-core-buttons-css' => '668bdb91', 3528 - 'phabricator-core-css' => '668bdb91', 3529 - 'phabricator-crumbs-view-css' => '668bdb91', 3530 - 'phabricator-directory-css' => '668bdb91', 3528 + 'phabricator-core-buttons-css' => '6e75f775', 3529 + 'phabricator-core-css' => '6e75f775', 3530 + 'phabricator-crumbs-view-css' => '6e75f775', 3531 + 'phabricator-directory-css' => '6e75f775', 3531 3532 'phabricator-drag-and-drop-file-upload' => '7ecd31fa', 3532 - 'phabricator-dropdown-menu' => '5673560d', 3533 - 'phabricator-file-upload' => '5673560d', 3534 - 'phabricator-filetree-view-css' => '668bdb91', 3535 - 'phabricator-flag-css' => '668bdb91', 3536 - 'phabricator-form-view-css' => '668bdb91', 3537 - 'phabricator-header-view-css' => '668bdb91', 3538 - 'phabricator-jump-nav' => '668bdb91', 3539 - 'phabricator-keyboard-shortcut' => '5673560d', 3540 - 'phabricator-keyboard-shortcut-manager' => '5673560d', 3541 - 'phabricator-main-menu-view' => '668bdb91', 3542 - 'phabricator-menu-item' => '5673560d', 3543 - 'phabricator-nav-view-css' => '668bdb91', 3544 - 'phabricator-notification' => '5673560d', 3545 - 'phabricator-notification-css' => '668bdb91', 3546 - 'phabricator-notification-menu-css' => '668bdb91', 3547 - 'phabricator-object-item-list-view-css' => '668bdb91', 3533 + 'phabricator-dropdown-menu' => '5bcc25b6', 3534 + 'phabricator-file-upload' => '5bcc25b6', 3535 + 'phabricator-filetree-view-css' => '6e75f775', 3536 + 'phabricator-flag-css' => '6e75f775', 3537 + 'phabricator-form-view-css' => '6e75f775', 3538 + 'phabricator-header-view-css' => '6e75f775', 3539 + 'phabricator-jump-nav' => '6e75f775', 3540 + 'phabricator-keyboard-shortcut' => '5bcc25b6', 3541 + 'phabricator-keyboard-shortcut-manager' => '5bcc25b6', 3542 + 'phabricator-main-menu-view' => '6e75f775', 3543 + 'phabricator-menu-item' => '5bcc25b6', 3544 + 'phabricator-nav-view-css' => '6e75f775', 3545 + 'phabricator-notification' => '5bcc25b6', 3546 + 'phabricator-notification-css' => '6e75f775', 3547 + 'phabricator-notification-menu-css' => '6e75f775', 3548 + 'phabricator-object-item-list-view-css' => '6e75f775', 3548 3549 'phabricator-object-selector-css' => 'c904bbee', 3549 - 'phabricator-paste-file-upload' => '5673560d', 3550 - 'phabricator-prefab' => '5673560d', 3550 + 'phabricator-paste-file-upload' => '5bcc25b6', 3551 + 'phabricator-prefab' => '5bcc25b6', 3551 3552 'phabricator-project-tag-css' => '7839ae2d', 3552 - 'phabricator-remarkup-css' => '668bdb91', 3553 + 'phabricator-remarkup-css' => '6e75f775', 3553 3554 'phabricator-shaped-request' => '7ecd31fa', 3554 - 'phabricator-side-menu-view-css' => '668bdb91', 3555 - 'phabricator-standard-page-view' => '668bdb91', 3556 - 'phabricator-textareautils' => '5673560d', 3557 - 'phabricator-tooltip' => '5673560d', 3558 - 'phabricator-transaction-view-css' => '668bdb91', 3559 - 'sprite-apps-large-css' => '668bdb91', 3560 - 'sprite-gradient-css' => '668bdb91', 3561 - 'sprite-icon-css' => '668bdb91', 3562 - 'sprite-menu-css' => '668bdb91', 3563 - 'syntax-highlighting-css' => '668bdb91', 3555 + 'phabricator-side-menu-view-css' => '6e75f775', 3556 + 'phabricator-standard-page-view' => '6e75f775', 3557 + 'phabricator-textareautils' => '5bcc25b6', 3558 + 'phabricator-tooltip' => '5bcc25b6', 3559 + 'phabricator-transaction-view-css' => '6e75f775', 3560 + 'sprite-apps-large-css' => '6e75f775', 3561 + 'sprite-gradient-css' => '6e75f775', 3562 + 'sprite-icon-css' => '6e75f775', 3563 + 'sprite-menu-css' => '6e75f775', 3564 + 'syntax-highlighting-css' => '6e75f775', 3564 3565 ), 3565 3566 ));
+3
src/applications/feed/story/PhabricatorFeedStoryDifferential.php
··· 16 16 $view->setTitle($line); 17 17 $view->setEpoch($data->getEpoch()); 18 18 19 + $href = $this->getHandle($data->getValue('revision_phid'))->getURI(); 20 + $view->setHref($href); 21 + 19 22 $action = $data->getValue('action'); 20 23 switch ($action) { 21 24 case DifferentialAction::ACTION_CREATE:
+3
src/applications/feed/story/PhabricatorFeedStoryDifferentialAggregate.php
··· 59 59 $view->setViewed($this->getHasViewed()); 60 60 $view->setTitle($title); 61 61 62 + $href = $this->getHandle($data->getValue('revision_phid'))->getURI(); 63 + $view->setHref($href); 64 + 62 65 return $view; 63 66 } 64 67
+3
src/applications/feed/story/PhabricatorFeedStoryManiphest.php
··· 41 41 $view->setOneLineStory(true); 42 42 } 43 43 44 + $href = $this->getHandle($data->getValue('taskPHID'))->getURI(); 45 + $view->setHref($href); 46 + 44 47 return $view; 45 48 } 46 49
+3
src/applications/feed/story/PhabricatorFeedStoryManiphestAggregate.php
··· 59 59 $view->setViewed($this->getHasViewed()); 60 60 $view->setTitle($title); 61 61 62 + $href = $this->getHandle($data->getValue('taskPHID'))->getURI(); 63 + $view->setHref($href); 64 + 62 65 return $view; 63 66 } 64 67
+15 -1
src/applications/feed/view/PhabricatorFeedStoryView.php
··· 8 8 private $epoch; 9 9 private $viewer; 10 10 private $viewed; 11 + private $href; 11 12 12 13 private $oneLine; 13 14 ··· 45 46 return $this->viewed; 46 47 } 47 48 49 + public function setHref($href) { 50 + $this->href = $href; 51 + return $this; 52 + } 53 + 54 + public function getHref() { 55 + return $this->href; 56 + } 57 + 48 58 public function renderNotification() { 49 59 $classes = array( 50 60 'phabricator-notification', ··· 54 64 $classes[] = 'phabricator-notification-unread'; 55 65 } 56 66 57 - return phutil_render_tag( 67 + return javelin_render_tag( 58 68 'div', 59 69 array( 60 70 'class' => implode(' ', $classes), 71 + 'sigil' => 'notification', 72 + 'meta' => array( 73 + 'href' => $this->getHref(), 74 + ), 61 75 ), 62 76 $this->title); 63 77 }
+6 -2
src/applications/notification/controller/PhabricatorNotificationPanelController.php
··· 26 26 '</div>'; 27 27 } 28 28 29 - $content .= 30 - '<div class="phabricator-notification view-all-notifications">'. 29 + $content = 30 + '<div class="phabricator-notification-header">'. 31 + pht('Notifications'). 32 + '</div>'. 33 + $content. 34 + '<div class="phabricator-notification-view-all">'. 31 35 phutil_render_tag( 32 36 'a', 33 37 array(
src/rsrc/logo.png

This is a binary file and will not be displayed.

src/rsrc/logo.psd

This is a binary file and will not be displayed.

src/rsrc/logo_with_text.png

This is a binary file and will not be displayed.

src/rsrc/logo_with_text.psd

This is a binary file and will not be displayed.

+23 -7
webroot/rsrc/css/application/base/notification-menu.css
··· 16 16 box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.5); 17 17 z-index: 9; 18 18 19 - border: 1px solid #33393d; 19 + border: 2px solid #33393d; 20 20 border-top-width: 0; 21 + border-radius: 3px; 21 22 } 22 23 23 24 .device .phabricator-notification-menu { 24 25 border-bottom: 1px solid #222222; 25 26 } 26 27 28 + .phabricator-notification { 29 + padding: 6px; 30 + cursor: pointer; 31 + } 27 32 28 - .phabricator-notification { 29 - padding: 6px 6px; 30 - margin: 1px 0; 33 + .device-desktop .phabricator-notification:hover { 34 + background: #f4f6f9; 35 + } 36 + 37 + .phabricator-notification + .phabricator-notification { 38 + border-top: 1px solid #e9e9e9; 31 39 } 32 40 33 41 .no-notifications { ··· 43 51 background: #aacfef; 44 52 } 45 53 46 - .view-all-notifications { 54 + .phabricator-notification-header { 55 + font-weight: bold; 56 + padding: 6px; 57 + font-size: 12px; 58 + border-bottom: 1px solid #e9e9e9; 59 + } 60 + 61 + .phabricator-notification-view-all { 47 62 text-align: center; 48 63 font-weight: bold; 49 - background: #eeeeee; 50 - border-top: 1px solid #dddddd; 64 + background: #f7f7f7; 65 + border-top: 1px solid #e9e9e9; 66 + padding: 6px; 51 67 }
+17 -4
webroot/rsrc/js/application/aphlict/behavior-aphlict-dropdown.js
··· 5 5 * javelin-stratcom 6 6 * javelin-vector 7 7 * javelin-dom 8 + * javelin-uri 8 9 */ 9 10 10 11 JX.behavior('aphlict-dropdown', function(config) { ··· 39 40 'click', 40 41 null, 41 42 function(e) { 42 - if(e.getNode('phabricator-notification-menu')) { 43 - // Click is inside the dropdown. 43 + if (!e.getNode('phabricator-notification-menu')) { 44 + // Click outside the dropdown; hide it. 45 + JX.DOM.hide(dropdown); 46 + visible = false; 44 47 return; 45 48 } 46 49 47 - JX.DOM.hide(dropdown); 48 - visible = false; 50 + if (e.getNode('tag:a')) { 51 + // User clicked a link, just follow the link. 52 + return; 53 + } 54 + 55 + // If the user clicked a notification (but missed a link) and it has a 56 + // primary URI, go there. 57 + var href = e.getNodeData('notification').href; 58 + if (href) { 59 + JX.$U(href).go(); 60 + e.kill(); 61 + } 49 62 }); 50 63 51 64