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

x/pkgsite: document dark mode #47421

Open
89z opened this issue Jul 27, 2021 · 17 comments
Open

x/pkgsite: document dark mode #47421

89z opened this issue Jul 27, 2021 · 17 comments
Assignees
Milestone

Comments

@89z
Copy link

@89z 89z commented Jul 27, 2021

Im not sure what happenend, but some malicious user defaced the docs site:

Untitled

@gopherbot gopherbot added this to the Unreleased milestone Jul 27, 2021
@jba
Copy link
Contributor

@jba jba commented Jul 27, 2021

If you're referring to dark mode, you should be able to turn it off. Try typing t on any page.

@ALTree
Copy link
Member

@ALTree ALTree commented Jul 27, 2021

Looks like it's not listed in the keyboard shortcuts window that appears when ? is pressed:

image

@ALTree ALTree changed the title x/pkgsite: CSS vandalization x/pkgsite: how to disabled dark mode? Jul 27, 2021
@ALTree ALTree changed the title x/pkgsite: how to disabled dark mode? x/pkgsite: how to disable dark mode? Jul 27, 2021
@jba jba changed the title x/pkgsite: how to disable dark mode? x/pkgsite: document dark mode Jul 27, 2021
@julieqiu julieqiu removed this from the Unreleased milestone Jul 27, 2021
@julieqiu julieqiu added this to the pkgsite/frontend milestone Jul 27, 2021
@gopherbot
Copy link

@gopherbot gopherbot commented Jul 27, 2021

Change https://golang.org/cl/337769 mentions this issue: Revert "internal,static: toggled user theme preference persists across pageviews"

@gopherbot gopherbot closed this in a0af592 Jul 27, 2021
@fzipp
Copy link
Contributor

@fzipp fzipp commented Jul 27, 2021

Try typing t on any page.

Typing t doesn't toggle the mode on macOS if the system preference is "Dark Mode". If the system preference is "Light Mode" the toggling works as expected.

@jba jba reopened this Jul 28, 2021
@jamalc
Copy link

@jamalc jamalc commented Jul 28, 2021

@jamalc jamalc closed this Jul 28, 2021
@fzipp
Copy link
Contributor

@fzipp fzipp commented Jul 28, 2021

@89z Merged isn't deployed. It will be fixed with the next deployment.

@jamalc jamalc removed their assignment Jul 28, 2021
@jba jba reopened this Jul 28, 2021
@jba
Copy link
Contributor

@jba jba commented Jul 28, 2021

This isn't quite persisting across all pages for me. (I'm using Chrome on a Mac.)

  1. Go to pkg.go.dev
  2. Click out of search bar, type t; enter dark mode
  3. click on "commands" to search for commands (url https://pkg.go.dev/search?q=command); in light mode now.

I wonder if it has something to do with the cache? Indeed, when I add a cache-busting query param, I see that search result page in dark mode.

@jba
Copy link
Contributor

@jba jba commented Jul 28, 2021

@89z, a word about how the tools work: when we prepare a CL/PR that we believe fixes an issue, we write "Fixes #NNNN" in the description. When the CL is submitted, GitHub notices that comment and closes the issue. That's a great convenience for developers, but unfortunately it means that issues get closed before users observe the fix—for projects that deploy rarely, perhaps weeks before they observe it. We deploy approximately daily (not on Fridays, holidays or weekends) so the lag is not great, but it is there. It's fine to comment on a closed issue asking when the next deployment or release or whatever will happen.

I hope that makes it clear that we're not trying to shut you down or minimize what you're going through.

@jba jba assigned jba and jamalc and unassigned jba Jul 29, 2021
@Lyoness
Copy link

@Lyoness Lyoness commented Jul 29, 2021

@89z has been been banned on the issue tracker for repeated violations of the Go Code of Conduct.

Specifically:

  • insulting/derogatory comments and language.
  • repeated conduct considered inappropriate in a professional setting.

This repeated behavior is not in accordance with the Go CoC values and standards. Corrective action is in line with maintainer responsibilities and at their discretion. The Go CoC Conduct board reviewed the entire history of behavior in the issue tracker, and concluded that a ban was appropriate corrective action.

As the Go CoC states

We do not believe that all conflict is bad; healthy debate and disagreement often yield positive results. However, it is never okay to be disrespectful.

As the Go project continues to grow, maintainers manage an increasing load of issues. We understand user frustrations are a main motivation of taking the time to report issues, and as engineers who have used other software, we empathize with this frustration. Maintainers do their best to look at every issue, and determine the most helpful course of action. But Go has reached an issue volume [7,335 Open 39,745 Closed, as of today], where every snarking, unproductive, disrespectful comment is starting to feel like death by a thousand cuts. Our maintainers are not only human, but their well-being is vital to the success of Go.

Therefore, the Go Code of Conduct stewards are more actively enforcing the "never ok to be disrespectful" clause of the CoC, and giving maintainers full agency to take corrective actions in Go project spaces where the Go CoC is in effect.

-Go CoC board.

@mvdan
Copy link
Member

@mvdan mvdan commented Aug 5, 2021

We should probably fold #47553 into this issue, because "allow users to discover that there's a dark mode" via a button/setting somewhere is probably in line with documenting the feature.

@mvdan
Copy link
Member

@mvdan mvdan commented Aug 5, 2021

@wxolp worth noting that the ban came after a number of threads and comments from the person, many of which have been deleted by now by the author. Hence "repeated violations". It's understandable that, by just looking at a single thread in isolation, the ban might seem out of place.

@tv42
Copy link

@tv42 tv42 commented Sep 12, 2021

This was absolutely non-discoverable and way too easy to trigger by accident. Please reconsider dedicating a single-button alphabetical shortcut to such an annoying thing that's easy to toggle but hard to discover.

@cespare
Copy link
Contributor

@cespare cespare commented Sep 12, 2021

Keyboard shortcuts are appropriate for actions which need to be performed very often -- so much so that learning and memorizing a shortcut pays off in efficiency savings over time.

Toggling dark mode is essentially the opposite of that. People who like dark mode will turn it on once. Nobody needs to rapidly toggle it back and forth repeatedly every day.

I would be surprised if most uses of the t shortcut are intentional.

@julieqiu julieqiu removed this from the pkgsite/frontend milestone Sep 13, 2021
@julieqiu julieqiu added this to the pkgsite/2021 milestone Sep 13, 2021
@twmb
Copy link
Contributor

@twmb twmb commented Oct 11, 2021

I've noticed that pressing ? on pkg.go.dev itself does not pop up the help toolbox, meaning on the front page of docs, one cannot discover how to toggle light/dark mode. It might be worth supporting ? on the front page (t is).

Might it be worth it to have a toggle tip of a little question mark in a circle in the top right of the page, underneath the blue search banner/blog/packages/etc. nav? This may help support users who aren't used to pressing ? on pages to get help.

I forgot about pressing ? within package documentation itself, so went to pkg.go.dev to look for some help. On the front page I remembered ? worked in the past, but then it somehow wasn't, so googled for this issue again.

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 11, 2021

Change https://golang.org/cl/354596 mentions this issue: internal,static: move modals to base frontend template

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 11, 2021

Change https://golang.org/cl/354595 mentions this issue: static: add footer buttons for theme switching and shortcuts modal

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 11, 2021

Change https://golang.org/cl/354597 mentions this issue: static/frontend: remove theme toggle keyboard shortcut

gopherbot pushed a commit to golang/pkgsite that referenced this issue Oct 11, 2021
For golang/go#47421

Change-Id: I3b8dc2a94169e636f0b21587eeb76315052f361f
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/354595
Trust: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet