tinacms: Provide visual feedback when forms fail to save

Description

The form UI provides no indicator when saving fails.

Steps to reproduce

  1. Go to a Gatsby site that uses Tina + Markdown
  2. git remote remove origin
  3. Start the dev server
  4. Edit some content in the form
  5. Press save

Expected result

Some kind of UI notification

Actual result

Looks like the form saves, but it didn’t

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 18 (13 by maintainers)

Most upvoted comments

I tracked down my issue, I didn’t have a remote named origin. I created a Feature Request here about supporting that in the future: https://github.com/tinacms/tinacms/issues/1199

Also, oddly when I did change my remote’s name to origin then hit save in TinaCMS it committed everything I’d tried to save throughout the day, with the correct commit timestamps. image

Actually I hadn’t even read that far, just saw there was some structured json in the error response. But it’s only

{
  error: "Git Operation failed: Check the logs for more details",
  status: "failure"
}

And HTTP412, precondition failed. So writing that to the console wouldn’t necessarily have been that helpful anyway. I’m still tracking down what the actual bug is.

Yeah, I think a toast popup would be pretty cool. Just slide it up from the bottom of the page. The color would be whatever the main theme color is.

tinacms-alert

This would be the error state

tinacms-alert-error