Skip to content

[UX] File and folder renaming fails silently on validation errors #4176

Description

@Dakshx07

p5.js version

Latest (develop branch)

What is your operating system?

Mac OS

Web browser and version

Any (Chrome / Firefox / Safari)

Actual Behavior

When renaming a file or folder in the sidebar, if the new name violates validation rules (e.g. is empty, a folder containing a dot, or a file with an invalid/missing extension), the name silently reverts to its previous state without any explanation or notification to the user.

Expected Behavior

The editor should display a toast notification explaining the validation error (e.g., "Folder name cannot contain an extension", "Please enter a name", or "Invalid file type..."), rather than silently resetting the name.

Steps to reproduce

  1. Open a sketch in the p5.js Web Editor.
  2. Double-click an existing folder in the sidebar to rename it.
  3. Type a name containing a dot (e.g. assets.js) and press Enter or click away.
  4. Observe that the folder name silently reverts to the original name without any toast/notification.
  5. Alternatively, rename any file or folder to an empty name (or spaces only) and press Enter/click away, observing the same silent revert.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardBugError or unexpected behaviors

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions