github.com/shurcooL/issuesapp/...

Close and comment button is in reverse order github.com/shurcooL/issuesapp#24

Openslimsag opened this issue 8 years ago
slimsag commented 8 years ago · edited by dmitshur

issuesapp:

Image

GitHub:

Image

Write Preview Markdown
slimsag commented 8 years ago

The more I use Tracker the more this bothers me. I've almost hit "Comment and close" every time I post :(

@shurcool would you be OK with me swapping this?

Write Preview Markdown
dmitshur commented 8 years ago

Stephen, FYI, I didn't get notified about your direct mention because my username is shurcooL and the mentions are not case-insensitive. (We need autocomplete for @ mentions to help with this.)

I'm aware of this limitation. Tracker originally had the same order as GitHub and I like it better too.

However, I initially implemented it by swapping the order of elements in HTML (relative to what it is now), so Close and comment button came first; Comment button came second. That caused a problem where pressing Tab,Enter would select the wrong action.

I tried to use taborder property to set correct order of tabbing, but it turned out to be infeasible because there are potentially many comments in a given thread, and it's really really hard to dynamically set correct tab order for all elements (given that React is not used to render the entire page).

So I aborted that idea and decided to temporarily use a compromise of swapped visual order, but have correct tab order, because the ability to press Tab,Enter is way more important, and the color scheme helps when using mouse.

I am in favor of swapping it for consistency, and you're welcome to take this, but you shouldn't have to re-trace my steps above. Instead, this needs to be fixed with CSS. Keep HTML order of elements the same, use CSS to adjust the left-right positioning. Does that make sense?

Write Preview Markdown
dmitshur commented 7 years ago · edited

I've looked into this a bit, and this is quite easy to achieve using CSS with float: right;.

However, I'm starting to hesitate if this should really be done...

I find the left-to-right order isn't so bad, even though GitHub has it in the opposite order. I don't find myself making mistakes or finding it very confusing, and I use both trackers quite interchangeably (which is very surprising and counter-intuitive for me, but it's the truth). Hmm...

Write Preview Markdown
to comment.