[Bug]: Two different ' this name is already in use ' message implementations in file creation on web.
⚠️ This issue respects the following points: ⚠️
- [x] This is a bug, not a question or a configuration/webserver/proxy issue.
- [x] This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- [x] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [x] I agree to follow Nextcloud's Code of Conduct.
Bug description
When creating a new file in the web interface and trying to name the file exactly like another file two 'this name is already in use' messages are shown through two different implementations.
One shows a red border around the input field and the message beneath it as long as the name is already in use. The other is a tooltip style message that requires key or mouse button input to dissappear (although the name is still already in use, as indicated by the first mentioned implementation.
Steps to reproduce
- Create a file with a chosen name.
- Try to create another file of the same file type with the same name in the same folder.
- See two different implementations of the 'This name is already in use' message.
Expected behavior
To see only one message, preferably the red text type message with the red border around the input field.
Nextcloud Server version
33 (33.0.6)
Operating system
No response
PHP engine version
No response
Web server
No response
Database engine version
No response
Is this bug present after an update or on a fresh install?
No response
Are you using the Nextcloud Server Encryption module?
No response
What user-backends are you using?
- [ ] Default user-backend (database)
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
Implemented in https://github.com/nextcloud/server/pull/62767.
@nextcloud/designers what do you think? We should handle this consistent for forms. When we have validation, how should that be handled visually?
- Use our custom helper text below the input element
- Use the native validation of the users platform
Option 1 would need us to also add validation messages for e.g. required or other native validations like min=X or max=Y.
Option 2 would be better for accessibility as it needs no special handling as native validation has built-in accessibility support.
IMHO we should use one of both and not a mix if possible. (I feel more leaned to 2 for easier accessible validation and then we can use the helper text for hints but not errors).
Use the native validation of the users platform
The native one unfortunately kind of sucks on some browsers (Safari). Isn't there some cool modern CSS feature to restyle these?
Meh, honestly, looking at it again, it's not that bad assuming it's aligned correctly. They probably changed it recently as they did many other dated default native styles.
Using the native one is indeed the smarter option, just need to make sure it isn't aligned awkwardly.