-
Notifications
You must be signed in to change notification settings - Fork 2
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
display import modal #3
Conversation
<p class="apos-import__description"> | ||
{{ $t(descriptionStart) }} | ||
<a | ||
href="https://v3.docs.apostrophecms.org/" | ||
target="_blank" | ||
>{{ $t(descriptionLink) }}</a> | ||
{{ $t(descriptionEnd) }} | ||
</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PRO-4272 As an editor, I can see the import UI modal
As an editor, I can click on the import buttons available from the pages manager menu as well as from the pieces manager menu: https://www.sketch.com/s/fbfcda4a-08a4-4c8d-ab88-fdad7532217e/a/YZGrpyE When I click on these buttons, I must see an import modal being opened: https://www.sketch.com/s/fbfcda4a-08a4-4c8d-ab88-fdad7532217e/a/w5Lj7Q9 When I click on the drag and drop area I can see my files browser being opened, I also can drag and drop my file directly into the area. Once done, it must look like this: Limited to one file for now (since we won't manage big data loads), So if dropping another file, it should replace the existing one. For the loading state we will use the notification bar that is already used in Since it will be done in your import process directly since it's about wrapping you method with the ℹ️ the initial modal exists almost like in the designs in the module Acceptance Criteria
|
2764ebc
to
e46df1b
Compare
this.modal.showModal = false; | ||
}, | ||
async runImport () { | ||
// try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can leave it, it'll be implemented soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just few questions.
i18n/en.json
Outdated
"exportModalNoRelatedTypes": "No Related Types" | ||
"exportModalNoRelatedTypes": "No Related Types", | ||
"import": "Import", | ||
"importModalDescription": "Importing content requires a zip file. See our <a href=\"https://v3.docs.apostrophecms.org/\" target=\"_blank\">guide to importing content</a> in Apostrophe.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it will redirect to the proper doc later that doesn't exist already?
We might create a ticket for that in order to not forget , wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I'll a note to the existing ticket that's related to writing the doc about sharing docs across sites
i18n/en.json
Outdated
"exportModalNoRelatedTypes": "No Related Types", | ||
"import": "Import", | ||
"importModalDescription": "Importing content requires a zip file. See our <a href=\"https://v3.docs.apostrophecms.org/\" target=\"_blank\">guide to importing content</a> in Apostrophe.", | ||
"importType": "Import {{ type }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It matches the designs, just a note, the same route will be called whatever document or page is imported.
So it might be clearer to say, Import Documents
. We can ask @stuartromanek maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, as I understand the tech design and the tickets, when we import from a piece manager modal, we expect the zip to contain only the pieces of that type (+ related docs and attachments).
Same for pages, what's imported from the page manager should be pages... As I understand it.
I might be wrong though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
improve: '@apostrophecms/page', | ||
|
||
utilityOperations (self) { | ||
if (self.options.import === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the ticket, the option name is shareDocsDisableImport
. Not sure it's a good one since he module is called import-export
but we might check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's why Anthony has changed it to export
.
I did the same with import
so we can disable the export and not the import, and vice versa.
We could still change the name later I think.
Summary
Display the 3-dot menu with the
Import
item on page and docs manager.Clicking on this item display the import modal.
For now, the modal does not actually import selected zip files.
What are the specific steps to test this change?
use(now onpro-4272-import-modal
branch of apostrophe.main
)setting
import: false
on the page module, on project side, should remove the 3-dots menusame for the pieces, setting it to articles for instance should hide the menu, only for articles manager modal.
What kind of change does this PR introduce?
(Check at least one)
Make sure the PR fulfills these requirements:
If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.
Other information: