From 2ebdf2e080d1b93ef47fecc4d10d1f626ad319a0 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 7 Mar 2017 13:26:28 -0800 Subject: [PATCH] Remove server side limit on policy control names Summary: Fixes T12367. CSS here already truncates (or should have been) and is generally more effective. Remove the unneeded server side truncation. Any other UI place these render? Test Plan: Set Policy to a group name of "Stanford University: Alumni Association and Friends" and see better truncation. Reviewers: epriestley, eliaspro Reviewed By: epriestley, eliaspro Subscribers: eliaspro, Korvin Maniphest Tasks: T12367 Differential Revision: https://secure.phabricator.com/D17479 --- resources/celerity/map.php | 6 +++--- src/view/form/control/AphrontFormPolicyControl.php | 6 +----- webroot/rsrc/css/phui/phui-action-list.css | 1 + 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 4855aef6a8..86de05e9bb 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -9,7 +9,7 @@ return array( 'names' => array( 'conpherence.pkg.css' => '6875302f', 'conpherence.pkg.js' => '6249a1cf', - 'core.pkg.css' => 'bb303011', + 'core.pkg.css' => '7e10ec60', 'core.pkg.js' => '1fa7c0c5', 'darkconsole.pkg.js' => 'e7393ebb', 'differential.pkg.css' => '90b30783', @@ -128,7 +128,7 @@ return array( 'rsrc/css/phui/object-item/phui-oi-flush-ui.css' => '9d9685d6', 'rsrc/css/phui/object-item/phui-oi-list-view.css' => '5c383524', 'rsrc/css/phui/object-item/phui-oi-simple-ui.css' => 'a8beebea', - 'rsrc/css/phui/phui-action-list.css' => 'f980c059', + 'rsrc/css/phui/phui-action-list.css' => '29bb1c5e', 'rsrc/css/phui/phui-action-panel.css' => '91c7b835', 'rsrc/css/phui/phui-badge.css' => '22c0cf4f', 'rsrc/css/phui/phui-basic-nav-view.css' => 'a0705f53', @@ -780,7 +780,7 @@ return array( 'path-typeahead' => 'f7fc67ec', 'people-picture-menu-item-css' => 'a06f7f34', 'people-profile-css' => '4df76faf', - 'phabricator-action-list-view-css' => 'f980c059', + 'phabricator-action-list-view-css' => '29bb1c5e', 'phabricator-busy' => '59a7976a', 'phabricator-chatlog-css' => 'd295b020', 'phabricator-content-source-view-css' => '4b8b05d4', diff --git a/src/view/form/control/AphrontFormPolicyControl.php b/src/view/form/control/AphrontFormPolicyControl.php index 6448b2b8b2..2ce13491af 100644 --- a/src/view/form/control/AphrontFormPolicyControl.php +++ b/src/view/form/control/AphrontFormPolicyControl.php @@ -153,12 +153,8 @@ final class AphrontFormPolicyControl extends AphrontFormControl { } } - $policy_short_name = id(new PhutilUTF8StringTruncator()) - ->setMaximumGlyphs(28) - ->truncateString($policy->getName()); - $options[$policy->getType()][$policy->getPHID()] = array( - 'name' => $policy_short_name, + 'name' => $policy->getName(), 'full' => $policy->getName(), 'icon' => $policy->getIcon(), 'sort' => phutil_utf8_strtolower($policy->getName()), diff --git a/webroot/rsrc/css/phui/phui-action-list.css b/webroot/rsrc/css/phui/phui-action-list.css index 874af5ee42..0a811cbab0 100644 --- a/webroot/rsrc/css/phui/phui-action-list.css +++ b/webroot/rsrc/css/phui/phui-action-list.css @@ -69,6 +69,7 @@ color: {$darkbluetext}; text-overflow: ellipsis; overflow: hidden; + white-space: nowrap; } .action-has-icon button.phabricator-action-view-item,