azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
3.65k stars 130 forks source link

feat(dashboard): add basic drag & drop functionality to homescreen #301

Open rpschube opened 3 months ago

rpschube commented 3 months ago

Attempting to add drag and drop functionality to home screen, allowing users to organize their apps however they'd like. I have it working right now, just need to consider how to best handle saving the order so that it persists. LocalStorage is fine for now I guess but eventually it'd be nice to save in the DB via the ProxyRouteConfig object (is there a field in that object I can rely on as a unique key?)

Used FormKit Drag & Drop as it's super freaking lightweight

Partially addresses https://github.com/azukaar/Cosmos-Server/issues/35

Demo

cla-bot[bot] commented 3 months ago

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, add yourself to the .clabot file as contributor, as a way of signing the CLA.

cla-bot[bot] commented 3 months ago

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, add yourself to the .clabot file as contributor, as a way of signing the CLA.

azukaar commented 3 months ago

While I really really appreciate your contributions, I would prefer for us to have a chat about features before trying to implement them, to prevent clashes between the plan and the PR (like it is the case now). Basically I have a different design in mind for the dashboard editing, in a nutshell: having a JSON file in the config/dashboard folder which contains definition for both applications and widgets on the dashboard (with the possibility to create multiple ones, and customize many things like icon positions, groups, backgrounds, and so on). Implementing drag and drop like this before implementing the backbone of the dashboard implementation is not possible. If you'd like to work on the dashboard customization, I'd be more than happy to write a design document for you to start implementing thought, just let me know :)

rpschube commented 3 months ago

@azukaar Totally understandable! Was just browsing through open issues and trying to pick off the list. I would love to work on this feature and am happy to follow your design for it if you have one in mind.

azukaar commented 3 months ago

Great @ryan-schubert ! I'll get in touch shortly, just need to put htings together :)