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

Settings: new user row replaced by a modal #23529

Merged

Conversation

Simounet
Copy link
Member

Hi there,
I know that I have to commit the compiled files but I need some help here. make watch-js changes files without me touching anything.
Another issue is that on modal opening, the HTML validation displays error on password and mail inputs. Did I miss something here because it wasn't an issue before.

Here is a screenshot of the result:
nextcloud-settings-new-user-modal

Linked to #23397.

Have a good night and stay safe.

@kesselb
Copy link
Contributor

kesselb commented Oct 16, 2020

/compile amend /

@kesselb
Copy link
Contributor

kesselb commented Oct 16, 2020

make watch-js changes files without me touching anything.

I have the same issue from time to time. Usually fixed by rm -rf node_modules. Maybe not bad to use node 12.x. Super cool enhancement and much better then before 👍

@Simounet
Copy link
Member Author

I tried to clean my env but it's not working. I'm running Node v12.14.1.

@Simounet Simounet force-pushed the feat/23397-settings-new-user-modal branch 3 times, most recently from 9580d81 to 71c6c9c Compare October 20, 2020 19:27
@AndyXheli
Copy link
Contributor

@jancborchardt What do you think about this?

@Simounet Simounet force-pushed the feat/23397-settings-new-user-modal branch from 71c6c9c to 9d40928 Compare October 22, 2020 09:26
@Simounet
Copy link
Member Author

I put the display name first and the popin is larger.

nextcloud-settings-new-user-modal-larger

The last issue here is about the HTML validation when the popin appears.

@kesselb
Copy link
Contributor

kesselb commented Oct 22, 2020

cc @skjnldsv any idea why the form validation triggers on modal open?

@skjnldsv
Copy link
Member

cc @skjnldsv any idea why the form validation triggers on modal open?

Probably a chaining events. Make sure you use an event stop on the button

@kesselb
Copy link
Contributor

kesselb commented Oct 22, 2020

Or it's probably the default behaviour 🤔

https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation
https://mdn.github.io/learning-area/html/forms/form-validation/full-example.html

Each element with required get the :invalid state.

@skjnldsv
Copy link
Member

Ah, I misunderstod "form validation". I understood that as "submit". :)
Yes, it's normal if you use field types

@Simounet Simounet force-pushed the feat/23397-settings-new-user-modal branch from 9d40928 to 901c829 Compare October 22, 2020 12:43
@Simounet
Copy link
Member Author

I get what was bothering me. Previous style override the red border so I put that here. It's not perfect but it's better than having red border without touching anything.

@AndyXheli
Copy link
Contributor

I put the display name first and the popin is larger.

nextcloud-settings-new-user-modal-larger

The last issue here is about the HTML validation when the popin appears.

Looks good!! Nice work

Comment on lines +610 to +614
.modal__content::v-deep .multiselect__single {
text-align: left;
box-sizing: border-box;
}
.modal__content::v-deep .multiselect__content-wrapper {
box-sizing: border-box;
}
Copy link
Member

Choose a reason for hiding this comment

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

Seems like an odd change, why was it needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because of the default border of 1px on each side. Without changing the box sizing, I have 2 extra pixels.

Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

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

A few comments. Please abuse comments on your css code, especially v-deeps. Otherwise we don't know why you had to do it and maintaining is complicated :)

Same for other functions, it's a good habit to put more comments. It will get stripped for the build anyway, file size doesn't matter here.

@Simounet
Copy link
Member Author

Ahah, some people love comments where some others don't. I will remember that they are appreciated here. :)

@Simounet Simounet force-pushed the feat/23397-settings-new-user-modal branch from 901c829 to d29f986 Compare October 23, 2020 12:24
@rullzer rullzer added this to the Nextcloud 22 milestone Jan 8, 2021
@AndyXheli

This comment has been minimized.

@Simounet Simounet force-pushed the feat/23397-settings-new-user-modal branch 3 times, most recently from e44c87f to 075201b Compare February 23, 2021 19:17
@AndyXheli
Copy link
Contributor

@Simounet is there still an issue with the code ?

@skjnldsv
Copy link
Member

skjnldsv commented Mar 2, 2021

I think the acceptance test fail is valid.
@Simounet can you rebase?

Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

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

Code looks sane, the modal is much nicer!

@Simounet Simounet force-pushed the feat/23397-settings-new-user-modal branch from 075201b to 220fd3f Compare March 2, 2021 11:03
@Simounet
Copy link
Member Author

Simounet commented Mar 2, 2021

I rebased and push. Just waiting for the CI.

@danxuliu
Copy link
Member

danxuliu commented Mar 8, 2021

Sorry a lot for the delay.

#25991 updates the browser used in the acceptance tests to a recent version. With that recent version the dialog works as expected :-)

However, turns out that the header test was wrong! It was trying to add the user "user1", but that user is already added when installing and configuring the server, so it is already added in all tests. Thus, even if the dialog worked properly, the test would also fail because adding the user would fail, the dialog would not be closed, and the following steps would fail. The header test is fixed by #25990

Due to all that this pull request should be rebased on master once #25990 and #25991 are both merged and everything should then work (I have also added a fixup commit to this pull request to do a minor adjustment).

@Simounet
Copy link
Member Author

Simounet commented Mar 8, 2021

I can't wait to see this PR merged! Thanks for the reply. I don't get why you removed my test to check if the modal is not here. Is it somewhere else on your PRs?

@kesselb
Copy link
Contributor

kesselb commented Mar 16, 2021

Hi @Simounet,

mind to rebase your branch another time?

@Simounet Simounet force-pushed the feat/23397-settings-new-user-modal branch from 66a1241 to fcba309 Compare March 16, 2021 20:39
@danxuliu danxuliu force-pushed the feat/23397-settings-new-user-modal branch from fcba309 to e01bdd7 Compare April 21, 2021 11:17
@danxuliu
Copy link
Member

#25991 has been finally merged, so I took the liberty to rebase this pull request to latest master :-)

I don't get why you removed my test to check if the modal is not here. Is it somewhere else on your PRs?

Sorry, I missed the question. I removed the check because I think that it is not strictly needed in that scenario. When possible the acceptance tests should not go into specific details like whether a modal is used or not, and in this case it should be enough to just verify that the user was indeed added to the list to continue.

Of course it could happen that the modal was not properly closed, so a check for that could still be added in the scenarios related to user creation, or inside the step I create user :user with password :password (as that is a high level step that abstracts a "complex" action, and the modal being closed would be part of that action). But for me it still feels like something not being tested at the right scope, so I did not add it :-)

@AndyXheli
Copy link
Contributor

this is finally happening 🙏🏻😁 super excited

Signed-off-by: Simounet <contact@simounet.net>
@Simounet Simounet force-pushed the feat/23397-settings-new-user-modal branch from e01bdd7 to 45c3b2a Compare April 21, 2021 12:43
@skjnldsv skjnldsv merged commit 3da956b into nextcloud:master Apr 21, 2021
@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 Apr 21, 2021
@skjnldsv
Copy link
Member

skjnldsv commented Apr 21, 2021

All tests passed! Well done!! 🎉 🚀

@Simounet
Copy link
Member Author

Glad to see this finally merged! Thank you everyone for your support in my first real PR on this amazing piece of software.
Hope you'll enjoy this "feature" @AndyXheli ! :D

@Simounet Simounet deleted the feat/23397-settings-new-user-modal branch April 21, 2021 14:41
@AndyXheli
Copy link
Contributor

Glad to see this finally merged! Thank you everyone for your support in my first real PR on this amazing piece of software.

Hope you'll enjoy this "feature" @AndyXheli ! :D

Thank you so much brother for making this happen. Definitely will 😁 have a nice day.

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 enhancement feature: users and groups
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new user content boxes not aligned
8 participants