User control panel > Add user issues with validation errors
Describe the bug
When adding a user in the User control panel, and when any error occurs, the submit button doubles up.
Additionally one must scroll the panel to view any error messages, and it is not obvious that there may be a problem.
To Reproduce
- Login as admin/admin on https://demo.plone.org/
- Go to the User control panel https://demo.plone.org/controlpanel/users
- Click + to add a new user.
- Fill in details but leave the password field blank.
- Submit the form.
- Scroll to the top to observe the following screenshot.
Expected behavior Show the errors in some manner that does not require the user to scroll. Auto-scrolling would be OK, but might not be the best option.
Software
plone6-demo 1.0.0
Volto 17.16.0
Plone 6.0.11
plone.restapi 9.6.1
CMF 3.5
Zope 5.9
Python 3.11.9 (main, May 14 2024, 08:32:26) [GCC 10.2.1 20210110]
PIL 9.5.0 (Pillow)
Add-ons
@plone/volto-slate 17.16.0
volto-subblocks 2.0.0
volto-form-block 3.8.3
@eeacms/volto-accordion-block 10.4.6
@kitconcept/volto-button-block 2.3.1
@kitconcept/volto-heading-block 2.4.0
@kitconcept/volto-highlight-block 3.0.1
@kitconcept/volto-introduction-block 1.0.0
@kitconcept/volto-separator-block 4.1.1
@kitconcept/volto-slider-block 6.3.1
@kitconcept/volto-light-theme 3.3.1
volto-demo 0.1.0
hi @stevepiercy , i went through the volto repo but can't exactly the find the file which should contain this form field and code for control panel in general. can i get some guidance or any advice in general to navigate through the codebase efficiently.
@barelysomethin I don't know.
Also please read and follow First-time contributors, especially Things not to do, Contributing to Plone, and Contributing to Volto.
alright, thanks.
@barelysomethin the file in question is this one:
https://github.com/plone/volto/blob/main/packages/volto/src/components/manage/Controlpanels/Users/UsersControlpanel.jsx
@stevepiercy yeah, it is not obvious. I have a idea of adding toast or alert so that the error can display right after submitting form without scrolling to top. Can you assign to me?
@Srihari2222 no, we don't assign issues, but you can claim it for yourself. See First-time contributors, especially Item 1 in Things not to do.
hi @stevepiercy i think the toast would be a good approach?
@Shyam-Raghuwanshi I'm not entirely sure, as I think toasts fade away after a few seconds. We need direction from people interested in UX on the @plone/volto-team.
I think I would prefer something that appears adjacent to the password field that updates as the user types, not only when submitted, such as https://6.docs.plone.org/storybook/?path=/story/edit-widgets-id--errored. I would like to see https://6.docs.plone.org/storybook/?path=/story/edit-widgets-password--password enhanced.
Let's wait for clear direction.
ok
Hi There! 👋
We haven't seen any activity on this issue in a while :sleeping:, and we want to make sure that it's still relevant.
If updating to the latest version of Volto doesn't help, please let us know by:
- adding a comment about what needs to be done next 💬
- updating its status and other labels 🏷️
Otherwise close this issue. 🧹
This is still an issue.
New information, when I hover over the Save button, the second black circle disappears.