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

Pro 4260 export modal #4

Merged
merged 8 commits into from
Aug 10, 2023
Merged

Pro 4260 export modal #4

merged 8 commits into from
Aug 10, 2023

Conversation

falkodev
Copy link
Contributor

https://linear.app/apostrophecms/issue/PRO-4260/as-an-editor-a-download-modal-is-opened-when-i-click-on-the-download

Summary

As an editor, an export modal is opened when I click on the export button.

What are the specific steps to test this change?

  • When clicking on the Download button in contextual menu, this modal opens.
  • When clicking on the Download button in batch operation, this modal opens.
  • When clicking on the include related documents switcher I see a new section containing the types of the related docs and how many of each one might be exported if checked.
  • The modal must show the name of the type of document that the user will export.
  • The modal must request the relate method from the schema module to get related docs and show checkboxes as shown in the designs (without the amount for each one).

@linear
Copy link

linear bot commented Aug 10, 2023

PRO-4260 As an editor, a Download modal is opened when I click on the Download button.

Based on designs, we need to create a new modal for downloading documents.

This modal is made up of several parts:

  • Choosing the type of export and related docs to download

image.png

Since for this iteration we will have only one document format (ZIP), We can hide the select but just keep the line to inform the user it will export a zip file.

It might be a good idea to add some info to the user saying that this is the official format to share documents, related and attachments between sites (You might need to sync with Stu for that).

Since the same modal will be used for one document or multiple ones with batch operations, it might be nice to make the vue component taking and array of IDs all the time (with one ID inside or several).

image.png

Links to Sketch

https://www.sketch.com/s/fbfcda4a-08a4-4c8d-ab88-fdad7532217e/v/2ny7AA/p/9B4A1FB5-E91A-4812-83A0-7D053AFBBA02/canvas?posX=-3202.734111451141&posY=-1510.8616825878742&zoom=0.2593996822834015

Backend

⚠️ It might be too heavy to get the actual related documents if we batch a large amount of documents. So we might need to slightly modify the design, instead we might just enumerate the types they can be related to, which can be determined recursively at “modules ready” time by recursing over the types themselves and their array, object and allowed widget schemas (not ever stepping more than once through relationships though).

A route can be created to perform this action.

As said above, if we do that the design will slightly change since we won't have the amount of docs for each type anymore.

Acceptance Criteria

  • When clicking on the Download button in contextual menu, this modal opens.
  • When clicking on the Download button in batch operation, this modal opens.
  • When clicking on the include related documents switcher I see a new section containing the types of the related docs and how many of each one might be exported if checked.
  • The modal must show the name of the type of document that the user will export.
  • The modal must request the relate method from the schema module to get related docs and show checkboxes as shown in the designs (without the amount for each one).

@falkodev falkodev self-assigned this Aug 10, 2023
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
i18n/en.json Outdated Show resolved Hide resolved
ui/apos/components/AposExportModal.vue Outdated Show resolved Hide resolved
ui/apos/components/AposExportModal.vue Outdated Show resolved Hide resolved
@falkodev falkodev merged commit 6211403 into main Aug 10, 2023
9 checks passed
@falkodev falkodev deleted the pro-4260-export-modal branch August 10, 2023 16:31
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 this pull request may close these issues.

2 participants