@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.

Mobile Notifications

Summary: Touch up /notifications/ for desktop and mobile

Test Plan: Tested read and unread notifications on mobile and desktop

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, epriestley, aran

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

+89 -74
+46 -46
src/__celerity_resource_map__.php
··· 3419 3419 ), 3420 3420 'phabricator-notification-menu-css' => 3421 3421 array( 3422 - 'uri' => '/res/c6b17cfb/rsrc/css/application/base/notification-menu.css', 3422 + 'uri' => '/res/48b02e64/rsrc/css/application/base/notification-menu.css', 3423 3423 'type' => 'css', 3424 3424 'requires' => 3425 3425 array( ··· 4343 4343 ), array( 4344 4344 'packages' => 4345 4345 array( 4346 - '49232ec3' => 4346 + 'ea1ae5d8' => 4347 4347 array( 4348 4348 'name' => 'core.pkg.css', 4349 4349 'symbols' => ··· 4392 4392 41 => 'phabricator-tag-view-css', 4393 4393 42 => 'phui-list-view-css', 4394 4394 ), 4395 - 'uri' => '/res/pkg/49232ec3/core.pkg.css', 4395 + 'uri' => '/res/pkg/ea1ae5d8/core.pkg.css', 4396 4396 'type' => 'css', 4397 4397 ), 4398 4398 '2c1dba03' => ··· 4584 4584 ), 4585 4585 'reverse' => 4586 4586 array( 4587 - 'aphront-dialog-view-css' => '49232ec3', 4588 - 'aphront-error-view-css' => '49232ec3', 4589 - 'aphront-list-filter-view-css' => '49232ec3', 4590 - 'aphront-pager-view-css' => '49232ec3', 4591 - 'aphront-panel-view-css' => '49232ec3', 4592 - 'aphront-table-view-css' => '49232ec3', 4593 - 'aphront-tokenizer-control-css' => '49232ec3', 4594 - 'aphront-tooltip-css' => '49232ec3', 4595 - 'aphront-typeahead-control-css' => '49232ec3', 4587 + 'aphront-dialog-view-css' => 'ea1ae5d8', 4588 + 'aphront-error-view-css' => 'ea1ae5d8', 4589 + 'aphront-list-filter-view-css' => 'ea1ae5d8', 4590 + 'aphront-pager-view-css' => 'ea1ae5d8', 4591 + 'aphront-panel-view-css' => 'ea1ae5d8', 4592 + 'aphront-table-view-css' => 'ea1ae5d8', 4593 + 'aphront-tokenizer-control-css' => 'ea1ae5d8', 4594 + 'aphront-tooltip-css' => 'ea1ae5d8', 4595 + 'aphront-typeahead-control-css' => 'ea1ae5d8', 4596 4596 'differential-changeset-view-css' => '67248472', 4597 4597 'differential-core-view-css' => '67248472', 4598 4598 'differential-inline-comment-editor' => '92f459f0', ··· 4606 4606 'differential-table-of-contents-css' => '67248472', 4607 4607 'diffusion-commit-view-css' => '7aa115b4', 4608 4608 'diffusion-icons-css' => '7aa115b4', 4609 - 'global-drag-and-drop-css' => '49232ec3', 4609 + 'global-drag-and-drop-css' => 'ea1ae5d8', 4610 4610 'inline-comment-summary-css' => '67248472', 4611 4611 'javelin-aphlict' => '2c1dba03', 4612 4612 'javelin-behavior' => '3e3be199', ··· 4681 4681 'javelin-util' => '3e3be199', 4682 4682 'javelin-vector' => '3e3be199', 4683 4683 'javelin-workflow' => '3e3be199', 4684 - 'lightbox-attachment-css' => '49232ec3', 4684 + 'lightbox-attachment-css' => 'ea1ae5d8', 4685 4685 'maniphest-task-summary-css' => '49898640', 4686 - 'phabricator-action-list-view-css' => '49232ec3', 4687 - 'phabricator-application-launch-view-css' => '49232ec3', 4686 + 'phabricator-action-list-view-css' => 'ea1ae5d8', 4687 + 'phabricator-application-launch-view-css' => 'ea1ae5d8', 4688 4688 'phabricator-busy' => '2c1dba03', 4689 4689 'phabricator-content-source-view-css' => '67248472', 4690 - 'phabricator-core-css' => '49232ec3', 4691 - 'phabricator-crumbs-view-css' => '49232ec3', 4690 + 'phabricator-core-css' => 'ea1ae5d8', 4691 + 'phabricator-crumbs-view-css' => 'ea1ae5d8', 4692 4692 'phabricator-drag-and-drop-file-upload' => '92f459f0', 4693 4693 'phabricator-dropdown-menu' => '2c1dba03', 4694 4694 'phabricator-file-upload' => '2c1dba03', 4695 - 'phabricator-filetree-view-css' => '49232ec3', 4696 - 'phabricator-flag-css' => '49232ec3', 4695 + 'phabricator-filetree-view-css' => 'ea1ae5d8', 4696 + 'phabricator-flag-css' => 'ea1ae5d8', 4697 4697 'phabricator-hovercard' => '2c1dba03', 4698 - 'phabricator-jump-nav' => '49232ec3', 4698 + 'phabricator-jump-nav' => 'ea1ae5d8', 4699 4699 'phabricator-keyboard-shortcut' => '2c1dba03', 4700 4700 'phabricator-keyboard-shortcut-manager' => '2c1dba03', 4701 - 'phabricator-main-menu-view' => '49232ec3', 4701 + 'phabricator-main-menu-view' => 'ea1ae5d8', 4702 4702 'phabricator-menu-item' => '2c1dba03', 4703 - 'phabricator-nav-view-css' => '49232ec3', 4703 + 'phabricator-nav-view-css' => 'ea1ae5d8', 4704 4704 'phabricator-notification' => '2c1dba03', 4705 - 'phabricator-notification-css' => '49232ec3', 4706 - 'phabricator-notification-menu-css' => '49232ec3', 4705 + 'phabricator-notification-css' => 'ea1ae5d8', 4706 + 'phabricator-notification-menu-css' => 'ea1ae5d8', 4707 4707 'phabricator-object-selector-css' => '67248472', 4708 4708 'phabricator-phtize' => '2c1dba03', 4709 4709 'phabricator-prefab' => '2c1dba03', 4710 4710 'phabricator-project-tag-css' => '49898640', 4711 - 'phabricator-remarkup-css' => '49232ec3', 4711 + 'phabricator-remarkup-css' => 'ea1ae5d8', 4712 4712 'phabricator-shaped-request' => '92f459f0', 4713 - 'phabricator-side-menu-view-css' => '49232ec3', 4714 - 'phabricator-standard-page-view' => '49232ec3', 4715 - 'phabricator-tag-view-css' => '49232ec3', 4713 + 'phabricator-side-menu-view-css' => 'ea1ae5d8', 4714 + 'phabricator-standard-page-view' => 'ea1ae5d8', 4715 + 'phabricator-tag-view-css' => 'ea1ae5d8', 4716 4716 'phabricator-textareautils' => '2c1dba03', 4717 4717 'phabricator-tooltip' => '2c1dba03', 4718 - 'phabricator-transaction-view-css' => '49232ec3', 4719 - 'phabricator-zindex-css' => '49232ec3', 4720 - 'phui-button-css' => '49232ec3', 4721 - 'phui-form-css' => '49232ec3', 4722 - 'phui-form-view-css' => '49232ec3', 4723 - 'phui-header-view-css' => '49232ec3', 4724 - 'phui-icon-view-css' => '49232ec3', 4725 - 'phui-list-view-css' => '49232ec3', 4726 - 'phui-object-item-list-view-css' => '49232ec3', 4727 - 'phui-property-list-view-css' => '49232ec3', 4728 - 'phui-spacing-css' => '49232ec3', 4729 - 'sprite-apps-large-css' => '49232ec3', 4730 - 'sprite-gradient-css' => '49232ec3', 4731 - 'sprite-icons-css' => '49232ec3', 4732 - 'sprite-menu-css' => '49232ec3', 4733 - 'sprite-status-css' => '49232ec3', 4734 - 'syntax-highlighting-css' => '49232ec3', 4718 + 'phabricator-transaction-view-css' => 'ea1ae5d8', 4719 + 'phabricator-zindex-css' => 'ea1ae5d8', 4720 + 'phui-button-css' => 'ea1ae5d8', 4721 + 'phui-form-css' => 'ea1ae5d8', 4722 + 'phui-form-view-css' => 'ea1ae5d8', 4723 + 'phui-header-view-css' => 'ea1ae5d8', 4724 + 'phui-icon-view-css' => 'ea1ae5d8', 4725 + 'phui-list-view-css' => 'ea1ae5d8', 4726 + 'phui-object-item-list-view-css' => 'ea1ae5d8', 4727 + 'phui-property-list-view-css' => 'ea1ae5d8', 4728 + 'phui-spacing-css' => 'ea1ae5d8', 4729 + 'sprite-apps-large-css' => 'ea1ae5d8', 4730 + 'sprite-gradient-css' => 'ea1ae5d8', 4731 + 'sprite-icons-css' => 'ea1ae5d8', 4732 + 'sprite-menu-css' => 'ea1ae5d8', 4733 + 'sprite-status-css' => 'ea1ae5d8', 4734 + 'syntax-highlighting-css' => 'ea1ae5d8', 4735 4735 ), 4736 4736 ));
+1 -1
src/applications/notification/controller/PhabricatorNotificationClearController.php
··· 38 38 } 39 39 40 40 $dialog->addCancelButton('/notification/'); 41 - $dialog->addSubmitButton('Mark All Read'); 41 + $dialog->addSubmitButton(pht('Mark All Read')); 42 42 43 43 return id(new AphrontDialogResponse())->setDialog($dialog); 44 44 }
+1 -1
src/applications/notification/controller/PhabricatorNotificationController.php
··· 7 7 8 8 $page = $this->buildStandardPageView(); 9 9 10 - $page->setApplicationName('Notification'); 10 + $page->setApplicationName(pht('Notification')); 11 11 $page->setBaseURI('/notification/'); 12 12 $page->setTitle(idx($data, 'title')); 13 13 $page->setGlyph('!');
+29 -20
src/applications/notification/controller/PhabricatorNotificationListController.php
··· 15 15 16 16 $nav = new AphrontSideNavFilterView(); 17 17 $nav->setBaseURI(new PhutilURI('/notification/')); 18 - $nav->addFilter('all', 'All Notifications'); 19 - $nav->addFilter('unread', 'Unread Notifications'); 18 + $nav->addFilter('all', pht('All Notifications')); 19 + $nav->addFilter('unread', pht('Unread Notifications')); 20 20 $filter = $nav->selectFilter($this->filter, 'all'); 21 21 22 22 $pager = new AphrontPagerView(); ··· 50 50 $no_data); 51 51 } 52 52 53 - $view = phutil_tag_div('phabricator-notification-list', $view); 53 + $view = id(new PHUIBoxView()) 54 + ->addPadding(PHUI::PADDING_MEDIUM) 55 + ->addClass('phabricator-notification-list') 56 + ->appendChild($view); 57 + 58 + $image = id(new PHUIIconView()) 59 + ->setSpriteSheet(PHUIIconView::SPRITE_ICONS) 60 + ->setSpriteIcon('preview'); 61 + $button = id(new PHUIButtonView()) 62 + ->setTag('a') 63 + ->setColor(PHUIButtonView::SIMPLE) 64 + ->setHref('/notification/clear/') 65 + ->addSigil('workflow') 66 + ->setIcon($image) 67 + ->setText(pht('Mark All Read')); 54 68 55 - $panel = new AphrontPanelView(); 56 - $panel->setHeader($header); 57 - $panel->setWidth(AphrontPanelView::WIDTH_FORM); 58 - $panel->addButton( 59 - javelin_tag( 60 - 'a', 61 - array( 62 - 'href' => '/notification/clear/', 63 - 'class' => 'button', 64 - 'sigil' => 'workflow', 65 - ), 66 - 'Mark All Read')); 67 - $panel->appendChild($view); 68 - $panel->appendChild($pager); 69 + $notif_header = id(new PHUIHeaderView()) 70 + ->setHeader($header) 71 + ->addActionLink($button); 72 + 73 + $box = id(new PHUIObjectBoxView()) 74 + ->setHeader($notif_header) 75 + ->appendChild($view); 69 76 70 - $nav->appendChild($panel); 77 + $nav->appendChild($box); 78 + $nav->appendChild($pager); 71 79 72 - return $this->buildStandardPageResponse( 80 + return $this->buildApplicationPage( 73 81 $nav, 74 82 array( 75 - 'title' => 'Notifications', 83 + 'title' => pht('Notifications'), 84 + 'device' => true, 76 85 )); 77 86 } 78 87
+1 -1
src/applications/notification/controller/PhabricatorNotificationPanelController.php
··· 36 36 array( 37 37 'href' => '/notification/', 38 38 ), 39 - 'View All Notifications')); 39 + pht('View All Notifications'))); 40 40 41 41 $unread_count = id(new PhabricatorFeedStoryNotification()) 42 42 ->countUnread($user);
+8 -1
src/view/phui/PHUIButtonView.php
··· 18 18 private $tag = 'button'; 19 19 private $dropdown; 20 20 private $icon; 21 + private $href = null; 21 22 22 23 public function setText($text) { 23 24 $this->text = $text; 25 + return $this; 26 + } 27 + 28 + public function setHref($href) { 29 + $this->href = $href; 24 30 return $this; 25 31 } 26 32 ··· 81 87 $classes[] = 'has-icon'; 82 88 } 83 89 84 - return array('class' => $classes); 90 + return array('class' => $classes, 91 + 'href' => $this->href); 85 92 } 86 93 87 94 protected function getTagContent() {
+3 -4
webroot/rsrc/css/application/base/notification-menu.css
··· 38 38 39 39 .phabricator-notification { 40 40 padding: 6px; 41 + } 42 + 43 + .phabricator-notification-menu .phabricator-notification { 41 44 cursor: pointer; 42 45 } 43 46 ··· 51 54 52 55 .no-notifications { 53 56 color: {$lightgreytext}; 54 - } 55 - 56 - .phabricator-notification-list { 57 - font-size: 11px; 58 57 } 59 58 60 59 .phabricator-notification-list .phabricator-notification-unread,