Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't copy/paste label from task #1256

Closed
djmitche opened this issue Aug 29, 2019 · 4 comments
Assignees

Comments

@djmitche
Copy link
Contributor

@djmitche djmitche commented Aug 29, 2019

Describe the bug
The label and other gray pills for a bug can't be copy/pasted.

image

In general, copy/paste doesn't work for a lot of parts of the UI, which makes debugging hard since I have to carefully retype things or find them in the DOM inspector and copy from there. If it's possible to globally turn off whatever the UI is doing to prevent the browser from allowing copy/paste, that would be great.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://taskcluster-ui.herokuapp.com/tasks/SDy5lkIuQiuKRxBVw-xnTA

Expected behavior
Every piece of text onscreen can be selected and copied

@djmitche djmitche added the bug label Aug 29, 2019
@rbrishabh

This comment has been minimized.

Copy link
Collaborator

@rbrishabh rbrishabh commented Aug 29, 2019

Can I take this one up? @helfi92 @djmitche

@helfi92

This comment has been minimized.

Copy link
Member

@helfi92 helfi92 commented Aug 30, 2019

I think one way to make a chip selectable is via:

diff --git a/ui/src/views/Tasks/ViewTask/index.jsx b/ui/src/views/Tasks/ViewTask/index.jsx
index 7326ff8f7..e0a60a8a5 100644
--- a/ui/src/views/Tasks/ViewTask/index.jsx
+++ b/ui/src/views/Tasks/ViewTask/index.jsx
@@ -95,6 +95,16 @@ const getCachesFromTask = task =>
   link: {
     ...theme.mixins.link,
   },
+  chipLabel: {
+    whiteSpace: 'nowrap',
+    userSelect: 'text',
+    cursor: 'inherit',
+  },
+  chipRoot: {
+    whiteSpace: 'nowrap',
+    userSelect: 'text',
+    cursor: 'inherit',
+  },
 }))
 @graphql(taskQuery, {
   options: props => ({
@@ -726,6 +736,7 @@ export default class ViewTask extends Component {
               <Markdown>{task.metadata.description}</Markdown>
             </Typography>
             <Chip
+              classes={{ label: classes.chipLabel, root: classes.chipRoot }}
               className={classes.tag}
               label={
                 <Fragment>

A neat way to do this is to create src/component/Chip instead and all instances of Chip use that component.

@rbrishabh

This comment has been minimized.

Copy link
Collaborator

@rbrishabh rbrishabh commented Sep 2, 2019

Alright, I'm on it!

@helfi92

This comment has been minimized.

Copy link
Member

@helfi92 helfi92 commented Sep 3, 2019

Resolved in 9708ad3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.