bryanyee33 / pe

0 stars 0 forks source link

Import does not allow spaces #8

Open bryanyee33 opened 4 months ago

bryanyee33 commented 4 months ago

image.png

Actual save files may contain spaces (likely to be common), but these are not allowed to be imported. Eg. Students List - CS2030S.json, unnecessarily limiting the filenames.

nus-pe-script commented 4 months ago

Team's Response

We want to cater our application to all operating systems where java can be installed. Note, some Linux systems do not allow whitespaces for filenames.

E.g.

Traditionally, in UNIX-like systems (including early Linux distributions), whitespaces in filenames were not recommended or allowed due to potential issues with command-line tools and scripting. This practice was carried over from the early days of UNIX when filenames were more restricted.

Some older or specialized file systems may still have limitations or restrictions on the characters allowed in filenames, including whitespaces. For example, certain versions of the ext2 file system had restrictions on filenames containing whitespaces.

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: Based on stackexchange and this wikipedia page, spaces are allowed in filenames, even on linux. I'm not sure what ext2 file system you may be referring to, but I could not find any such limitations. Even if they do exist, they are likely to be very obscure, and this is no reason to limit the large majority of users.

The reason they were not recommended is because softwares (such as terminal) may not support spaces in pathnames to load files properly, but in this case the software is this app itself.

By directly modifying the filename in preferences.json, I was able to successfully load a save file with spaces, showing that it is by default supported by the app (and AB3):

image.png image.png

Moreover, the command format uses prefixes, making it easy to allow the app to parse filenames with spaces (similar to addresses with spaces), and fix this issue.

Furthermore, I would like to raise this issue to severity.Medium.

image.png

Majority of academic instructors (especially for non-coding related courses) prefer to use spaces instead of underscores and hyphens in filenames. Even coding instructors such as the ones below by Prof Damith (just an example that everyone can see) prefer to use spaces as do I. Hence, this would cause occasional inconvenience to a large number of users since they are unnecessarily forced to change the way they name files, especially for academic instructors that teach multiple courses and would like to have multiple separate save files.

image.png