Feature #16659

Add a "Copy to Clipboard" Button for the token

Added by Daniel Kutyła about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Target version:
Start date:
08/07/2020
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

Users setting up their shell for accessing the Arvados API always need to copy their tokens from the dialog. A little simplification could be to provide a button to copy the token snippet into clipboard.


Subtasks

Task #16674: Review 16659-copy-api-token-to-clipboardResolvedDaniel Kutyła


Related issues

Related to Arvados - Feature #16671: Copy-to-clipboard project uuidNew

Associated revisions

Revision 61c27319
Added by Daniel Kutyła about 1 year ago

Merge branch '16659-copy-api-token-to-clipboard'
Closes #16659

Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <>

History

#1 Updated by Daniel Kutyła about 1 year ago

  • Target version set to 2020-08-12 Sprint

#2 Updated by Peter Amstutz about 1 year ago

#4 Updated by Lucas Di Pentima about 1 year ago

Reviewing arvados-workbench2|2ee1db2

  • Please take note that some tests on Jenkins failed.
  • When I tried to start it with yarn start, I got an error message:
    Failed to compile.
    
    /Users/lucas/Devel/git/arvados-workbench2/src/views-components/current-token-dialog/current-token-dialog.tsx
    (56,37): Unnecessary semicolon
    
  • There're several unrelated changes on this commit, were those on purpose? Maybe there's some automatic tool making them on your IDE, just wanted point that out.

#6 Updated by Lucas Di Pentima about 1 year ago

  • Assigned To set to Daniel Kutyła
  • Status changed from New to In Progress

Reviewing arvados-workbench2|27f1790

  • The env vars text box now show some lines indented instead of all being aligned to the left.
  • The ticket’s description mentions easing the users’ worflow when they try to access a shell node, but the button only copies the token and not the entire set of environment variables that the users need to paste on their shell session.
  • The test checks for a snackbar to appear instead of the main desired effect (data on clipboard). I’ve checked and it seems that a Clipboard API is in the works and already has some browser support, maybe it can be used to write a test that checks the correct data is being copied to the clipboard: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API
  • If the entire text box is what is needed to be copied, the button's label could say "COPY TO CLIPBOARD" instead of "COPY API TOKEN"

#7 Updated by Peter Amstutz about 1 year ago

  • Target version changed from 2020-08-12 Sprint to 2020-08-26 Sprint

#8 Updated by Daniel Kutyła about 1 year ago

New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/bbcdcd7b7582b43ca4853e436df383ff9dda465a
Test run: https://ci.arvados.org/view/Developer/job/developer-tests-workbench2/75/

Added copy of full token, made tests more realistic

Please check in git cli I do not know why but diff does not show any changes here

#9 Updated by Lucas Di Pentima about 1 year ago

This LGTM, thanks!

#10 Updated by Daniel Kutyła about 1 year ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved

#11 Updated by Peter Amstutz about 1 year ago

  • Release set to 25

Also available in: Atom PDF