plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
446 stars 606 forks source link

User control panel > Add user issues with validation errors #6197

Open stevepiercy opened 1 month ago

stevepiercy commented 1 month ago

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

  1. Login as admin/admin on https://demo.plone.org/
  2. Go to the User control panel https://demo.plone.org/controlpanel/users
  3. Click + to add a new user.
  4. Fill in details but leave the password field blank.
  5. Submit the form.
  6. Scroll to the top to observe the following screenshot. Screenshot 2024-07-25 at 1 43 31 PM

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
barelysomethin commented 1 month ago

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.

stevepiercy commented 1 month ago

@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.

barelysomethin commented 1 month ago

alright, thanks.

wesleybl commented 1 month ago

@barelysomethin the file in question is this one:

https://github.com/plone/volto/blob/main/packages/volto/src/components/manage/Controlpanels/Users/UsersControlpanel.jsx

Srihari2222 commented 2 weeks ago

@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?

stevepiercy commented 2 weeks ago

@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.