BoraxTheClean / adaptable-antelopes

Code Jam 2021 adaptable antelopes team
MIT License
1 stars 0 forks source link

Add bad file extension error message #40

Closed ghost closed 3 years ago

ghost commented 3 years ago

ntdkhiem and my attempt at blocking the user from opening forbidden file extensions. Currently sends an error message popup that sends user back to the text editing area; would be better to remain in scroll menu.

ntdkhiem commented 3 years ago

We should finish up the remaining tasks before actually merge this.

BoraxTheClean commented 3 years ago

We should finish up the remaining tasks before actually merge this.

Which Issues is this blocked by?

Long lived feature branches are kind of an anti-pattern. So we should be prioritizing merging over waiting whenever possible.

ntdkhiem commented 3 years ago

@BoraxTheClean , we're done. Could you take a look?

ghost commented 3 years ago

We completed the three features from the original issue:

  1. Open the app in a directory called .thought_box if it exists, creating it if not.
  2. Disable the .. button in the scrollbar menu in .thought_box itself to restrict the app to that directory and its children.
  3. Prevent opening files with extensions other than .txt or .md and generate an error message if the user attempts it.

I noted two issues to fix:

  1. The error message for loading a disallowed extension moves focus to the editing area from the scroll menu, instead of staying there.
  2. The .. button doesn't appear for empty directories.