1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Improve display of long project names in task list UI

Summary:
  - Shorten long project names.
  - Prevent wrapping.
  - Fix a double-escaping issue.

Test Plan: See screenshots below.

Reviewers: btrahan, 20after4

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2073
This commit is contained in:
epriestley 2012-04-02 11:16:05 -07:00
parent eeec726ded
commit f49f1eaa5c
4 changed files with 7 additions and 3 deletions

View file

@ -1722,7 +1722,7 @@ celerity_register_resource_map(array(
), ),
'phabricator-project-tag-css' => 'phabricator-project-tag-css' =>
array( array(
'uri' => '/res/c0a3c26b/rsrc/css/application/projects/project-tag.css', 'uri' => '/res/6b0a5223/rsrc/css/application/projects/project-tag.css',
'type' => 'css', 'type' => 'css',
'requires' => 'requires' =>
array( array(

View file

@ -42,7 +42,8 @@ final class ManiphestTaskProjectsView extends ManiphestView {
'href' => $handle->getURI(), 'href' => $handle->getURI(),
'class' => 'phabricator-project-tag', 'class' => 'phabricator-project-tag',
), ),
phutil_escape_html($handle->getName())); phutil_escape_html(
phutil_utf8_shorten($handle->getName(), 24)));
} }
if (count($this->handles) > 2) { if (count($this->handles) > 2) {
@ -60,7 +61,7 @@ final class ManiphestTaskProjectsView extends ManiphestView {
'class' => 'phabricator-project-tag', 'class' => 'phabricator-project-tag',
'sigil' => 'has-tooltip', 'sigil' => 'has-tooltip',
'meta' => array( 'meta' => array(
'tip' => phutil_escape_html(implode(', ', $all)), 'tip' => implode(', ', $all),
'size' => 200, 'size' => 200,
), ),
), ),

View file

@ -12,6 +12,7 @@ phutil_require_module('phabricator', 'infrastructure/javelin/api');
phutil_require_module('phabricator', 'infrastructure/javelin/markup'); phutil_require_module('phabricator', 'infrastructure/javelin/markup');
phutil_require_module('phutil', 'markup'); phutil_require_module('phutil', 'markup');
phutil_require_module('phutil', 'utils');
phutil_require_source('ManiphestTaskProjectsView.php'); phutil_require_source('ManiphestTaskProjectsView.php');

View file

@ -18,6 +18,8 @@
-webkit-border-radius: 4px; -webkit-border-radius: 4px;
-moz-border-radius: 4px; -moz-border-radius: 4px;
border-radius: 4px; border-radius: 4px;
white-space: nowrap;
} }
.phabricator-project-tag:hover { .phabricator-project-tag:hover {