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

Browser based approval ui #48

Open
15r10nk opened this issue Feb 20, 2024 · 1 comment
Open

Browser based approval ui #48

15r10nk opened this issue Feb 20, 2024 · 1 comment

Comments

@15r10nk
Copy link
Owner

15r10nk commented Feb 20, 2024

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.

@alexmojaki
Copy link

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.

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

No branches or pull requests

2 participants