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

New user button to sidebar #7600

Merged
merged 8 commits into from
Feb 28, 2018
Merged

New user button to sidebar #7600

merged 8 commits into from
Feb 28, 2018

Conversation

skjnldsv
Copy link
Member

@skjnldsv skjnldsv commented Dec 21, 2017

Fix #6746
Fix #7162
@nextcloud/designers

capture d ecran_2018-02-23_12-05-25

  • Do we need the confirm submit button?
  • On mobile, clicking the new button hides the sidebar
  • Update documentation

@skjnldsv skjnldsv added 2. developing Work in progress design Design, UI, UX, etc. enhancement feature: users and groups medium papercut Annoying recurring issue with possibly simple fix. labels Dec 21, 2017
@skjnldsv skjnldsv self-assigned this Dec 21, 2017
@juliusknorr
Copy link
Member

I'm not that sure if we should go with a popover here. I'd rather use the solution @jancborchardt proposed in #7162:

That would add a new row in the content area on top of the table, with empty fields and dropdowns using default values, with the username field focused.

Makes much more sense to enter the new user data inline where it will appear later on as well.

@pixelipo
Copy link
Contributor

I agree with @juliushaertl - also because @jancborchardt 's proposed solution would also solve #6468

@skjnldsv
Copy link
Member Author

Okay :)

@MariusBluem
Copy link
Member

Even if I am the only one maybe, I like the proposed change.

  1. moving the „Add user“ button into the sidebar makes sense, since Mail and Contacts have the button at the same place. It makes the interface more clean and - at least for me - more easy to use. I would even love to see this in the Files UI.

  2. we can discuss the design of the appearing dropdown, there may be place for polishing.

@pixelipo
Copy link
Contributor

Nobody is contesting moving the Add button to the sidebar - that is a good solution. It's just that the button shouldn't open a popover, by rather create a new row with input fields in the main container.

It's a UX general rule of thumb that models should be used rarely.

In this particular example it's easy to create a usability issue - lose focus from popover and what happens with data that was already input?

@MariusBluem
Copy link
Member

Ah ... okay, sorry for the misunderstanding :)

@MariusBluem
Copy link
Member

maybe we should remove the "+add group" button by doing this ... looks strange having to such buttons in the sidebar (with one more prominent than the other) .. "+ add group" is not needed since a group can be created by simply adding an non-existing group to a user. What do you think @nextcloud/designers

@skjnldsv
Copy link
Member Author

I agree with @MariusBluem

@rullzer rullzer added this to the Nextcloud 14 milestone Jan 2, 2018
@jancborchardt
Copy link
Member

Let's keep separate things separate. :)

This issue is about redoing the "Add new user" flow. This includes adding a button in the sidebar (good start @skjnldsv!), which then adds a new row with inputs at the top of the list like I described and as @juliushaertl referemced above.

What we do with the "Add group" button is separate from this and should not block it.

@skjnldsv skjnldsv force-pushed the new-user-button-to-sidebar branch from d600042 to 5b19e31 Compare January 8, 2018 04:50
@codecov
Copy link

codecov bot commented Jan 8, 2018

Codecov Report

Merging #7600 into master will decrease coverage by <.01%.
The diff coverage is 0%.

@@             Coverage Diff             @@
##             master   #7600      +/-   ##
===========================================
- Coverage      51.9%   51.9%   -0.01%     
  Complexity    25434   25434              
===========================================
  Files          1609    1609              
  Lines         95365   95380      +15     
  Branches       1378    1378              
===========================================
+ Hits          49502   49505       +3     
- Misses        45863   45875      +12
Impacted Files Coverage Δ Complexity Δ
settings/templates/users/main.php 0% <ø> (ø) 0 <0> (ø) ⬇️
settings/templates/users/part.userlist.php 0% <0%> (ø) 0 <0> (ø) ⬇️
settings/templates/users/part.createuser.php 0% <0%> (ø) 0 <0> (ø) ⬇️
apps/files_trashbin/lib/Trashbin.php 72.46% <0%> (-0.25%) 136% <0%> (ø)
lib/private/Files/Cache/Propagator.php 96.2% <0%> (+1.26%) 16% <0%> (ø) ⬇️
lib/private/Files/ObjectStore/SwiftFactory.php 56.32% <0%> (+3.44%) 35% <0%> (ø) ⬇️

@skjnldsv
Copy link
Member Author

skjnldsv commented Jan 8, 2018

capture d ecran_2018-01-08_05-51-26

Okay, pr updated, left to do:

  • Dropdown select off by 2 px
    capture d ecran_2018-01-08_05-50-25

@jancborchardt
Copy link
Member

jancborchardt commented Jan 9, 2018

@skjnldsv sorry for the confusion, but the placement is still off. ;)

That would add a new row in the content area on top of the table […]

So it would look like a new row already, above the other user rows. Basically exactly like it is when you edit a user.

That way it's symmetric for people to use, and we don't have to maintain 2 separate interfaces. :)

@skjnldsv
Copy link
Member Author

skjnldsv commented Jan 9, 2018

Ahahaha I'm a fool :p
Apparently I forgot how to read 😆

@skjnldsv
Copy link
Member Author

skjnldsv commented Jan 9, 2018

Okay, what do you think now? @jancborchardt

capture d ecran_2018-01-09_17-06-26

@jancborchardt
Copy link
Member

Looks great! :) Just change the button label from "Create" to "Add user" (as we never use "Create") and it's good.

Please also check @nextcloud/designers :)

@MariusBluem
Copy link
Member

b20f7165-235d-47d2-950f-75867f341d73

Why dont you put the „Add User“ arrow in a line together with the 3-dot-menu. This would make room for additional settings like Group Admin, Quota and maybe E-Mail (according to what is shown/enabled) already while adding the user. What do you think? @jancborchardt

@skjnldsv
Copy link
Member Author

skjnldsv commented Jan 10, 2018

Why dont you put the „Add User“ arrow in a line together with the 3-dot-menu. This would make room for additional settings like Group Admin, Quota and maybe E-Mail (according to what is shown/enabled) already while adding the user. What do you think? @jancborchardt

I did at first, but we have multiple rows columns hidden. So if the user choose to display all of them (in the settings) the create button goes outside the window :(

@jancborchardt
Copy link
Member

@MariusBluem @skjnldsv yeah, I also saw it but came to the conclusion it’s fine. :) In the future we can improve it and show whatever people display, but this is fine for now.

Copy link
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

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

@skjnldsv could you make sure the first field »Username« is automatically focused when the button is clicked and row is created?

@jancborchardt
Copy link
Member

I fixed the wording to "Add user". :)

@skjnldsv skjnldsv force-pushed the new-user-button-to-sidebar branch from a41f629 to 2a5f087 Compare January 11, 2018 12:54
@skjnldsv skjnldsv mentioned this pull request Feb 27, 2018
18 tasks
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

USer menu in popover

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Multiselect fixes

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Register menu & copyright

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Allow form and label in popover standard

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

New menu NOT in popover

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Stop autofilling user and password...
SHAME TO THEM: https://bugzilla.mozilla.org/show_bug.cgi?id=956906#c100

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Hide men by default

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Added value and empty check to properly display a confirm button/input

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

w3c html form table compliance and menu fixes

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Various design fixes

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Fix wording to consistent 'Add user'

Signed-off-by: Jan-Christoph Borchardt <[email protected]>

Focus new username input on toggle

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Removed  unwanted th after rebase

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

quote fix

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Th to td

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

🙈

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Email input to email type

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Fixed table template cells and fix email input enabling

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Always show email and fixed min-width of name, username, mail and fullname columns

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>

Use button id

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
@rullzer rullzer force-pushed the new-user-button-to-sidebar branch from 80dc09c to 042617b Compare February 27, 2018 11:50
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

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

Works as advertised!

@rullzer rullzer added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 27, 2018
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
@skjnldsv
Copy link
Member Author

capture d ecran_2018-02-27_13-11-11

@skjnldsv
Copy link
Member Author

skjnldsv commented Feb 27, 2018

Wait a bit before merging please @rullzer

OKAY now

@MorrisJobke
Copy link
Member

Acceptance tests fail:

cenario: log in with invalid user once fixed by admin              # /drone/src/github.com/nextcloud/server/tests/acceptance/features/login.feature:32
    Given I act as John                                               # ActorContext::iActAs()
    And I can not log in with user unknownUser and password 123456acb # LoginPageContext::iCanNotLogInWithUserAndPassword()
    When I act as Jane                                                # ActorContext::iActAs()
    And I am logged in as the admin                                   # LoginPageContext::iAmLoggedInAsTheAdmin()
    And I open the User settings                                      # SettingsMenuContext::iOpenTheUserSettings()
    And I create user unknownUser with password 123456acb             # UsersSettingsContext::iCreateUserWithPassword()
      │ User name field for new user in Users Settings value could not be set
      │ Exception message: Element is not currently visible and so may not be interacted with
      │ Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
      │ System info: host: '47d48347a2f2', ip: '172.17.0.13', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-96-generic', java.version: '1.8.0_91'
      │ Driver info: driver.version: unknown
      │ Trying again
      │
      Element is not currently visible and so may not be interacted with

@MorrisJobke MorrisJobke added 2. developing Work in progress and removed 4. to release Ready to be released and/or waiting for tests to finish labels Feb 27, 2018
@skjnldsv skjnldsv force-pushed the new-user-button-to-sidebar branch from 9706b2d to 61f0a9e Compare February 27, 2018 19:40
@skjnldsv
Copy link
Member Author

And I set the password for user0 to 654321                               # UsersSettingsContext::iSetThePasswordForUserTo()
  Offset within element cannot be scrolled into view: (0, 0): [object HTMLTableCellElement]
  Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
  System info: host: 'a18942a51f1e', ip: '172.17.0.17', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-96-generic', java.version: '1.8.0_91'
  Driver info: driver.version: unknown (WebDriver\Exception\MoveTargetOutOfBounds)

Fixed most of it, will see tomorrow if danxuliu did not picked this up before me :)

@MariusBluem
Copy link
Member

Will you integrate nextcloud/bookmarks#424 (comment) in this PR?

@skjnldsv
Copy link
Member Author

skjnldsv commented Feb 28, 2018

@MariusBluem in a later pr. Do you recall where it was discussed before ? 🤔

Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
@danxuliu danxuliu force-pushed the new-user-button-to-sidebar branch from 3ddfc58 to 35144a7 Compare February 28, 2018 10:42
@danxuliu
Copy link
Member

The acceptance tests should all work now; I have squashed all the fixes related to the acceptance tests in a single commit.

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Feb 28, 2018
@skjnldsv
Copy link
Member Author

Failure unrelated.
Acceptance now passes

@rullzer rullzer merged commit 926419e into master Feb 28, 2018
@skjnldsv skjnldsv deleted the new-user-button-to-sidebar branch February 28, 2018 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish design Design, UI, UX, etc. enhancement feature: users and groups medium papercut Annoying recurring issue with possibly simple fix. standardisation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants