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

Create a new project based on a dataset #1604

Closed
ciyer opened this issue Dec 9, 2021 · 2 comments · Fixed by #1703
Closed

Create a new project based on a dataset #1604

ciyer opened this issue Dec 9, 2021 · 2 comments · Fixed by #1703
Assignees

Comments

@ciyer
Copy link
Contributor

ciyer commented Dec 9, 2021

Motivation

It is possible to add a dataset to a project, it would be nice to add an option to create a new project and add the dataset.

Proposal

The add button, which currently opens a popup, should change. It should open a new page that lets the user either pick an existing project or create a new project, using the new project form.

image

If a new project is created, that should be the first step, the second step is to add the dataset to the project.

  • We may want to show some more information about the dataset than just the title in this new form.

Context

@ciyer
Copy link
Contributor Author

ciyer commented Dec 9, 2021

This is related to #1313, but not exactly the same.

@lorenzo-cavazzi
Copy link
Member

The AddDataset button currently uses the FormGenerator for the Autosuggest element.
The logic is a bit overcomplicated since we are not taking advantage of the draft (it's a single value for selecting the target project).
It would make sense to remove the FormGenerator login and to add the Autosuggest element directly there.

We should refine the whole logic by adding the following steps:

  • Verify that the projects list is available before allowing the users to interact with the Autosuggest (use the fetched/fetching variables for member projects).
  • Verify the status of the project containing the dataset:
    • It should exist in GitLab (it may not be the case! datasets are still there even when the underlying project is gone)
    • It should have a supported project metadata version
  • Verify the status of the target project
    • It should have the very same metadata version of the origin project
  • OPTIONAL: create a separate GraphQL query to get the member projects with relative permissions, and remove the permissions from the current one. Invoke the new one (with permissions) only when loading the AddDataset component. This would improve the performance quite a bit, since getting the permissions is time-consuming and not necessary anywhere else.

@andre-code andre-code self-assigned this Jan 27, 2022
andre-code added a commit that referenced this issue Feb 10, 2022
…erator (#1604) (#1682)


feat(client): Add validation when importing dataset in an existing project
Adding loading animation if the project list is not ready
Validation when the dataset project does not exist
Validation if the version of the dataset project metadata is not supported
Validation if the version of the dataset project metadata and the selected project metadata is not the same
andre-code added a commit that referenced this issue Feb 18, 2022
* feat(client): Add separate page for add dataset to project, include button lo select between existing project and new project

* tests(client): Add dataset view tests
ciyer pushed a commit that referenced this issue Feb 18, 2022
* feat(client): Add separate page for add dataset to project, include button lo select between existing project and new project

* tests(client): Add dataset view tests
andre-code added a commit that referenced this issue Mar 8, 2022
Co-authored-by: Chandrasekhar Ramakrishnan <ciyer@users.noreply.github.com>
andre-code added a commit that referenced this issue Mar 14, 2022
Co-authored-by: Chandrasekhar Ramakrishnan <cramakri@ethz.ch>
Fix #1604
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants