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

MMT-3953: Fix for User is encountering latency issue with Save and Publish #1333

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

cgokey
Copy link
Collaborator

@cgokey cgokey commented Dec 13, 2024

Overview

What is the feature?

The "Save and Publish" menu option is causing an issue where the user is encountering a latency error mesage after clicking this option. This happens every time.

What is the Solution?

When the save and publish updates the draft, there is a use effect that verifies that the revision id saved matches what is in the url after the save. The issue was that the URL was not being updated in between the time the save happened and the publish navigating away from the page. The fix was simply to include the navigate to update the page revision id while publishing.

What areas of the application does this impact?

Metadata Form menu navigate menu options.

Testing

Create a draft, fill in all the required fields, click Save. The click Save and Publish. The draft should now properly redirect to the preview page without any errors.

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.69%. Comparing base (347c892) to head (18f018a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1333   +/-   ##
=======================================
  Coverage   97.69%   97.69%           
=======================================
  Files         365      365           
  Lines        5758     5758           
  Branches     1201     1212   +11     
=======================================
  Hits         5625     5625           
  Misses        132      132           
  Partials        1        1           

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

@cgokey cgokey merged commit 27dcb05 into main Dec 13, 2024
5 of 7 checks passed
@cgokey cgokey deleted the MMT-3953 branch December 13, 2024 21:29
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.

4 participants