You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Add all the new export settings :)
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")
"Custom selection export" choices should follow "Value and header format" ("Table display options" already does this 😃)
"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)
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.
The results in /api/v2/assets/<asset uid>/export-settings will all have UIDs assigned by the back end.
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.
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.
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.
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).
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:
multiple_select
(alongside others likehierarchy_in_labels
) with the following values: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./api/v2/assets/<asset uid>/export-settings
will all have UIDs assigned by the back end.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.POST
to/api/v2/assets/<asset uid>/export-settings
when the "EXPORT" button is clicked.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.POST
orPATCH
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
The text was updated successfully, but these errors were encountered: