Skip to content

Commit 8a0fccf

Browse files
committed
Mobile Crumbs.
Summary: Not for full review. This makes crumbs appear consistently in mobile. It helps give a quick link to the apps home, the page title currently on, and action icons for the object. It will take additional clean-up to make this consistent across apps. Passing for early review from a UEX perspective. I actually really like it and think onces it's everywhere, helps mobile feel complete. Test Plan: Testing in iOS and Simulator. Reviewers: epriestley, btrahan Reviewed By: epriestley CC: aran, Korvin Maniphest Tasks: T2796 Differential Revision: https://secure.phabricator.com/D5446
1 parent 6115756 commit 8a0fccf

14 files changed

+129
-79
lines changed

src/__celerity_resource_map__.php

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2793,7 +2793,7 @@
27932793
),
27942794
'phabricator-crumbs-view-css' =>
27952795
array(
2796-
'uri' => '/res/4f15b2ae/rsrc/css/layout/phabricator-crumbs-view.css',
2796+
'uri' => '/res/2857d229/rsrc/css/layout/phabricator-crumbs-view.css',
27972797
'type' => 'css',
27982798
'requires' =>
27992799
array(
@@ -3701,7 +3701,7 @@
37013701
), array(
37023702
'packages' =>
37033703
array(
3704-
'93e81012' =>
3704+
'bcecb316' =>
37053705
array(
37063706
'name' => 'core.pkg.css',
37073707
'symbols' =>
@@ -3743,7 +3743,7 @@
37433743
34 => 'phabricator-object-item-list-view-css',
37443744
35 => 'global-drag-and-drop-css',
37453745
),
3746-
'uri' => '/res/pkg/93e81012/core.pkg.css',
3746+
'uri' => '/res/pkg/bcecb316/core.pkg.css',
37473747
'type' => 'css',
37483748
),
37493749
'95ceba95' =>
@@ -3934,16 +3934,16 @@
39343934
'reverse' =>
39353935
array(
39363936
'aphront-attached-file-view-css' => '6b1fccc6',
3937-
'aphront-dialog-view-css' => '93e81012',
3938-
'aphront-error-view-css' => '93e81012',
3939-
'aphront-form-view-css' => '93e81012',
3940-
'aphront-list-filter-view-css' => '93e81012',
3941-
'aphront-pager-view-css' => '93e81012',
3942-
'aphront-panel-view-css' => '93e81012',
3943-
'aphront-table-view-css' => '93e81012',
3944-
'aphront-tokenizer-control-css' => '93e81012',
3945-
'aphront-tooltip-css' => '93e81012',
3946-
'aphront-typeahead-control-css' => '93e81012',
3937+
'aphront-dialog-view-css' => 'bcecb316',
3938+
'aphront-error-view-css' => 'bcecb316',
3939+
'aphront-form-view-css' => 'bcecb316',
3940+
'aphront-list-filter-view-css' => 'bcecb316',
3941+
'aphront-pager-view-css' => 'bcecb316',
3942+
'aphront-panel-view-css' => 'bcecb316',
3943+
'aphront-table-view-css' => 'bcecb316',
3944+
'aphront-tokenizer-control-css' => 'bcecb316',
3945+
'aphront-tooltip-css' => 'bcecb316',
3946+
'aphront-typeahead-control-css' => 'bcecb316',
39473947
'differential-changeset-view-css' => '8aaacd1b',
39483948
'differential-core-view-css' => '8aaacd1b',
39493949
'differential-inline-comment-editor' => '322728f3',
@@ -3957,7 +3957,7 @@
39573957
'differential-table-of-contents-css' => '8aaacd1b',
39583958
'diffusion-commit-view-css' => 'c8ce2d88',
39593959
'diffusion-icons-css' => 'c8ce2d88',
3960-
'global-drag-and-drop-css' => '93e81012',
3960+
'global-drag-and-drop-css' => 'bcecb316',
39613961
'inline-comment-summary-css' => '8aaacd1b',
39623962
'javelin-aphlict' => '95ceba95',
39633963
'javelin-behavior' => 'fe22443b',
@@ -4029,48 +4029,48 @@
40294029
'javelin-util' => 'fe22443b',
40304030
'javelin-vector' => 'fe22443b',
40314031
'javelin-workflow' => 'fe22443b',
4032-
'lightbox-attachment-css' => '93e81012',
4032+
'lightbox-attachment-css' => 'bcecb316',
40334033
'maniphest-task-summary-css' => '6b1fccc6',
40344034
'maniphest-transaction-detail-css' => '6b1fccc6',
40354035
'phabricator-busy' => '95ceba95',
40364036
'phabricator-content-source-view-css' => '8aaacd1b',
4037-
'phabricator-core-buttons-css' => '93e81012',
4038-
'phabricator-core-css' => '93e81012',
4039-
'phabricator-crumbs-view-css' => '93e81012',
4040-
'phabricator-directory-css' => '93e81012',
4037+
'phabricator-core-buttons-css' => 'bcecb316',
4038+
'phabricator-core-css' => 'bcecb316',
4039+
'phabricator-crumbs-view-css' => 'bcecb316',
4040+
'phabricator-directory-css' => 'bcecb316',
40414041
'phabricator-drag-and-drop-file-upload' => '322728f3',
40424042
'phabricator-dropdown-menu' => '95ceba95',
40434043
'phabricator-file-upload' => '95ceba95',
4044-
'phabricator-filetree-view-css' => '93e81012',
4045-
'phabricator-flag-css' => '93e81012',
4046-
'phabricator-form-view-css' => '93e81012',
4047-
'phabricator-header-view-css' => '93e81012',
4048-
'phabricator-jump-nav' => '93e81012',
4044+
'phabricator-filetree-view-css' => 'bcecb316',
4045+
'phabricator-flag-css' => 'bcecb316',
4046+
'phabricator-form-view-css' => 'bcecb316',
4047+
'phabricator-header-view-css' => 'bcecb316',
4048+
'phabricator-jump-nav' => 'bcecb316',
40494049
'phabricator-keyboard-shortcut' => '95ceba95',
40504050
'phabricator-keyboard-shortcut-manager' => '95ceba95',
4051-
'phabricator-main-menu-view' => '93e81012',
4051+
'phabricator-main-menu-view' => 'bcecb316',
40524052
'phabricator-menu-item' => '95ceba95',
4053-
'phabricator-nav-view-css' => '93e81012',
4053+
'phabricator-nav-view-css' => 'bcecb316',
40544054
'phabricator-notification' => '95ceba95',
4055-
'phabricator-notification-css' => '93e81012',
4056-
'phabricator-notification-menu-css' => '93e81012',
4057-
'phabricator-object-item-list-view-css' => '93e81012',
4055+
'phabricator-notification-css' => 'bcecb316',
4056+
'phabricator-notification-menu-css' => 'bcecb316',
4057+
'phabricator-object-item-list-view-css' => 'bcecb316',
40584058
'phabricator-object-selector-css' => '8aaacd1b',
40594059
'phabricator-paste-file-upload' => '95ceba95',
40604060
'phabricator-prefab' => '95ceba95',
40614061
'phabricator-project-tag-css' => '6b1fccc6',
4062-
'phabricator-remarkup-css' => '93e81012',
4062+
'phabricator-remarkup-css' => 'bcecb316',
40634063
'phabricator-shaped-request' => '322728f3',
4064-
'phabricator-side-menu-view-css' => '93e81012',
4065-
'phabricator-standard-page-view' => '93e81012',
4064+
'phabricator-side-menu-view-css' => 'bcecb316',
4065+
'phabricator-standard-page-view' => 'bcecb316',
40664066
'phabricator-textareautils' => '95ceba95',
40674067
'phabricator-tooltip' => '95ceba95',
4068-
'phabricator-transaction-view-css' => '93e81012',
4069-
'phabricator-zindex-css' => '93e81012',
4070-
'sprite-apps-large-css' => '93e81012',
4071-
'sprite-gradient-css' => '93e81012',
4072-
'sprite-icon-css' => '93e81012',
4073-
'sprite-menu-css' => '93e81012',
4074-
'syntax-highlighting-css' => '93e81012',
4068+
'phabricator-transaction-view-css' => 'bcecb316',
4069+
'phabricator-zindex-css' => 'bcecb316',
4070+
'sprite-apps-large-css' => 'bcecb316',
4071+
'sprite-gradient-css' => 'bcecb316',
4072+
'sprite-icon-css' => 'bcecb316',
4073+
'sprite-menu-css' => 'bcecb316',
4074+
'syntax-highlighting-css' => 'bcecb316',
40754075
),
40764076
));

src/applications/differential/controller/DifferentialDiffCreateController.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,24 @@ public function processRequest() {
6565

6666
$panel = new AphrontPanelView();
6767
$panel->setHeader(pht('Create New Diff'));
68+
$panel->setNoBackground();
6869
$panel->appendChild($form);
6970
$panel->setWidth(AphrontPanelView::WIDTH_FORM);
7071

71-
return $this->buildStandardPageResponse(
72-
$panel,
72+
$crumbs = $this->buildApplicationCrumbs();
73+
$crumbs->addCrumb(
74+
id(new PhabricatorCrumbView())
75+
->setName(pht('Create Diff'))
76+
->setHref('/differential/diff/create/'));
77+
78+
return $this->buildApplicationPage(
79+
array(
80+
$crumbs,
81+
$panel
82+
),
7383
array(
7484
'title' => pht('Create Diff'),
85+
'device' => true,
7586
));
7687
}
7788

src/applications/files/controller/PhabricatorFileListController.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,8 @@ public function processRequest() {
4848
$side_nav = $this->buildSideNavView();
4949
$side_nav->selectFilter($this->getFilter());
5050

51-
$header_view = id(new PhabricatorHeaderView())
52-
->setHeader($header);
53-
5451
$side_nav->appendChild(
5552
array(
56-
$header_view,
5753
$file_list,
5854
$pager,
5955
new PhabricatorGlobalUploadTargetView(),
@@ -72,6 +68,7 @@ public function processRequest() {
7268
array(
7369
'title' => 'Files',
7470
'device' => true,
71+
'dust' => true,
7572
));
7673
}
7774

src/applications/files/controller/PhabricatorFileUploadController.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function processRequest() {
3939
'desktop onto this page or the Phabricator home page.')));
4040

4141
$form = id(new AphrontFormView())
42-
->setFlexible(true)
4342
->setUser($user)
4443
->setEncType('multipart/form-data')
4544
->appendChild(
@@ -68,9 +67,6 @@ public function processRequest() {
6867

6968
$title = pht('Upload File');
7069

71-
$header = id(new PhabricatorHeaderView())
72-
->setHeader($title);
73-
7470
if ($errors) {
7571
$errors = id(new AphrontErrorView())
7672
->setTitle(pht('Form Errors'))
@@ -80,12 +76,17 @@ public function processRequest() {
8076
$global_upload = id(new PhabricatorGlobalUploadTargetView())
8177
->setShowIfSupportedID($support_id);
8278

79+
$panel = new AphrontPanelView();
80+
$panel->setHeader(pht('New File Upload'));
81+
$panel->setNoBackground();
82+
$panel->appendChild($form);
83+
$panel->setWidth(AphrontPanelView::WIDTH_FORM);
84+
8385
return $this->buildApplicationPage(
8486
array(
8587
$crumbs,
86-
$header,
8788
$errors,
88-
$form,
89+
$panel,
8990
$global_upload,
9091
),
9192
array(

src/applications/macro/controller/PhabricatorMacroEditController.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ public function processRequest() {
152152
}
153153

154154
$form = new AphrontFormView();
155-
$form->setFlexible(true);
156155
$form->addHiddenInput('name_form', 1);
157156
$form->setUser($request->getUser());
158157

@@ -237,10 +236,6 @@ public function processRequest() {
237236
->setHref($request->getRequestURI())
238237
->setName($crumb));
239238

240-
$header = id(new PhabricatorHeaderView())
241-
->setHeader($title);
242-
243-
244239
$upload = null;
245240
if ($macro->getID()) {
246241
$upload_header = id(new PhabricatorHeaderView())
@@ -272,16 +267,22 @@ public function processRequest() {
272267
$upload = array($upload_header, $upload_form);
273268
}
274269

270+
$panel = new AphrontPanelView();
271+
$panel->setHeader(pht('Create New Macro'));
272+
$panel->setNoBackground();
273+
$panel->appendChild($form);
274+
$panel->setWidth(AphrontPanelView::WIDTH_FORM);
275+
275276
return $this->buildApplicationPage(
276277
array(
277278
$crumbs,
278-
$header,
279279
$error_view,
280-
$form,
280+
$panel,
281281
$upload,
282282
),
283283
array(
284284
'title' => $title,
285+
'device' => true,
285286
));
286287
}
287288
}

src/applications/maniphest/controller/ManiphestTaskDetailController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,12 @@ public function processRequest() {
340340
$crumbs->addCrumb(
341341
id(new PhabricatorCrumbView())
342342
->setName($object_name)
343-
->setHref('/'.$object_name));
343+
->setHref('/'.$object_name))
344+
->addAction(
345+
id(new PhabricatorMenuItemView())
346+
->setHref($this->getApplicationURI('/task/create/'))
347+
->setName(pht('Create Task'))
348+
->setIcon('create'));
344349

345350
$header = $this->buildHeaderView($task);
346351
$actions = $this->buildActionView($task);

src/applications/maniphest/controller/ManiphestTaskEditController.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,20 @@ public function processRequest() {
532532
$page_objects = array();
533533
}
534534

535+
$crumbs = $this->buildApplicationCrumbs();
536+
$crumbs->addCrumb(
537+
id(new PhabricatorCrumbView())
538+
->setName($header_name)
539+
->setHref($this->getApplicationURI('/task/create/')))
540+
->addAction(
541+
id(new PhabricatorMenuItemView())
542+
->setHref($this->getApplicationURI('/task/create/'))
543+
->setName(pht('Create Task'))
544+
->setIcon('create'));
545+
535546
return $this->buildApplicationPage(
536547
array(
548+
$crumbs,
537549
$error_view,
538550
$panel,
539551
$description_preview_panel,

src/applications/paste/controller/PhabricatorPasteListController.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,8 @@ public function processRequest() {
4343
$list->setPager($pager);
4444
$list->setNoDataString($nodata);
4545

46-
$header = id(new PhabricatorHeaderView())
47-
->setHeader($title);
48-
4946
$nav->appendChild(
5047
array(
51-
$header,
5248
$list,
5349
));
5450

@@ -66,6 +62,7 @@ public function processRequest() {
6662
array(
6763
'title' => $title,
6864
'device' => true,
65+
'dust' => true,
6966
));
7067
}
7168

src/applications/phlux/controller/PhluxListController.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,9 @@ public function processRequest() {
3636
->setName($title)
3737
->setHref($this->getApplicationURI()));
3838

39-
$header = id(new PhabricatorHeaderView())
40-
->setHeader($title);
41-
4239
return $this->buildApplicationPage(
4340
array(
4441
$crumbs,
45-
$header,
4642
$view,
4743
$pager,
4844
),

src/applications/pholio/controller/PholioMockEditController.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,14 @@ public function processRequest() {
219219
->setName('can_view'))
220220
->appendChild($submit);
221221

222-
$header = id(new PhabricatorHeaderView())
223-
->setHeader($title);
222+
$crumbs = $this->buildApplicationCrumbs($this->buildSideNav());
223+
$crumbs->addCrumb(
224+
id(new PhabricatorCrumbView())
225+
->setName($title)
226+
->setHref($this->getApplicationURI()));
224227

225228
$content = array(
226-
$header,
229+
$crumbs,
227230
$error_view,
228231
$form,
229232
);

src/applications/project/controller/PhabricatorProjectListController.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,8 @@ public function processRequest() {
123123
$list->addItem($item);
124124
}
125125

126-
$header = id(new PhabricatorHeaderView())
127-
->setHeader($table_header);
128-
129126
$nav->appendChild(
130127
array(
131-
$header,
132128
$list,
133129
$pager,
134130
));

src/view/layout/PhabricatorCrumbView.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public function render() {
6767
'class' => 'sprite-menu phabricator-crumb-divider',
6868
),
6969
'');
70+
} else {
71+
$classes[] = 'phabricator-last-crumb';
7072
}
7173

7274
return phutil_tag(

src/view/layout/PhabricatorCrumbsView.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ public function render() {
3737
),
3838
'');
3939
}
40+
$name = phutil_tag(
41+
'span',
42+
array(
43+
'class' => 'phabricator-crumbs-action-name'
44+
),
45+
$action->getName()
46+
);
4047
$actions[] = javelin_tag(
4148
'a',
4249
array(
@@ -46,7 +53,7 @@ public function render() {
4653
),
4754
array(
4855
$icon,
49-
$action->getName(),
56+
$name,
5057
));
5158
}
5259

0 commit comments

Comments
 (0)