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

OAuth Server Access Token field: Auto-select on click; mark read-only

Summary:
When looking at the Access Token you often probably want to copy it. While buttons are one way (that's for a followup patch), clicking into the text field is another user pattern.
Highlight the entire string in the text field when doing so.
Also do not allow writing into that field.

Same game as rP8447af89.

Closes T16517

Test Plan:
1. `./bin/config set phabricator.show-prototypes true`
2. Install/enable http://phorge.localhost/applications/view/PhabricatorOAuthServerApplication/
3. Go to http://phorge.localhost/oauthserver/ and create an Auth Server
4. Go to http://phorge.localhost/oauthserver/client/view/1
5. Select "Generate Test Token"
6. Click "Authorize Application"
7. Click into the "Token" value field, see that the value gets selected
8. Click into the "Token" value field, try to type some letters and see that you cannot

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16517

Differential Revision: https://we.phorge.it/D26789

+3
+3
src/applications/oauthserver/controller/client/PhabricatorOAuthClientTestController.php
··· 35 35 36 36 $access_token = $server->generateAccessToken(); 37 37 38 + Javelin::initBehavior('select-on-click'); 38 39 $form = id(new AphrontFormView()) 39 40 ->setViewer($viewer) 40 41 ->appendInstructions( ··· 44 45 ->appendChild( 45 46 id(new AphrontFormTextControl()) 46 47 ->setLabel(pht('Token')) 48 + ->setReadOnly(true) 49 + ->setSigil('select-on-click') 47 50 ->setValue($access_token->getToken())); 48 51 49 52 return $this->newDialog()