-
Notifications
You must be signed in to change notification settings - Fork 41
#201 Added "Add task" button #231
Conversation
helfi92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@helfi92 Strange it should've worked... I'll push again and see whats going on. |
|
@helfi92 It passes! |
helfi92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try using a "fab" button and placing it on the left side of the speed dial button.
The code of a fab button will be similar to:
taskcluster-web/src/views/Hooks/ListHooks/index.jsx
Lines 81 to 90 in 8d1015b
| <Tooltip title="Create Hook"> | |
| <Button | |
| color="secondary" | |
| variant="fab" | |
| onClick={this.handleCreateHook} | |
| className={classes.actionButton} | |
| > | |
| <PlusIcon /> | |
| </Button> | |
| </Tooltip> |
|
How is it going @sammysamx20? Let me know if I can help :) |
|
Hey sorry I got busy this last weekend! I should be able to work on this today |
|
No worries! Just wanted to see if everything was okay :) |
|
Actually I do have one question, I was planning to wrap the buttons in a div. But I was wondering how you got the hamburger menu down at the bottom right and where the CSS is for that? |
Yes, you can definitely wrap the button in a div. Something like that: <Tooltip title="Create Task">
<div>
<Button
variant="fab"
// ...
>
<PlusIcon />
</Button>
<div>
</Tooltip>
To have the button have the "circle" shape, you have to provide the taskcluster-web/src/components/SecretForm/index.jsx Lines 26 to 28 in 0a187e3
Hope that helps. |
|
@helfi92 Sorry for the long delay here's what I have! |
|
Do you mind rebasing on master, otherwise it gets hard to review this patch. There's a couple of ways to do this but I usually do: # step 1: from your branch, run
git pull https://github.com/taskcluster/taskcluster-web.git master --rebase
# step 2: if there's a file conflict, fix it, then git add. Notice that you don't do git commit after git add here:
git add <file-with-conflict>
git rebase --continue
# step 3: if there's another conflict, go back to step 2
# step 4: force push your change
git push origin <your-branch-name> --force |
|
Should work now with rebase @helfi92 |
helfi92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Minor changes :)
| createdTaskId, | ||
| loading, | ||
| } = this.state; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add newline.
src/views/Tasks/CreateTask/index.jsx
Outdated
| tooltipOpen | ||
| icon={<PlusIcon />} | ||
| <Tooltip | ||
| style={{ position: 'fixed', bottom: 16, right: 90 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not mix css with javascript. Add the style after
| }, |
<Tooltip className={classes.tooltip} ...>
src/views/Tasks/CreateTask/index.jsx
Outdated
| title="Create Task" | ||
| > | ||
| <Button | ||
| color="secondary" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove color. The color is already specified in classes.createIcon.
|
Let me know if this works. |
src/views/Tasks/CreateTask/index.jsx
Outdated
| }, | ||
| toolTip: { | ||
| position: 'fixed', | ||
| bottom: 16, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bottom: theme.spacing.double,
src/views/Tasks/CreateTask/index.jsx
Outdated
| toolTip: { | ||
| position: 'fixed', | ||
| bottom: 16, | ||
| right: 90, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right: theme.spacing.unit * 11,
src/views/Tasks/CreateTask/index.jsx
Outdated
| position: 'fixed', | ||
| bottom: 16, | ||
| right: 90, | ||
| background: '#4CAF50', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this.
|
When i remove the background attribute CSS, it turns the button white |
|
Actually I think I figured it out |
helfi92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/views/Tasks/CreateTask/index.jsx
Outdated
| icon={<PlusIcon />} | ||
| <Tooltip | ||
| className={classes.createIcon} | ||
| placement="left" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
placement="top".
| title="Create Task" | ||
| > | ||
| <Button | ||
| variant="fab" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add requiresAuth, please. We don't want users to create tasks when signed out.
<Button
requiresAuth
variant="fab"
// ...|
Do you know what is causing the light mode to turn it to black? |
|
Actually I think I got it |
|
It's probably taskcluster-web/src/App/Main.jsx Lines 21 to 23 in 8d1015b
Main.jsx, you can create another style fabIcon with the following style:
+ fabIcon: {
+ '& .mdi-icon': {
+ fill: 'white',
+ },
+ },Then from the creat task view, you can do: createIcon: {
...theme.mixins.successIcon,
...theme.mixins.fabIcon,
position: 'fixed',
bottom: theme.spacing.double,
right: theme.spacing.unit * 11,
},I think that should fix it. |
|
I pushed some changes let me know if it works! |
helfi92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. A rebase is needed however.
…ton in the hamburger menu
|
is this okay? |
helfi92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 😍
|
phew I'm glad it works thanks for the help!! |
|
No problem. Awesome work! |
src/views/Tasks/CreateTask/index.jsx
Outdated
| icon={<PlusIcon />} | ||
| <Tooltip title="Create Task"> | ||
| <Button | ||
| requireAuth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. This needs to be requiresAuth 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aw man I'll do that now :(


Fixes #201.
Not completed yet, I wanted you to check code style if you can!