godotengine / godot-asset-library

PHP frontend for Godot Engine's asset library
https://godotengine.org/asset-library
MIT License
294 stars 98 forks source link

Preventing empty edits #101

Closed akien-mga closed 6 years ago

akien-mga commented 7 years ago

See this edit: https://godotengine.org/asset-library/asset/edit/179

The diff shows no modification, so the edit should not have been accepted. If there are actual modifications, then it's a bug in the diff function.

akien-mga commented 7 years ago

The edit seems indeed empty: image

If it's not just about having to prevent empty edits, might it be related to the previews?

bojidar-bg commented 7 years ago

The problem is -- we can't prevent them, at least not with the current model. Here is a sample set of steps that would generate one, and we won't be able to cancel the change:

  1. User creates edit, changing some stuff
  2. User revises edit, setting everything to past value
  3. We can't cancel 1, as there is already an edit, and we can't cancel 2, since it would be stupid to disallow it.
akien-mga commented 7 years ago

Well I'm fine with the above scenario being possible. But I don't want:

  1. User creates edit, changes nothing.
  2. User validates empty edit, it's created, we need to moderate it.