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

add utility operations in page manager #4261

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

ETLaurent
Copy link
Contributor

Summary

apostrophecms/import-export#3 depends on it.

Add the possibility to add utility operation in the page manager.

image

What are the specific steps to test this change?

For example:

  1. Run the website and log in as an admin
  2. Open a piece manager modal and select several pieces
  3. Click the "Archive" button on the top left of the manager and confirm that it should proceed
  4. Check that all pieces have been archived properly

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

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:

@ETLaurent ETLaurent requested a review from boutell August 9, 2023 15:58
@linear
Copy link

linear bot commented Aug 9, 2023

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:

pieces-manager-import.png

https://www.sketch.com/s/fbfcda4a-08a4-4c8d-ab88-fdad7532217e/a/YZGrpyE

pages-manager.png

When I click on these buttons, I must see an import modal being opened:

import-modal.png

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:

import-modal-file.png

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 piece-type-exporter and piece-type-importer.

Since it will be done in your import process directly since it's about wrapping you method with the run from the job module, we'll implement that with the backend.

ℹ️ the initial modal exists almost like in the designs in the module apostrophecms-pro/dataset, you might save some time by taking code from there.

Acceptance Criteria

  • I can see the buttons import in the pages modal and in the pieces modal if there is no option shareDocsDisableImport set to true for the concerned module.
  • When clicking on it I can see the import modal appearing following the given designs.
  • I can load a file in the browser, if I load another one, the first is replaced.

@ETLaurent ETLaurent marked this pull request as ready for review August 9, 2023 15:58
Copy link
Member

@boutell boutell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks solid.

@ETLaurent ETLaurent merged commit 0d626b0 into main Aug 10, 2023
6 checks passed
@ETLaurent ETLaurent deleted the pro-4272-import-modal-utility-operations branch August 10, 2023 06:47
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