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

Line by Line Review #96

Open
bllchmbrs opened this issue Jul 10, 2024 · 5 comments
Open

Line by Line Review #96

bllchmbrs opened this issue Jul 10, 2024 · 5 comments

Comments

@bllchmbrs
Copy link

Loving inline-snapshot so far and can't wait to see how it grows (in simple ways). I was hoping to be able to simplify my usage.

Desired Behavior

I want to run (pseudo-cli command)

pytest --inline-snapshot=review-individual-snapshots

Expected

This pops up a review like the one that exists today but instead of approve/disapprove on a file / global basis, it reviews snapshot by snapshot.

The use case is that I want to make updates and I know I can use -k whatever to specify a keyword, but it'd be nice to run it once and approve / disapprove individually.

Is something like that possible?

@15r10nk
Copy link
Owner

15r10nk commented Jul 10, 2024

It is possible and it is planed, but not for the terminal.

The reason is that a terminal ui will stop working for images (yes I plan to snapshot images like png's in external files).

I think also that there are a lot of different ways how the ui could help you approving changes. Show you which changes are similar for example.

I want to build this on a foundation which can support this use cases (and more) in the future. I described the idea in #48. Approval of single snapshots will probably be the first thing which I will implement.

My plan was to start with this this year, but I can not make any promises on this.


I'm glad to hear that you love inline-snapshot. Like you, I'm also looking forward to seeing it grow 😃

@bllchmbrs
Copy link
Author

what about just rendering images as ascii art? (kidding, but it'd be funny). Read through #48 and looks great.

Can you think of a poor man's version that would work in the terminal (for text only) in the immediate case?

I see the value in a browser based UI, but I feel like the 1 by 1 review has a ton of value that's outside of a browser based one.

@15r10nk
Copy link
Owner

15r10nk commented Jul 11, 2024

You have convinced me. It will be the first insider feature for inline-snapshot.

The approval-ui is a lot of work and I don't know if I will have the time for it in the near future (to many open merge-request in other projects 😁).

This should be small enough and can be done as an insider only feature.

@bllchmbrs
Copy link
Author

woohoo! Glad I convinced you. I would imagine building a UI is just a huge undertaking and there's like a step change in value in 1:1 reviews from the terminal for (what I estimated) relatively little work.

I'm happy to do some content creation around inline snapshots + our use case to support!

@15r10nk
Copy link
Owner

15r10nk commented Jul 12, 2024

Sounds great, I'm looking forward to your content.

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