Skip to content

Conversation

@n1LS
Copy link
Contributor

@n1LS n1LS commented Dec 4, 2025

Implements Add the ability to delete projects #343

  • In the Load Project view, EDIT + ENTER brings up a yes/no message box, asking Delete "ProjectName"?
  • Adds a generic DeleteProjectfunction to the PersistencyService (also called from PurgeUnnamedProject() now)
  • Fixes a bug in FatSd that prevents directories from being deleted (the "." and ".." entries are counted as files rendering every directory not empty)

@n1LS n1LS force-pushed the 343-delete-project branch from 91a2765 to 3b7a8c5 Compare December 4, 2025 09:46
@democloid
Copy link
Collaborator

a Hotkey for delete is fine for now (and could be kept for power users) but we should implement a button for the different options as we have in import and sample pool "Load" and "Delete". Can be done as part of this PR or a separate one, but should be done before the next release where this goes in.

EDIT+ENTER as delete seems appropriate as it is "clear" for fields and other things.

@n1LS
Copy link
Contributor Author

n1LS commented Dec 4, 2025

@democloid Agreed. I'll mirror that behavior here.

@maks
Copy link
Collaborator

maks commented Dec 4, 2025

@n1LS I'll just chime in to say its only a small addition so it would be good to implement the Delete onscreen button as part of this PR.

@maks
Copy link
Collaborator

maks commented Dec 5, 2025

I tested on pico and it works well 👍🏻
On Advance it doesn't work, but I can fix that in a follow up PR once this is merged.
@n1LS once you get a chance to add the button UI this should be good to merge 👍🏻

@n1LS
Copy link
Contributor Author

n1LS commented Dec 5, 2025

@maks: Regarding the issue on Adv: Would that have been anything I could have tested for?

Changes from the last commit:

  • adds LOAD and DELETE tabs
  • adds a check to delete/load the project depending on the selected entry
  • moves the loading-logic out of ProcessButtonMask
  • fixes the wrong focus after deleting the last project in the list
  • adds range checking to prevent issues when no projects are present

Copy link
Collaborator

@democloid democloid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from the code point of view, haven't tested it. If you're ok with it after testing @maks then we are good

Copy link
Collaborator

@democloid democloid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works well, even worked in Advance but some comments on the code and another thing we think should be fixed.

When we delete a project, we are allowed to delete the current working project, and it works. However, if we cancel loading and just go back, we are left in a bad state, cannot save again for example. We should not allow to delete the current project.

Before this goes into next release, we should round this up with some way to delete a project that doesn't involve going to "load" in order to delete something. Maybe instead of a load button we have a file browser access button from where we load and delete, maybe save/rename could be there too. TBD

@n1LS
Copy link
Contributor Author

n1LS commented Dec 8, 2025

Explorer view for the main features is a useful addition. I would not recommend removing the top level save button though. Saving should be as easy and quickly accessible as possible. On the project screen we'd need

BROWSE | SAVE

with the Browser having the tabs at the bottom for LOAD | SAVE | DELETE | RENAME

@maks
Copy link
Collaborator

maks commented Dec 10, 2025

Explorer view for the main features is a useful addition. I would not recommend removing the top level save button though. Saving should be as easy and quickly accessible as possible. On the project screen we'd need

BROWSE | SAVE

with the Browser having the tabs at the bottom for LOAD | SAVE | DELETE | RENAME

yes I think @democloid meant add save to the browser, not move it there 👍🏻
also not we don't want to allow rename as well as delete of the current project. (Re)Loading the current project though is fine however and is infact needed due to the autosave functionality.

@n1LS
Copy link
Contributor Author

n1LS commented Dec 16, 2025

Here's an update of the functionality as implemented currently:

  • Load Button on the Project screen is now Browse
  • Load Project becomes Browse Projects:
  • Has the buttons Load Save As Delete
  • Save As changing to Save when the current project is selected
  • Adds a scrollbar when there are more projects than fit the screen
  • Highlights the current project with an asterisk
  • Current project cannot be deleted
  • Adds MessageBoxes whenever something destructive happens (Save As, Delete)

Ideally it should get the toast message from #1139 to show the success of saving (and maybe deleting).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants