As an editor, I want to be sure that when I “edit” a Schema, but don’t make any actual changes, then no edit to the page is made.
Problem:
Currently, it’s possible that an edit is made even if there is no difference, because the underlying JSON serialization may change.
Example:
This diff is empty, but in the underlying JSON representation, the aliases changed from having "de": [], "fr": [], "nl": [] in revision 103 not not having those empty lists anymore in revision 104.
BDD
WHEN I go to edit a schema
AND I only add whitespace at the beginning or end of labels, descriptions, aliases, or schema text
THEN no edit is recorded in the page history when I save
Open questions:
- There are two ways we can tackle this (not necessarily exclusive). Which one(s) do we want to pursue?
- Try to always generate the same JSON (strip empty aliases arrays, consistent key order, etc.). However, this can still produce empty edits if the serialization version changes.
- Diff the old and new Schema and don’t save if the difference is empty.