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

Ux manage servers #415

Merged
merged 21 commits into from Feb 10, 2017
Merged

Ux manage servers #415

merged 21 commits into from Feb 10, 2017

Conversation

jnugh
Copy link
Contributor

@jnugh jnugh commented Jan 16, 2017

Before submitting, please confirm you've

Please provide the following information:

Summary
Adds a button to the Tab Header which allows the user to add a new team without opening the settings page. Use the new Modal in the settings view as well.

Issue link
#400, #401

Test Cases
Add a new server from the tab header and the settings page.

I added multiple specs that test if newly added teams are being persisted and if the modal behaves as expected in general.

I'm not sure if the way I do error handling is a good idea, I just saw that #400 defines an area where the error message should be displayed - I think that it's best to have the message next to the input that is incorrect but I could change it (might be a good idea to discuss).

@yuya-oc
Copy link
Contributor

yuya-oc commented Jan 17, 2017

Somehow CircleCI didn't build the PR (probably due to preferences). So I made the artifacts in my fork. https://circleci.com/gh/yuya-oc/desktop/132#artifacts

@jnugh
Copy link
Contributor Author

jnugh commented Jan 17, 2017

What's going on with the tests? It worked for me locally...

Copy link
Contributor

@yuya-oc yuya-oc left a comment

Choose a reason for hiding this comment

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

valid-url is missing in src/package.json.

@jnugh
Copy link
Contributor Author

jnugh commented Jan 17, 2017

That was pretty obvious... 👍

@yuya-oc
Copy link
Contributor

yuya-oc commented Jan 17, 2017

Testable artifacts are available. https://circleci.com/gh/mattermost/desktop/839#artifacts

@jasonblais
Copy link
Contributor

Yay, this is great @jnugh! Will test it out today! 🎉

@jasonblais
Copy link
Contributor

Thanks @jnugh! This is really well done! I've been testing it out yesterday and today.

There are a few notes / pieces of feedback to consider when you have the chance - even though they might seem like a lot, it's just mostly small UX notes. Functionally everything is working really well! Love it :)

1) "Add Server" dialog

image

Proposals (based on #400, part 3):

VISUAL:

1a) Change title from Add a new Team to Add Server --> a new team sidebar was added to Mattermost Server 3.6, which allows you to display all your teams on the single interface. So you no longer need a separate tab for your teams, only for your servers
1b) I feel Please specify a server name and a valid Mattermost URL is redundant since we give help text below the input boxes - we could consider removing that sentence from the modal, what do you think?
1c) Update https://example.org to https://example.com (it'll be consistent with other similar examples in Mattermost)

FUNCTIONALITY:

Propose that when a user presses
1d) Enter, the "Add" button action is taken
1e) Esc, the "Cancel" button action is taken
1f) Clicking outside of the modal closes the dialog (carries out the "Cancel" button action) --> I'm not sure how hard this would be to implement, so definitely okay making a separate improvement ticket for it
1g) After hitting "Add" on the dialog (when pressing the "+" icon, not on the Settings page), and the new server appears on the right-most tab of the navigation bar, propose automatically activating that tab for the user.

ERROR HANDLING:

1h) Propose that errors aren't displayed until the user hits the "Add" button or hits Enter. This is consistent with other Mattermost dialogs, and is more forgiving to the user (we want to avoid telling the user they made a mistake, unless they actually made one).

When the user hits "Add" and if there's an error that prevents adding the server, then

  • highlight the input field in red only (no highlights for the title or help text)
  • show the error message below the input field, but above the help text, similar to when creating a new channel (see below)

image

1i) Error messages (from #400)

  • If no name is provided, show text “Name is required."
  • If no URL is provided, show text “URL is required.”
  • If URL is provided but is missing http:// or https://, show text “URL should start with http:// or https://.”

2) "Edit Server" dialog

It looks like clicking "Edit" on the Settings page opens the same "Add Server" dialog without pre-populated information.

Propose that

  • fields are pre-populated with the previously specified server display name and server URL
  • title is "Edit Server" instead of "Add Server"
  • pressing "Cancel" undoes changes and closes the modal
  • pressing "Save" closes the modal and saves the changes

3) "+" icon

3a) Propose removing the border around the "+" icon in server navigation tab bar -- it makes it look a bit prominent (I noticed that my eyes keep getting drawn to it). (Propose we keep the hover effect though)
3b) To follow the "obvious" design principle, propose we add a tooltip when hovering over the "+" icon, similar to Google Chrome (see below) with text New server.

image

4) Miscellaneous

This is just something that came to mind during testing and would probably be a separate improvement ticket:

If there is only one server tab, then the "+" icon isn't visible since the server navigation bar is hidden automatically. Hence, it's not obvious how to add a new server in that case.

I'm not a huge fan for showing the tab bar when there is only one server, and I think we should continue to hide it. Otherwise, it would just be wasted space on the app window for those who only have one server.

However, we could consider adding a new option in the menu bar such as Sign in to Another Server or Add a New Server, perhaps under File or Window, which opens the "Add Server" dialog when clicked. That way it'll at least be more discoverable.

Other ideas would be welcome.

@jnugh
Copy link
Contributor Author

jnugh commented Jan 19, 2017

Alright, most of these things should be pretty easy to change.
Regarding error handling: There is still some stuff to do but I didn't want to focus on the actual behavior before discussing where to place the message (there is this mockup where it goes to the bottom left):

So when I change the style for invalid inputs, that would would be a general change for all inputs in the desktop app (not inside the web view) - To be honest I'm not sure if we highlight invalid input somewhere else yet - if we do these places would change as well. But as this would be consistent with the Mattermost platform I feel like this should actually be the best way to go.

1a-g) 👍
1h-i) See above 👍
2) Nice catch, didn't even notice that I changed the behavior of the server edit function. We could still keep the old edit behavior - might make sense when we add drag/drop reordering...
3) I change the + button into a link - let's see.
4) Would be very easy to add 👍

@jasonblais
Copy link
Contributor

jasonblais commented Jan 19, 2017

Thanks for your response! All sounds good.

1h-i): Ah, you're right. Yes, let's add it at the bottom left instead. User's eyes are drawn towards the "Add" button and hence you notice the error message more easily if it's close to it.

That way you also don't have to move the help text down if there's an error message present.

2): Yeah, I think using the "Edit Server" dialog would be better for a consistent experience. Also, right now the 'edit server' input fields appear at the bottom of the server list, which isn't necessarily clear to users (it looks like you're adding a new server).

This would also cover part 4 of #400 ticket.

3): Let me know if that's tricky to change, happy to discuss it
4): Awesome, can you help add it in that case? We can add it under File > Sign in to Another Server, which just performs the same exact action as the "+" icon.

Propose adding it as the first item on the File drop-down list.

@jasonblais
Copy link
Contributor

By the way, @yuya-oc, if you have any feedback about my proposals, please let me know.

Same for you @jnugh, please don't hesitate to suggest other options

Copy link
Contributor

@yuya-oc yuya-oc left a comment

Choose a reason for hiding this comment

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

A prop is not a state, so it should not be changed by the component itself. However, probably to fix this is a little difficult in this PR. So please add some comments.

this.setState({
showNewTeamModal: false
});
this.props.teams.push(newTeam);
Copy link
Contributor

Choose a reason for hiding this comment

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

prop is changed.

this.setState({
showNewTeamModal: false
});
this.props.teams.push(newTeam);
Copy link
Contributor

Choose a reason for hiding this comment

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

prop is changed.

@yuya-oc
Copy link
Contributor

yuya-oc commented Jan 20, 2017

Almost was done in above discussion 👍
So I added a review in code.

var modal;
if (this.state.showNewTeamModal) {
modal = (
<NewTeamModal
Copy link
Contributor

@yuya-oc yuya-oc Jan 20, 2017

Choose a reason for hiding this comment

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

Possibly you can use show parameter of ReactBootstrap.Modal. In my memory, it would make better animation. Please see LoginModal in this render().

@jasonblais
Copy link
Contributor

Thanks for the continued progress @jnugh!

@jasonblais
Copy link
Contributor

Hey @jnugh! Just checking how things are going? :)

@jnugh
Copy link
Contributor Author

jnugh commented Jan 30, 2017

Here comes another bunch of changes :) From what I see, the only thing missing is to change the plus sign... I tried a usual link but that does not match the layout at all. So some more Styling is needed here.

@jasonblais
Copy link
Contributor

Awesome! 🎉

Let me know if you need any help with CSS on the plus sign styling, I can ask our UI designer to help take a look too.

@yuya-oc
Copy link
Contributor

yuya-oc commented Jan 31, 2017

Please let me confirm. Is the part 4 of #400 intended in this PR? I could not close the modal which is opened by "Edit". And if I click the outside of modal or "Cancel", the server is unexpectedly duplicated.

Repro steps:

  1. Click "Edit" in settings page. ("Add Server" modal opens. This should be "Edit Server".)
  2. Click "Cancel" or outside of the modal.
  3. Click "Add". (should be "Save")
  4. The server is duplicated as a new server.

If the step 2 is skipped, the modal correctly works.

However the key functionality (especially modal) would be done in this PR. So I feel that I can take over the rest though, how do you feel?

@jnugh
Copy link
Contributor Author

jnugh commented Jan 31, 2017

That should be fixed now :)
I guess it can be merged if you have no further additions or changes. The Plus button can be changed afterwards...

@jasonblais
Copy link
Contributor

Thanks @jnugh! Let me test it out as well, thanks for all your help here!

@yuya-oc
Copy link
Contributor

yuya-oc commented Feb 1, 2017

The feature looks working 👍

@jasonblais
Copy link
Contributor

jasonblais commented Feb 2, 2017

Thanks @jnugh! Looking great!

Just minor notes:

  1. Team URL should actually be "Server URL". I missed this on the first review

image

  1. Can we make the whitespace between
    a. top line and Server Display Name
    b. bottom line and The URL of ... help text

equal?

Let's use the spacing between the bottom line and The URL of ... help text for both.

image

  1. Animation when closing the dialog

We have a really nice animation for the "Add Server" dialog when it appears (yay!).

However, the same animation doesn't happen when the dialog closes. It's more abrupt.

Wondering if this is easy to update so the experience is consistent?

  1. I noticed the error handling for http:// isn't correct: it actually accepts a URL with just http:

I couldn't reproduce it with our 3.5 release, so seems it might be caused by this PR.

image

  1. "+" icon: How likely do you think you'll have time to update the styling of the "+" icon? We're considering to cut the release candidate for 3.6 on Feb 7th.

I could ask our UI guru (asaad) to take a look. It might be quick for him and we' be able to apply it already on this PR.

@jnugh
Copy link
Contributor Author

jnugh commented Feb 3, 2017

  1. : I use https://www.npmjs.com/package/valid-url, I might switch to something different - any other ideas?
  2. : Yeah if he has time he can definitely do this a lot faster then I could. Would be awesome!

@jasonblais
Copy link
Contributor

4 - What did we use before? @yuya-oc any suggestions?
5 - I'll touch base with him 👍

Thanks @jnugh for your continued help!

@jasonblais
Copy link
Contributor

Update: I tested 1) and 2), looks good!

The commit for 3) seems to break the build, so I couldn't test it yet: 1343dce

Also asked Asaad to take a look at 5)

@jnugh
Copy link
Contributor Author

jnugh commented Feb 3, 2017

Tests were not waiting for animation - fixed that one.
4) I will use the regex which was used before, drop valid-url.

@jasonblais
Copy link
Contributor

@jnugh I tested 3) and 4), works great.

@asaadmahmood will take a look at the styling of the "+" sign once this PR has merged.

@yuya-oc please feel free to merge if this looks good to you

@yuya-oc
Copy link
Contributor

yuya-oc commented Feb 10, 2017

Looks good. Thanks @jnugh many times!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants