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

ME: fix a bug when clicking "back" after creating a record would cause an error #975

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

jahow
Copy link
Collaborator

@jahow jahow commented Aug 27, 2024

Description

This PR fixes a bug where navigating back after creating a record would take the user back to the /create url, which tried creating another record and caused an error.

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

Copy link
Contributor

Affected libs: ``,
Affected apps: metadata-editor,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

Sorry, something went wrong.

@coveralls
Copy link

Coverage Status

coverage: 88.319% (+4.6%) from 83.721%
when pulling 4a4ec1d on me-fix-create-back-error
into e7ff1d2 on main.

Copy link
Contributor

github-actions bot commented Aug 27, 2024

📷 Screenshots are here!

Copy link
Collaborator

@rcaplier rcaplier left a comment

Choose a reason for hiding this comment

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

Let's go !

Copy link
Collaborator

@Angi-Kinas Angi-Kinas left a comment

Choose a reason for hiding this comment

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

Thanks @jahow !

Code looks good and I tested it as well with the back button of the browser and it works.
However when using the button on the form "Come back later" it will always redirect me to /catalog/search even if I started from "my drafts", but that's another topic.

@jahow
Copy link
Collaborator Author

jahow commented Aug 27, 2024

Thanks @jahow !

Code looks good and I tested it as well with the back button of the browser and it works. However when using the button on the form "Come back later" it will always redirect me to /catalog/search even if I started from "my drafts", but that's another topic.

Good point, I think we discussed this already but couldn't find a good solution; let's keep this in mind and see if the users have an opinion :)

@jahow jahow merged commit 10a614b into main Aug 27, 2024
14 checks passed
@jahow jahow deleted the me-fix-create-back-error branch August 27, 2024 12:26
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.

None yet

4 participants