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

cmd/compile: add a dark mode for GOSSAFUNC html output #34325

Open
agnivade opened this issue Sep 16, 2019 · 5 comments

Comments

@agnivade
Copy link
Member

commented Sep 16, 2019

What version of Go are you using (go version)?

$ go version
go version go1.13 linux/amd64

It would be very helpful to have a dark mode switch for the GOSSAFUNC html file. Staring at the white screen for a long time at night is stressful to the eyes.

Just an inverted color scheme with the proper highlight colors and a checkbox at the top to toggle scheme should be good enough.

Marking it as help wanted, as it's a good started issue for anybody looking to contribute. The relevant code is in this file - https://github.com/golang/go/blob/master/src/cmd/compile/internal/ssa/html.go

@ysmolsky

@robpike

This comment has been minimized.

Copy link
Contributor

commented Sep 17, 2019

If your screen stresses your eyes, your brightness is set too high. I prefer a light background but the background brightness is comparable to the rest of the room. This is the way things should be set up, so your eye accommodates equally to the screen and the environment.

I'm not in favor of dark mode but I know I am in the minority. Research shows it causes more eyestrain than properly set up light backgrounds. I do not expect to win this argument.

@josharian

This comment has been minimized.

Copy link
Contributor

commented Sep 17, 2019

I have also had problems particularly with ssa.html. I subscribe to the “turn down the monitor” and “use red shifting” philosophies, but ssa.html is peculiarly bad.

Just switching away from programmer white to a gentler background color might help a lot.

Also, some of the highlight colors get lost or muddled when red-shifted. I have no idea how to fix that. Colors are subtle.

@agnivade

This comment has been minimized.

Copy link
Member Author

commented Sep 17, 2019

I have already done all of that. Low brightness, red filter (had been using f.lux but switched to redshift couple of years back).

But I recently started to use the dark reader chrome extension, and everything seems so easy on the eyes at night. I do realize it's a personal choice at the end of the day. That's why I suggested a small opt-in switch for people who want to use it. No harm in that :)

Also, some of the highlight colors get lost or muddled when red-shifted.

I have been using redshift for a while now. Never had an issue with the highlight colors. So I think a new set of colors for the dark background should not be an issue.

@ALTree

This comment has been minimized.

Copy link
Member

commented Sep 17, 2019

Since the file is viewed using the browser, wouldn't a dark mode browser extension also work?

@agnivade

This comment has been minimized.

Copy link
Member Author

commented Sep 17, 2019

It doesn't work. I don't know why. But even if it did, it's just a generic solution. It won't have bg-specific highlight colors. I would like the ssa.html itself to have a dark mode switch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.