-
Notifications
You must be signed in to change notification settings - Fork 76
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
Copy template project #4725
Comments
Translations will need to be copied for each resource in steps 1–5. |
Is there a reason this should be done in javascript, rather than having Panoptes copy the database records in Postgres and making that available as an API call (or set of API calls)? If Panoptes takes care of copying the records, then the front-end really just boils down to deciding what the UI should be for project owners. A big button saying 'Clone project' that triggers some simple questions like what name to give the new project, and which linked resources to include with the copy? |
Worth remembering that project display name is localised, so 'New Project Name' might need translations too. Looking at Galaxy Zoo in the project builder, I think translators are mostly leaving the project name in its original language. |
Sorry, one more question. Why should we do this in PFE and not in the lab app? My impression was that the project builder was being gradually migrated over to the lab app anyway. |
Fundamentally, this is creating "copy project template" functionality and not a true project clone. This has to do with the funding left on the grant, the complexity of deep cloning projects, and our existing functionality. Workflows are copied in PFE in this exact way. Projects will get a flag somewhere to indicate that they're "copyable" or that they're "templates" or similar and the button will only exist if they are. This could be done on the API side. The API would use the same logic as the front end to create new objects and copy only the relevant data from the existing resources before saving. The number of API calls that this functionality would introduce is not worth worrying about, as this would be used infrequently. Besides, there's lower hanging fruit for that kind of optimization in the lab (see #4720). No one seems to feel particularly strongly about it one way or the other, so @mcbouslog and I talked it out earlier and decided to go with this method. If you (or @camallen) actually do, then let us know why and we can go from there. |
Hi all - please best to pause on the comments in this thread and wait for the zoom call that you'll have early next week that Mark is setting up. It'll be easiest/most clear to talk directly and hear the pros and cons on both sides and make a decision that way. Thanks! @mcbouslog , please post here when you have the time set. |
For copying resources in the front-end, how about updating the client's Resource API so we can do something like: let newResource;
existingResource
.copy()
.then( resource => newResource = resource);
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Reposting link to zooniverse/rfc#34. |
@mcbouslog will this require changes to zooniverse/json-api-client to handle posting to the |
I think it would. Though unless there's an immediate need, this'll likely get added to the new panoptes-js/frontend-monorepo which has it's own related issue - zooniverse/front-end-monorepo#72. So I'll close this for now, with the RFC and FEM issue taking precedent, but we can re-open this if need be. |
MVP for https://github.com/zooniverse/rfc/issues/34.
Create client side copy template functionality, similar to workflow copy, limited to:
Initially, we can manually set a new property in a project's configuration to note it can be copied, and only then show the option to copy the project.
Happy to list aspects punting on for future iterations and temporary work-arounds if useful.
Mentioning @zwolf, @camallen, @eatyourgreens and @trouille. Please feel free to edit this initial comment as you see fit for clarity.
The text was updated successfully, but these errors were encountered: