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

Custom data exports UI implementation #2963

Closed
jnm opened this issue Jan 19, 2021 · 1 comment
Closed

Custom data exports UI implementation #2963

jnm opened this issue Jan 19, 2021 · 1 comment
Assignees
Labels
enhancement Ideas, improvements and features UI & UX User interface problems and improvements

Comments

@jnm
Copy link
Member

jnm commented Jan 19, 2021

Since #2881 is busy enough with UX discussion, I've made this issue just to cover the implementation of the designs in front-end code. Feel free to edit this description directly.

The to-do list seems to be:

  1. Add all the new export settings :)
    1. It's okay for "Custom selection export" to pull from the latest version of the form only (and be mutually exclusive with "Include data from all # versions")
    2. "Custom selection export" choices should follow "Value and header format" ("Table display options" already does this 😃)
    3. "Export select_multiple responses" should send an option called multiple_select (alongside others like hierarchy_in_labels) with the following values:
      "both": add the summary column and a column for each value
      "summary": only the summary column
      "details": only the details column
      
      (Support for this already exists in formpack, but the KPI back end will need a change to pass the option through)
  2. When loading the export screen, please send a GET to the new endpoint /api/v2/assets/<asset uid>/export-settings and use the first result (this will be the most recent) to populate the export settings. If there are no results, then use hard-coded defaults.
  3. The results in /api/v2/assets/<asset uid>/export-settings will all have UIDs assigned by the back end.
  4. We always want to save the last-used export settings, even if "Save selection as custom export" is unchecked. In that case send name as an empty string. This both lets us know which set of settings was used most recently, and it also saves people time by keeping their last-used settings without the need to provide a name.
  5. If this is a new set of settings, meaning that either no saved settings were loaded or the "Name your custom export" field was changed, then POST to /api/v2/assets/<asset uid>/export-settings when the "EXPORT" button is clicked.
  6. Otherwise, please PATCH to /api/v2/assets/<asset uid>/export-settings/<export settings uid> when the "EXPORT" button is clicked, even if no settings were changed and "Save selection as custom export" is unchecked.
  7. Basically, we'll always have a double-request sent when "EXPORT" is clicked: one to POST or PATCH the settings, and another to create the actual export task (as is already done by the existing export code).

Mock ups from #2881: https://www.figma.com/proto/AzJPYVjf2CDBk1PGLv62sC/Project-Downloads?node-id=9%3A3&viewport=428%2C870%2C0.27639657258987427&scaling=min-zoom

@jnm
Copy link
Member Author

jnm commented Apr 1, 2021

Closed by #3012

@jnm jnm closed this as completed Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas, improvements and features UI & UX User interface problems and improvements
Projects
None yet
Development

No branches or pull requests

2 participants