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

Only open tests results panel if failures #36

Open
gerardroche opened this issue May 16, 2016 · 5 comments
Open

Only open tests results panel if failures #36

gerardroche opened this issue May 16, 2016 · 5 comments
Labels
Milestone

Comments

@gerardroche
Copy link
Owner

No description provided.

@pilgerone
Copy link
Contributor

I implemented this feature on https://github.com/pilgerone/sublime-phpunit/commits/meaningful-inline-errors.

While I was at it, I realized it would be possible to show meaningful inline error messages instead of the redundant "file:line", so I took a swing at it.

I'm not so experienced on Python (specially on tests), but it seems to be working well. I'd appreciate any reviews, inputs and possible corrections.

@gerardroche
Copy link
Owner Author

gerardroche commented Apr 19, 2017

The usefulness of features like test progress and only showing the panel if failures is diminished by limitations in Sublime Text itself. They're also difficult to implement well enough for their usefulness to be worth the complexity and work required.

Without status bar colour support, bubble type notifications, better gutter icon support, perhaps a widget better suited to test results indicators, etc, then these feature don't have a great deal of value, at least not given the complexity and work required to implement them.

It would be very difficult for me to merge this feature. it's very difficult to get it right. I just don't want to give you wrong impression and for you to go and invest too much time on something like this.

@pilgerone
Copy link
Contributor

pilgerone commented Apr 19, 2017

Fair enough.

I actually used this as a first step to begin the experiments on meaningful inline error messages.

Maybe, with the help of phantoms, we could have a decent enough feedback from the tests along the code. That might render the output panel unnecessary in most situations.

For example, we could have a green bubble-like "OK" phantom near the tests for a couple of seconds if the tests went well.

What are your thoughts on this?

@gerardroche
Copy link
Owner Author

Using Phantoms to mimic bubble notifications is just working around a limitation in Sublime. You end up working around workarounds which work around workarounds. It's not worth it.

I find the inline errors feature very confusing so I have it disabled. You can use F4 and Shift+F4 to jump to next/previous error. Because of this I tend not to see too much value, if any at all (I actually think inline errors is a negative in this use case), in having inline errors because you have the tests results panel with all that information and can jump to the errors with the keymap, inline errors just don't much of anything on top of that.

@pilgerone
Copy link
Contributor

I guess the usefulness varies heavily from case to case, then. If one would leave the panel open at all times, the inline message is redundant, indeed.

I find it useful, though, since while i'm doing TDD and my tests usually fail with small diffs and errors (the kind that could be displayed inline without the need of the panel cluttering the screen). I'd be glad to have it hidden by default unless I need some extended info on the fail. Maybe a "i" button on the phantom could open the panel and show the fail message.

I'll keep experimenting a bit more on my fork and see if I can mature the code enough to make it reliable. Since it's mainly encapsulated inside the exec command, it's easy to keep the rest up-to-date with the master branch here.

Maybe you could use some of it in the future. Or maybe not. No worries.

@gerardroche gerardroche modified the milestone: 3.20.0 Aug 4, 2023
@gerardroche gerardroche added this to the 3.20.0 milestone Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants