Skip to content

Add edit data doc SaveBar error handling - #48465

Merged
TurnerRiley merged 3 commits into
stagingfrom
edit-data-docs-add-save-error-handling
Oct 6, 2022
Merged

Add edit data doc SaveBar error handling#48465
TurnerRiley merged 3 commits into
stagingfrom
edit-data-docs-add-save-error-handling

Conversation

@TurnerRiley

@TurnerRiley TurnerRiley commented Oct 5, 2022

Copy link
Copy Markdown
Contributor

After merging the Add edit DataDoc frontend PR, @annaxuphoto spotted an issue relating to it in the latest test build:
savebarerror

The SaveBar component was expecting an error prop passed in for error handling that wasn't there. This PR adds that in by mirroring the behavior of a similar function in ReferenceGuideEditor.jsx.

Links

Test build with error: here
Edit data docs frontend PR: here

Testing story

Local testing to ensure thrown errors were caught and passed to SaveBar (such as changing the url in the ajax request to a non-existent one).

After ensuring the save button can't access the URL, the error thrown is displayed in the SaveBar (desired behavior):
ExpectedSaveBarErrorHandling

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@TurnerRiley
TurnerRiley requested a review from a team October 5, 2022 20:10

@davidsbailey davidsbailey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice fix! it would be great if you could include a screenshot or short screen recording of the save error codepath in action. were you able to trigger the failure path end to end? one way to do this is to go whatever URL the save button is accessing and block it:
Screen Shot 2022-10-05 at 1 15 14 PM

pro tip: remember to unblock after! :-D

@TurnerRiley
TurnerRiley merged commit a209541 into staging Oct 6, 2022
@TurnerRiley
TurnerRiley deleted the edit-data-docs-add-save-error-handling branch October 6, 2022 23:31
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