processing / processing/p5.js-web-editor

Naming a folder 'root' causes issues

Open
#845 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Priority:Medium
Dominant language
JavaScript
Stars
1.7k
Forks
1.7k
Avg merge
3d 4h
Merged PRs (30d)
8

Description

Nature of issue?
  • Found a bug
Details about the bug:

This is a related issue to #842, but requires a more in-depth refactoring to fix.

  • Steps to reproduce this bug:
  1. Create a folder called root. The folder is created, but shows up as blank in the sidebar due to the special behavior for a directory based on this name.

You can also cause a crash by doing the following:

  1. Create a folder named something that isn't 'root', and add a file to it.
  2. Rename the folder to 'root' and save the project.
  3. When you next load the project, it will crash the front-end. (Example sketch: https://editor.p5js.org/meiamsome/sketches/cyNfPGeDu )

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by creating, renaming, saving, and reloading a folder named root, using the linked example sketch if helpful. Trace the front-end handling for the special root directory and project loading; done means the folder appears normally and renaming a populated folder to root no longer crashes the front end.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.