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

Clean-up Project API and deprecate Project UI API #2589

Closed
9 tasks done
mbastian opened this issue Aug 29, 2022 · 1 comment · Fixed by #2663
Closed
9 tasks done

Clean-up Project API and deprecate Project UI API #2589

mbastian opened this issue Aug 29, 2022 · 1 comment · Fixed by #2663
Assignees
Milestone

Comments

@mbastian
Copy link
Member

mbastian commented Aug 29, 2022

The Project API is unnecessarily complex for some basic operations like retrieving the list of current workspaces. It forces the client code to use Lookup while this should be reserved for more advances use cases. This could be improved while maintaining the backward compatibility.

Another issue is the need for client code to utilise the ProjectControllerUI in reality, instead of the ProjectController. This class belongs to the DesktopProject module is totally undocumented, creating confusion how to manipulate project from plugins. Creating new projects should be accessible directly from the ProjectAPI module. The UI should be reactive to it.

Finally, in order to prepare the ground for autosave and undo/redo we'll need to have a local project folder where to persist autosaves. Currently, one can associate a file to a Project but that's not sufficient. The idea would be to have a unique folder per project stored in the user directory. The list of user projects would be persisted and would replace the "Recent Projects" feature.

Definition of done

  • - API cleanup
  • - Project has a unique identifier so that we can have a unique folder
  • - ProjectControllerUI is listening to changes in ProjectAPI so that it no longer is stateful.
  • - All saved projects (one with a corresponding file) should be listed in getProjects
  • - Projects have a last modified timestamp so we can easily sort them by last changed
  • - SettingsUpgrader also includes those local project folders
  • - Exclusion of Projects from the MostRecentFilesAPI as no longer needed. We keep it for file imports.
  • - Welcome Screen shows all projects (sorted by last changed). Still shows recent files but not for projects.
  • - Projects that are never saved and Gephi is quitted properly should be cleaned up
@mbastian
Copy link
Member Author

mbastian commented Aug 29, 2022

Some ideas based on reviewing the API

  1. Make it easy to query the list of workspaces in Project (currently done via Lookup only)
  2. Deprecate ProjectInformation and put all of its methods in Project for simplicity
  3. Same for WorkspaceInformation
  4. Same for WorkspaceProvider, put its methods directly in Project
  5. Project SPI contains ProjectPropertiesUI, probably to be removed
  6. Make ProjectMetadata directly accessible from Project
  7. Add WorkspaceMetadata to store workspace description

@mbastian mbastian added this to the 0.10.0 milestone Aug 29, 2022
@mbastian mbastian self-assigned this Aug 31, 2022
@mbastian mbastian moved this to In Progress in Gephi Retreat 2022 Aug 31, 2022
@mbastian mbastian linked a pull request Oct 17, 2022 that will close this issue
8 tasks
Repository owner moved this from In Progress to Done in Gephi Retreat 2022 Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant