Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize new workspace with some example projects #1307

Merged
merged 2 commits into from Mar 20, 2024

Conversation

ubruhin
Copy link
Member

@ubruhin ubruhin commented Feb 15, 2024

So far, new workspaces didn't contain any projects after their initial creation so the Control Panel project tree was completely empty. However, as suggested in #1267 it would be useful to have some example projects available to help new users evaluating LibrePCB. Thus this PR implements this feature in two ways:

Auto-Initialize New Workspaces

The initial idea was actually to provide a way to open example projects, for example through a menu item File -> Open -> Example Project. However, the question was where they will be opened from and if they are read-only or writable. Also the menu option might not be visible and convenient enough for new users to make them actually using this feature.

Now I decided to go with a different approach. When creating a new workspace, just automatically add some example projects in a subdirectory named "Examples" to the workspace. So the projects will immediately be shown in the Control Panel for new users, ready to be opened like normal projects (also writable!). One might argue that not everyone likes to have these example projects, but in the end it's very easy to just delete them and you only need to do this once. Also I remember EAGLE did it the same way and it never felt annoying to me.

The only question left was whether these example projects shall be bundled with the application or downloaded from the internet on demand. Since this feature is not really important (no problem if the download takes some time or even fails), I decided for the on-demand download to avoid bloating the application with example projects. We just should store them at some reliable, persistent URL.

Manually Add Example Projects

To also allow adding the example projects to existing workspaces, the Control Panel contains a new menu item File -> Import -> Add Example Projects which initiates the download and installation of these projects asynchronously, exactly the same way as described above.

Demo

librepcb-example-projects

ToDo

Decide which and how many example projects to install, and make sure to host them at a reliable location.

Closes #1267

@ubruhin ubruhin added enhancement UI / UX User Interface/Experience labels Feb 15, 2024
@ubruhin ubruhin added this to the 1.1.0 milestone Feb 15, 2024
@ubruhin ubruhin self-assigned this Feb 15, 2024
@ubruhin
Copy link
Member Author

ubruhin commented Mar 19, 2024

Created a new repository to store example projects as *.lppz files: https://github.com/LibrePCB/librepcb-example-projects

For now, let's go with my own projects. We can replace them with community-contributed projects at any time later when we get such contributions. Some requirements for contributions are listed in the mentioned repository.

@ubruhin ubruhin marked this pull request as ready for review March 19, 2024 16:28
@ubruhin ubruhin merged commit 7e08917 into master Mar 20, 2024
8 checks passed
@ubruhin ubruhin deleted the 1267-add-example-projects branch March 20, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement UI / UX User Interface/Experience
Development

Successfully merging this pull request may close these issues.

Provide example projects
1 participant