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

GT-1968 - Adding new async publish feature for single and bulk. #707

Merged
merged 8 commits into from
Mar 27, 2024

Conversation

dr-bizz
Copy link
Contributor

@dr-bizz dr-bizz commented Mar 27, 2024

Description

Added new async publish API endpoint to single and bulk calls. I've also updated the "Bulk actions" modal by allowing bulk create drafts and bulk publish drafts.

On single publish

  • We have changed it to one button which either creates the Draft or publishes the draft.
  • If Create draft, this works as it previously did.
  • If publish a draft, we hit the new publish endpoint and watch for changes every 5 seconds. We also show the publishing errors if there are any.

Bulk:

  • I updated how we're sending calls to the API to call promises, so we can check if any errors happen to any calls.
  • Bulk drafts are the same apart from using the new promises functionality.
  • I also updated the UI and messaging.
  • Bulk publish, for each publish we hit the publish endpoint and watch for errors and publishing errors. If any we report them to the user. We then watch to ensure the languages are published. When they are, we notify the user. If there are publish errors, we also notify the user.
  • After any bulk action, we don't close out the modal, but we now update the languages.

Test:

  • Need to test publishing errors (I haven't had any errors as of yet)
  • I also need to write the tests for this functionality.
  • Tests aren't currently working due to a TS error.

I'm going to be out until Jan 8th from today, so I wanted this PR to be up for you to review. However, since I did it in a bit of a rush, I hope there aren't many errors, but there might be some.

@dr-bizz
Copy link
Contributor Author

dr-bizz commented Mar 27, 2024

This PR is an exact copy of PR #700.

Copy link

codecov bot commented Mar 27, 2024

Codecov Report

Attention: Patch coverage is 51.26582% with 77 lines in your changes are missing coverage. Please review.

Project coverage is 65.77%. Comparing base (854a52f) to head (a4475ec).
Report is 12 commits behind head on master.

Files Patch % Lines
...ft-generator/multiple-draft-generator.component.ts 39.09% 61 Missing and 6 partials ⚠️
...pp/components/translation/translation.component.ts 73.68% 9 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #707      +/-   ##
==========================================
- Coverage   65.94%   65.77%   -0.18%     
==========================================
  Files          59       60       +1     
  Lines        1436     1607     +171     
  Branches      102      133      +31     
==========================================
+ Hits          947     1057     +110     
- Misses        475      524      +49     
- Partials       14       26      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dr-bizz dr-bizz merged commit de55548 into master Mar 27, 2024
8 checks passed
@dr-bizz dr-bizz deleted the GT-1968-update-publishing-status branch March 27, 2024 20:48
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.

1 participant