Browser based approval ui
Opened this issue · 1 comments
I want to implement a browser based approval ui for inline-snapshot.
inline-snapshot has currently some usability problems:
- fixing snapshots means that you blindly accept the new values if you run
pytest --inline-snapshot=fix
. The only way to compare the change is with git, and only after you already changed the value. - outsourced data is currently referenced by hash (which has its own reasons). This makes it difficult to see the connection between the snapshot and the external file.
- it is possible to change the wrong snapshots accidentally and approve bugs, if you do not review the diff afterwards carefully.
I want to solve them with a UI which provides an efficient way to control which snapshots should be changed.
first features:
- the ui can be started with
pytest --inline-snapshot-ui
- the user can take a look at all snapshots which can be fixed/updated/created/trimmed
- it is possible to select which snapshots should be changed (one by one or multiple together)
later:
- it is possible to compare outsourced data
- images
- ... more to come
The current plan is that this will become a sponsor only feature. I really want to keep the base functionality open source and free of sponsoring, but I have to find a way to earn some money from my open source work, if I want to do more of it.
I would be happy to know if you like this Idea and what you think about it.
Honestly, I don't think I would have much use for this.
fixing snapshots means that you blindly accept the new values if you run pytest --inline-snapshot=fix. The only way to compare the change is with git, and only after you already changed the value.
This works fine for me. I use the UI in Pycharm to review the git diff and sometimes tweak it, so I can already effectively accept/reject changes.