ferdium-app icon indicating copy to clipboard operation
ferdium-app copied to clipboard

WIP: Add ability to reorder Workspaces using drag and drop

Open SpecialAro opened this issue 3 years ago • 7 comments

Pre-flight Checklist

  1. Please remember that if you are logging a bug for some service that has stopped working or is working incorrectly, please log the bug here
  2. If you are requesting support for a new service in Ferdium, please log it here
  3. Please remember to read the self-help documentation - in case it helps you unblock yourself for issues related to older versions of recipes that were installed on your machine. (These will get automatically upgraded when you upgrade to the newer versions of Ferdium, but to get new recipes between Ferdium releases, this documentation is quite useful.)
  4. Please ensure you've completed all of the following.

Description of Change

Add order ability to Workspaces

Motivation and Context

This is a WIP for adding the ability of order Workspaces in the Workspace Drawer and in the Workspace Settings. The idea is to fix https://github.com/ferdium/ferdium-app/issues/146.

To do:

  • [x] Add order buttons to the Workspace Drawer
  • [ ] Add order functionality to the buttons on the Workspace Drawer (mobx is complaining about this given I'm not using an action for changing the index)
  • [ ] Add order buttons to the Workspace Settings
  • [ ] Add the same functionality to the buttons on Workspace Settings

I think I'm needing some help setting up the actions to reorder workspaces - as it is now, the workspaces are reordered but only until the Ferdium restarts/reloads, which is due to the fact that the "new" order is not being saved in the API. If anyone can help me with that I would really appreciate it :D

Screenshots

(so far... ) image image

Checklist

  • [x] My pull request is properly named
  • [ ] The changes respect the code style of the project (npm run prepare-code)
  • [ ] npm test passes
  • [ ] I tested/previewed my changes locally

Release Notes

SpecialAro avatar Jul 19 '22 15:07 SpecialAro

So to update the order in the API we would need to create/update some endpoints to support that. I'm a little in doubt if we wanna implement that in the current API version or wait for the v2 to be completed and make it fully testable

cino avatar Jul 19 '22 19:07 cino

So to update the order in the API we would need to create/update some endpoints to support that. I'm a little in doubt if we wanna implement that in the current API version or wait for the v2 to be completed and make it fully testable

Maybe we can wait for the V2 to be completed 😁

SpecialAro avatar Jul 19 '22 20:07 SpecialAro

Maybe we can wait for the V2 to be completed 😁

in that case, do we want to hold 6.0.0 release?

vraravam avatar Jul 20 '22 05:07 vraravam

in that case, do we want to hold 6.0.0 release?

I don't think we need to hold back for this PR. We can easily then merge new features in a minor/patch version or so. But if you think it is better to have the internal-server v2 working, maybe we can wait. What do you think?

SpecialAro avatar Jul 20 '22 10:07 SpecialAro

I would love to see this completed!

I think I'm needing some help setting up the actions to reorder workspaces - as it is now, the workspaces are reordered but only until the Ferdium restarts/reloads, which is due to the fact that the "new" order is not being saved in the API. If anyone can help me with that I would really appreciate it :D

I have some notes/thoughts that I've started writing as early thoughts that I may use to attempt to make some changes:

  • The API server and internal server both need to be updated for full support.
  • Services can be re-ordered with ServiceController.reorder, and I suspect that app/Controllers/Http/WorkspaceController.js (in both places) just needs a similar implementation.
  • reorderService function in src/api/server/ServerApi.ts routes to ServiceController.reorder.
  • I am not quite clear on this right now, as there is a ServicesApi but not a WorkspacesApi.

m-roberts avatar Sep 24 '22 20:09 m-roberts

Amazing, would love to see this possibility. The only alternative is deleting and recreating workspaces.

ThinkSalat avatar Feb 05 '23 17:02 ThinkSalat

Any updates here? I can pick it up and finish the implementation.

mpiniarski avatar Jul 29 '24 19:07 mpiniarski