From 8447af89f611a0ec7e4121906a8bf38b74fe3706 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Tue, 11 Nov 2025 17:02:52 +0100 Subject: [PATCH] Personal API Token field: Auto-select on click Summary: When looking at an API Token you often probably want to copy it. While buttons are one way (that's D26222), clicking into the text field is another user pattern. Highlight the entire string in the text field when doing so, as the "Clone" URIs in Diffusion have the same behavior. Closes T16335 Test Plan: * Go to http://phorge.localhost/settings/panel/apitokens/ and Generate Token * Click on the listed Token * In the "View API Token" dialog, click in the "Token" field Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T16335 Differential Revision: https://we.phorge.it/D26491 --- .../controller/PhabricatorConduitTokenEditController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/applications/conduit/controller/PhabricatorConduitTokenEditController.php b/src/applications/conduit/controller/PhabricatorConduitTokenEditController.php index 3434103f73..745706d97f 100644 --- a/src/applications/conduit/controller/PhabricatorConduitTokenEditController.php +++ b/src/applications/conduit/controller/PhabricatorConduitTokenEditController.php @@ -88,12 +88,14 @@ final class PhabricatorConduitTokenEditController 'requests between nodes in a cluster. You can not use this '. 'token in external applications.')); } else { + Javelin::initBehavior('select-on-click'); $form = id(new AphrontFormView()) ->setUser($viewer) ->appendChild( id(new AphrontFormTextControl()) ->setLabel(pht('Token')) ->setReadOnly(true) + ->setSigil('select-on-click') ->setValue($token->getToken())); $dialog->appendForm($form); -- 2.51.2