arxanas / scm-record

`scm-record` is a UI component to interactively select changes to include in a commit. It's meant to be embedded in source control tooling.
23 stars 9 forks source link

Use unicode bullets for tristate check symbols #46

Closed Jollywatt closed 2 months ago

Jollywatt commented 3 months ago

This is a tiny PR, meant more as a reminder for something to think about!

Problem

The symbol "×" has the connotation of excluding something or crossing something out, which can confusing especially when it is not obvious whether the initial state is "everything selected" or "nothing selected", e.g., when performing a split.

"[~] foo/bar                                                                  [-]"
"  (~) Section 1/1                                                            (-)"
"    [×] - before text 1⏎                                                        "
"    [×] - before text 2⏎                                                        "
"    [×] + after text 1⏎                                                         "
"    [ ] + after text 2⏎      

Proposed

Using "●" for selected and "◐" for partial:

"[◐] foo/bar                                                                  [-]"
"  (◐) Section 1/1                                                            (-)"
"    [●] - before text 1⏎                                                        "
"    [●] - before text 2⏎                                                        "
"    [●] + after text 1⏎                                                         "
"    [ ] + after text 2⏎    
Jollywatt commented 3 months ago

I should add that, while this helps especially for a diffedit context, I still think it remains ambiguous in a split context. Related: https://github.com/algmyr/scm-record/commit/063a3beb82087c6316a363f945d452009004c3d6

arxanas commented 3 months ago

I'm trying this out to make sure it works well! Seems good so far. The only thing to note is that when the full circle is highlighted/focused, it becomes an empty circle (which has the opposite semantics), whereas the current x doesn't have different meaning depending on its filled status. But we don't use an empty circle glyph, so I'm not expecting this to be a real issue.

Jollywatt commented 3 months ago

Good point; we should avoid using [○] and [●] together.

P.S. circles are one option, but simply replacing × with would accomplish just as much.

[ ] [~] [×] # current
[ ] [~] [✲]
[ ] [~] [✓]
[ ] [-] [✓]
[ ] [◐] [●]
[ ] [◖] [●]
[ ] [◩] [■]
[←] [⇆] [→] # left/right analogy
[<] [≶] [>]
[🔧] [🛠️] [🔨]
emesterhazy commented 3 months ago

My 2c, I personally don't find the X confusing since the opposite state is just an empty box. It seems clear to me that the empty box is an unselected state. I actually don't think that the X has a connotation of crossing something out when it's inside of a box like this, but maybe it depends from region to region.

Edit: It seems like the confusion might be about where the selected changes end up. The left/right analogy seems like it could be the best option for resolving that problem, but users will still need to know what the left and right states are. The circle / square options don't seem like an improvement over X to me since they don't convey any additional information IMO.

arxanas commented 2 months ago

I don't personally have a problem with x either, but I don't think it hurts to try to address it if it confuses some people. The issue of where selected changes end up will probably only be fixed with a more substantial effort.