-
Notifications
You must be signed in to change notification settings - Fork 30k
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
repl: use better uncaught exceptions indicator #29676
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@nodejs/repl PTAL |
Generally fine with this approach but the change in output may make this semver-major :-/ |
@nodejs/tsc PTAL and provide your opinion about the semverness. It is not immediately clear what this should ideally be. |
I added some before and after screenshots in the description above. |
btw, fwiw I really dislike having to potentially treat these kinds of usability improvement changes to console output as semver-major but we have seen in the past that such changes can break existing code. I would be definitely amenable to any policy change or approach to handling these things that would allow us to avoid treating them as semver-major |
Maybe a CITGM run will help make a decision for us? I wouldn't expect this in particular to break anything in CITGM, but if it does, that's certainly an argument for semver-major. |
i like changing it to uncaught, not a huge fan of the red though. red kills readability on pretty much everything that isn't green thanks to the magic of our eyes and rgb. |
Needs a rebase. Might make sense to split the wording change and the color change into separate PRs so any controversy about one won't delay the other. |
Agree that these are 2 separate concerns, and would be nice if they were broken into different PRs |
60a1d06
to
d5a049d
Compare
I would prefer to keep the change together and not splitting this up. I updated the colors to use bold bright red. This seems significantly better readability wise. I also added further screenshots at the top where I compare different color themes and terminals. @devsnek @lholmquist PTAL |
@nodejs/repl @nodejs/util PTAL |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I feel red color (with bold) is actually making it harder to read (on black terminals), IMHO. |
Can the colors be a separate PR? I'd love for the uncaught stuff to get in since that seems pretty uncontroversial. |
@devsnek @antsmartian @lholmquist does either of you have a suggestion what colors might be good to use instead? I will separate the colors from the rest of the PR even though I personally think they belong somewhat together. Right now it's not immediately clear when an error is thrown and when not. Using a color indicator overcomes that problem. Thus, I expect most users to profit from the current color suggestion. We could also use a predefined background color, I personally do not like that idea all that much though. |
This switches "Thrown:" with "Uncaught" to outline clearer that the thrown error is not caught. It will also mark the error in red in case the terminal supports colors / if colors are activated for the repl.
d5a049d
to
ea09aa5
Compare
I just pushed another commit that removes the colors. |
If we have informed volunteers to do so, probably a good idea to get review by some accessibility folks to make sure default color contrast is sufficient, color choices aren't a problem for people with color vision deficiency, etc. They wouldn't even need to necessarily review the code to add value--they could evaluate the screenshots above. Evaluating the range of possibilities by reviewing the code or experimenting with the result of this PR would be even better, of course. We don't have a specific accessibility group as far as I know, but I'm going to guess that there might be people with that kind of knowledge on the website teams, so... @nodejs/website @nodejs/website-redesign |
Whoops, never mind if the colors have been removed? Sorry, everyone. |
@BridgeAR: I don't have any strong suggestion on the colors. But, can't we make it configurable with some config, so that the user can decide what color he/she wants to keep for the errors/stacktrace etc? |
This switches "Thrown:" with "Uncaught" to outline clearer that the thrown error is not caught. PR-URL: #29676 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
Landed in 6c40cb2 🎉 |
This switches "Thrown:" with "Uncaught" to outline clearer that the thrown error is not caught. PR-URL: #29676 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
This switches "Thrown:" with "Uncaught" to outline clearer that the thrown error is not caught. PR-URL: #29676 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
This switches "Thrown:" with "Uncaught" to outline clearer that the thrown error is not caught. PR-URL: #29676 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com>
This switches "Thrown:" with "Uncaught" to outline clearer that the
thrown error is not caught. It will also mark the error in red in
case the terminal supports colors / if colors are activated for the
repl.
Since this should only be relevant for the end user, should this be semver-major or is it fine as semver-minor?
Update: I removed the colors as requested below!
Before
After (with different color themes and on different terminals)
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes