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

Add workerPool (née workerType) creation interface (non-working) #814

Merged
merged 20 commits into from Jun 4, 2019

Conversation

owlishDeveloper
Copy link
Collaborator

@owlishDeveloper owlishDeveloper commented May 30, 2019

Bugzilla Bug: 1554798

workerType is now workerPool in worker manager universe. I'd like to rename All The Things in a separate PR on a separate branch tho, so this PR has the old terminology <-- changed my mind on this to make the work more modular. This PR contains all the new terminology. The rest comes in a separate PR

@owlishDeveloper owlishDeveloper requested a review from a team as a code owner May 30, 2019 17:03
@owlishDeveloper owlishDeveloper self-assigned this May 30, 2019
@owlishDeveloper owlishDeveloper added this to In progress in worker manager ui via automation May 30, 2019
@owlishDeveloper owlishDeveloper changed the title Add workerPoll (née workerType) creation interface (non-working) Add workerPool (née workerType) creation interface (non-working) May 30, 2019
@owlishDeveloper owlishDeveloper requested review from helfi92 and removed request for a team May 30, 2019 17:10
Copy link
Contributor

@helfi92 helfi92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking really good! I added some requested changes. Happy to discuss if you disagree with anything.

ui/src/views/WorkerManager/WMEditWorkerPool/index.jsx Outdated Show resolved Hide resolved
ui/src/views/WorkerManager/WMEditWorkerPool/index.jsx Outdated Show resolved Hide resolved
ui/src/views/WorkerManager/WMEditWorkerPool/index.jsx Outdated Show resolved Hide resolved
ui/src/views/WorkerManager/WMEditWorkerPool/index.jsx Outdated Show resolved Hide resolved
ui/src/views/WorkerManager/routes.js Show resolved Hide resolved
ui/src/views/WorkerManager/WMEditWorkerPool/index.jsx Outdated Show resolved Hide resolved
ui/src/views/WorkerManager/WMEditWorkerPool/index.jsx Outdated Show resolved Hide resolved
ui/src/views/WorkerManager/WMEditWorkerPool/index.jsx Outdated Show resolved Hide resolved
ui/src/views/WorkerManager/WMEditWorkerPool/index.jsx Outdated Show resolved Hide resolved
worker manager ui automation moved this from In progress to Review in progress May 31, 2019
Copy link
Contributor

@helfi92 helfi92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking pretty solid. Added some final requested changes :)

margin="normal"
/>
</ListItem>
</List>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of indenting the provider name and provider type

Screen Shot 2019-06-03 at 10 08 31 AM

we can put everything in one line:

Screen Shot 2019-06-03 at 9 59 35 AM

<Grid container>
  <Grid item xs={12} sm={6}>
    <ListItem>
      <TextField
        fullWidth
        label="Name"
        value={workerPool.providerId}
        name="providerId"
        onChange={this.handleInputChange}
      />
    </ListItem>
  </Grid>
  <Grid item xs={12} sm={6}>
    <ListItem>
      <TextField
        className={classes.dropdown}
        id="select-provider-type"
        select
        label="Type"
        helperText="Which service do you want to run your tasks in?"
        value={workerPool.providerType}
        name="providerType"
        onChange={this.handleInputChange}>
        {Object.keys(providers).map(p => (
          <MenuItem key={p} value={p}>
            {p}
          </MenuItem>
        ))}
      </TextField>
    </ListItem>
  </Grid>
</Grid>

Other edits in the code block:

  • I removed margin="normal" from both text fields in order to bring them closer to the list subheader "Provider".'
  • s/Type:/Type/
  • Added fullWidth to the first TextField

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can put everything in one line

how is this better than indenting? If one uses trackpad or a mouse, indented fields require less movement as they are grouped more closely together. And I just like the indentation better :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might not matter: the user doesn't get to specify the provider type here, just the provider ID. There's no such thing as "provider name".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is necessary to use indentation when there is a clear subheader that does the job of separation. Also, I think Indented text fields don't sit well on mobile.

Screen Shot 2019-06-03 at 12 08 24 PM

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the provider type here, just the provider ID. There's no such thing as "provider name".

We don't have to leak the names of DB fields into the UI, and the reason I didn't change it - in my mind ID is usually a numeric or a UUID-type of string. My intention was to make it clearer that user can enter an understandable thing in there, like a name.

That said, if you think "provider ID" is better than "provider name", I can make that change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, updated version: (and thank you for uncovering the padding issue on mobile, @helfi92 !)

screen

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a lot better than before. I still think the indentation is more suitable for things like tree views, radio buttons, etc. I think Indentation is not necessary for inputs when there is a subheader above it. If we are trying to add more emphasis to it, then we can try adding more vertical spacing on top of list subheaders. Let me know if that does the job.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are trying to add more emphasis to it

Yes, that's exactly what I am trying to do. Subheaders don't work for me because they're small font (even smaller than those label/placeholder hybrids), and the whole thing just looks like a uniform wall of text to me.

I'll try experimenting with vertical spacing

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This spacing works for me:

screen

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(it's in the last commit I pushed)

@helfi92 helfi92 self-requested a review June 3, 2019 20:48
Copy link
Contributor

@helfi92 helfi92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the new design a lot! I think we should also incorporate the spacing technique in our other forms. I've filed #835. Just some minor nits then we should be ready to merge.

ui/src/views/WorkerManager/WMEditWorkerPool/index.jsx Outdated Show resolved Hide resolved
ui/src/views/WorkerManager/WMEditWorkerPool/index.jsx Outdated Show resolved Hide resolved
ui/src/views/WorkerManager/WMEditWorkerPool/index.jsx Outdated Show resolved Hide resolved
Copy link
Contributor

@helfi92 helfi92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 🎊 Added some comments but feel free to ignore. Great work.

},
middleList: {
paddingTop: theme.spacing.unit * 7,
paddingBottom: theme.spacing.unit * 9,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's probably a bit too much padding. I think equal padding works but I'll let you decide on that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To my eye, when it's equal, the lower one seems smaller (it's actually a thing about human vision - if you noticed the shape of capital B in many fonts, for example; the upper part is often smaller to make the letter look balanced) - I planned to commit 70 and 90 pixels yesterday, but for some reason the previous iteration ended up in the commit

<ListItem>
<TextField
label="Worker Pool ID"
name="workerPoolId"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't edit this field via the UI. workerPoolId probably is not listed in the state.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will be! The fields will be corrected when I start working on the actual functionality of the form

worker manager ui automation moved this from Review in progress to Reviewer approved Jun 4, 2019
@owlishDeveloper owlishDeveloper merged commit 9aa285d into taskcluster:master Jun 4, 2019
worker manager ui automation moved this from Reviewer approved to Done Jun 4, 2019
@owlishDeveloper owlishDeveloper deleted the bug1542905-3 branch June 4, 2019 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants