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

WIP Copy and edit forms inside "Edit saved form" #886

Closed
wants to merge 5 commits into from

Conversation

grzesiek2010
Copy link
Member

No description provided.

@grzesiek2010
Copy link
Member Author

grzesiek2010 commented Apr 13, 2017

@yanokwa @lognaturel @nribeka @rafres
Please look at this proposal. It works but i'm not sure if it's good solution. @yanokwa you don't like copy/pasta instance file. Do you?

What do you think?

Maybe I have one another idea just let me now what you think about this current and let me rethink other possible solutions.

@lognaturel
Copy link
Member

This is looking really nice, @grzesiek2010! Sorry about the delay getting back to you on it.

Here are a few things I thought about looking at it:

  • I think long-pressing on forms is a fine interface but it's not very discoverable. Any other ideas? Or maybe we start with this for now since it's likely the UI overhaul will involve adding menu options for individual instances.
  • The media files have the same names, they're just in a different folder. I think that's ok but we should think through it.
  • This general approach does make sure that instanceIDs are unique which is critically important.
  • Only forms that can be currently edited can be duplicated. I think it could be useful to allow copies of sent forms (that aren't encrypted or deleted).

It would be helpful to get a quick summary of your other ideas for approaching this @grzesiek2010 to make sure we're not missing anything. I think the copy pasta 🍝 is inevitable since the whole point is to copy!

@yanokwa @nribeka your thoughts?

@grzesiek2010
Copy link
Member Author

grzesiek2010 commented May 17, 2017

@lognaturel
If you ask me about my second idea it was something like:

  1. Load original form.
  2. Collect all answers from the whole form
  3. Create new instance
  4. Iterate through collected prompts and save them

I tested this approach and first I thought it's better but I ran into some disadvantages like:
-it requires more code
-it can take more time as we need to load original form
-it's a problematic when you use a form with repeats because then you can't just save original answers - you would need to create all repeats again

so I decided to continue my first approach and here is the result. It's not tested well but you can look at it and let me know what you think.
To answer your last comments:

I think long-pressing on forms is a fine interface but it's not very discoverable. Any other ideas?

I've decided to keep long-pressing. I don't have any better idea now and I think we can add something after: #464 then we can an icon for example

The media files have the same names, they're just in a different folder. I think that's ok but we should think through it

It's fixed now.

Only forms that can be currently edited can be duplicated. I think it could be useful to allow copies of sent forms (that aren't encrypted or deleted)

It's fixed as well.

@getodk-bot
Copy link
Member

ERROR: This issue is in progress, but has no assignee.

@getodk-bot
Copy link
Member

Heads up @grzesiek2010, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the upstream/master branch and resolve your pull request's merge conflicts accordingly.

@getodk-bot
Copy link
Member

ERROR: This issue is in progress, but has no assignee.

1 similar comment
@getodk-bot
Copy link
Member

ERROR: This issue is in progress, but has no assignee.

@lognaturel
Copy link
Member

@grzesiek2010 thanks for your hard work on this. This general concept of reusing values is a really powerful one and we want to make sure that we get the feature right. There was some conversation at https://forum.opendatakit.org/t/remembering-previously-entered-value-in-odk-collect/9116/13 and no clear decisions made.

I hate to do this but I'm going to close the PR for now. Please keep the branch. I have also saved it both locally and on my remote. Hopefully we can fully specify the feature soon and bring this back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants