google / google/codeworld

https://code.world/haskell Nav bar button colors are confusing

Aperta
#1,070 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
cleanup
Lingua principale
Haskell
Stelle
1.3k
Fork
201
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

https://code.world/haskell#is missing some button colors that https://code.world has, in a confusing way.

https://code.world uses these colors:
Blue: Action buttons
Red: More action buttons
(I can't tell what the conditions are for choosing Red vs Blue, putting a comment in the .css might help)
Olive/Yellow: Current project
Green: Other projects

https://code.world/haskell# uses these colors:
Green (instead of Blue): Action buttons
Olive (instead of Red): More action buttons
Olive/Yellow: Current project
Green: Other projects

The overloaded use of colors is confusing.

The source of the problem appears to be here, in `codeworld.css` and/or `theme-variables.css`:
```
.cw-button.red,
.cw-button.red:hover:active {
background-color: var(--cw-button-bg-13);
}

.haskell .cw-button.red,
.cw-button.red:hover:active {
background-color: var(--cw-button-bg-14);
}
```

`.haskell` red:
` --cw-button-bg-14: hsl(60, 75%, 35%);`

is the same as (default) Yellow:
` --cw-button-bg-1: hsl(60, 75%, 35%);`

but probably should be the same as `-cw-button-bg-13:` Red
` -hsl(10, 75%, 35%);`

and similar for `.haskell` blue:
```
haskell .cw-button.blue, .cw-button.blue:hover:active {
background-color: var(--cw-button-bg-10);
}
```
should be like -cw-button-bg-13: Blue
` hsl(135, 75%, 35%);`

should be

Also, this looks suspicious:
```
.cw-button.red,
.cw-button.red:hover:active {
background-color: var(--cw-button-bg-13);
}

.haskell .cw-button.red,
.cw-button.red:hover:active {
background-color: var(--cw-button-bg-14);
}
```

It has `.cw-button.red:hover:active` twice. Perhaps you meant to add the `.haskell ` prefix?

(There is the same problem on `.blue`)

All of this might be more readable if the variables `--cw-button-bg-*` more semantic cues in the names (such as `haskell`, `project`, `action`, `active`) and eschew the under-typed numbers `1`-`20`.

Also, I'd also suggest using assignments like ` --haskell-cw-button-action-bg: var(cw-button-bg);` to keep Haskell and default in alignment except for where you want Haskell to be different.

Also, IMO, using a drab Olive for current project, and a bright Green for other projects, is the opposite of what a user intuits. Usually the "current" object has a brighter color than other/background objects. (For example: OS window title bars and Chrome tab bars)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Esamina codeworld.css e theme-variables.css, concentrandoti sui selettori .haskell .cw-button.red e .blue e sulle relative regole hover/active. Confronta la navigazione predefinita e quella Haskell nei due URL, quindi verifica che i pulsanti action, additional-action, current-project e other-project rimangano visivamente distinti senza selettori duplicati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
css, haskell
Ambito
accessibility, design, frontend
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.