Workbench icon indicating copy to clipboard operation
Workbench copied to clipboard

Save and open projects

Open sonnyp opened this issue 3 years ago • 1 comments

It should be possible to save and open a project to share them or simply resume working on them.

Maybe .workbench

Would be awesome to support versioning (ie save the last X versions of the files) for undo

sonnyp avatar Feb 02 '22 21:02 sonnyp

Added support for save on change but not projects - deprio

sonnyp avatar Feb 27 '22 23:02 sonnyp

Hey, I'm big fan of your application and I'd like to help with this issue, because the lack of project config makes it hard to use it for me (and presumably for lots of people).

My idea is to import project files from toml/yaml config that instead of importing each file separately. I hope I don't have to explain to you how bad and annoying it is.

It would be also really cool to some some kind of tree view, but I'm not sure if that's in like with project goals.

krlade avatar Feb 27 '23 13:02 krlade

An example toml config would like like that:

authors = ["Me"]
name = "Design Playground"

[project]
	source = "widget.js"
	stylesheet = "style.css"
	template = "widget.ui"

[[subprojects]]
	authors = ["Me", "My cat"]
	name = "MyCoolWidget"
	path = "my_cool_widget" #or path = "./my_cool_widget"
	source = "cool_widget.rs"
	stylesheet = "index.css"
	template = "cool-widget.blp"

Let me know what do you think about it

krlade avatar Feb 27 '23 13:02 krlade

Glad you like it.

There will be no such things as subprojects, just a flat list of projects. Tree view is out of scope for now.

I'm not decided yet what the format will be like, but the "on disk" format should map well to a "import/export" single file format with the following requirements

  • Supports an undetermined number of files
  • Supports binary files
  • Can be open/used without Workbench
  • Shared format with Library entries

For import/export, probably a zip or gresource. http://textbundle.org/ is interesting too.

In any case we need to solve this too:

Opening a library entry shouldn't overwrite the current project

We need some kind of project list in Workbench. Probably merged with the Library. So you can switch between Library entries and projects. Later, we can add multi-window support, similar to Builder.


If you want to help - I think a good starting point is to add support for opening an arbitrary Library entry folder with Workbench and save there. Check the current format https://github.com/sonnyp/Workbench/tree/main/src/Library/demos . We can evolve for the format later.

I will talk to Tobias about the UI/UX for project lists in Workbench.

sonnyp avatar Feb 27 '23 20:02 sonnyp

Thanks for your response. Looks like it's too complicated for the newcomer, so according to your suggestion I'll start with something smaller. I've just discovered matrix room, so we can continue the discussion over there

krlade avatar Feb 27 '23 22:02 krlade

Ok in the end each project will be a folder on the user computer.

So the list of projects will simply be the folders in the file manager.

We will need to support multi-window.

sonnyp avatar Mar 16 '23 22:03 sonnyp

I think zip files with a custom extension would be better for this. I see two main advantages here:

  1. It's easier to share since it's just a single file
  2. you can compress it to save on duplicated code when dealing with multiple versions.

skutter-de avatar May 15 '23 16:05 skutter-de