server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: Two different ' this name is already in use ' message implementations in file creation on web.

Open koenbokern opened this issue 4 months ago • 4 comments

⚠️ This issue respects the following points: ⚠️

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.

Image

Steps to reproduce

  1. Create a file with a chosen name.
  2. Try to create another file of the same file type with the same name in the same folder.
  3. 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

koenbokern avatar Jul 30 '26 09:07 koenbokern

Implemented in https://github.com/nextcloud/server/pull/62767.

mvanhorn avatar Aug 02 '26 07:08 mvanhorn

@nextcloud/designers what do you think? We should handle this consistent for forms. When we have validation, how should that be handled visually?

  1. Use our custom helper text below the input element
  2. 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).

susnux avatar Aug 03 '26 11:08 susnux

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?

kra-mo avatar Aug 03 '26 14:08 kra-mo

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.

kra-mo avatar Aug 03 '26 14:08 kra-mo