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

Adding new async publish feature for single and bulk. #700

Merged
merged 8 commits into from
Mar 27, 2024

Conversation

dr-bizz
Copy link
Contributor

@dr-bizz dr-bizz commented Dec 22, 2023

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 dr-bizz requested a review from frett December 22, 2023 13:54
Disabling buttons during active requests
Copy link

I see you added the "On Staging" label, I'll get this merged to the staging branch!

…w calling resource instead of allResources when fetching publish status
@dr-bizz dr-bizz requested a review from frett January 9, 2024 21:27
@dr-bizz
Copy link
Contributor Author

dr-bizz commented Jan 9, 2024

I'm working on the CodeCov test

Copy link

codecov bot commented Jan 10, 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 10 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     #700      +/-   ##
==========================================
- 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 2a80955 into master Mar 27, 2024
4 checks passed
@dr-bizz dr-bizz deleted the GT-1968-update-publishing-status branch March 27, 2024 19:33
dr-bizz added a commit that referenced this pull request Mar 27, 2024
dr-bizz added a commit that referenced this pull request Mar 27, 2024
@dr-bizz dr-bizz restored the GT-1968-update-publishing-status branch March 27, 2024 20:39
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants