google / google/codeworld

Better formatting for the Inspect dialog

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

Descrizione

Unfortunately, @kammitama5 adding properties to the inspect dialog, while useful, made it a bit ugly and harder to read.

Some ideas for cleaning this up:

* **Source formatting.** I'd like to format these more in the form they appear in the program itself. For example, instead of `lettering { text = 'Hashim' }`, I'd want to see `lettering("Hashim")` when in CodeWorld mode, or `lettering "Hashim"` when in Haskell mode. For transformations, we could do something like `translated(..., 4, 7)` (in CodeWorld mode), or `translated 4 7` (in Haskell mode). This means we need to do something mode-dependent here, either by passing in a formatter, or just detecting the mode inside the program.
* **Contextual tool tips.** Unfortunately, the previous idea loses descriptions of the meaning of the arguments. I am afraid this is a fundamental tension - the wordier the result, the less likely it is to be useful at a glance; but the terser, the less likely to be informative. But we can at least add the description in a tool-tip. So when you hover over the `4` above, a tooltip could pop up saying "horizontal = 4".
* **Smarter ellipsization.** Instead of ellipsizing the entire string, we could start by ellipsizing each of the arguments separately. Since this takes less away from the usability, we could be a bit more aggressive at ellipsizing, making the labels shorter (and, therefore, the structure more clear). When arguments are ellipsized, we can still attempt to show more of the argument in the tool-tip.
* **Type specific formatting.** When rendering a color, we should consider rendering it in the same hue and saturation as the color itself (but not lightness, because it must remain readable). In tool tips, we can go even further. The tool tip for a color should show a swatch, as well as the RGBA and HSL values. The tool tip for a point can show the point on a coordinate plane. A list of points should probably have separate tool tips for its member points.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by locating the Inspect dialog and reviewing how its properties are currently rendered. The issue proposes mode-dependent source formatting, contextual tooltips, argument-level ellipsization, and type-specific displays for colors and points; done would require agreeing on and implementing the desired subset.

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

Valutazione

Stack tecnologico
haskell
Ambito
design, frontend
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.