brendand / mbtablegrid

An NSControl subclass which provides a spreadsheet-style table grid
9 stars 3 forks source link

The quick view icon and fill dot should only be visible on hover #33

Closed Dejal closed 9 years ago

Dejal commented 9 years ago

Having the quick view icon always visible adds clutter to the view, and it's really unattractive when there's a multiple selection:

150227 multiple selection

So it'd be nicer if it only appeared when mousing over a cell.

Similarly, the fill down dot would be tidier if it only appeared when mousing over (as Numbers does).

brendand commented 9 years ago

Agreed.

Dejal commented 9 years ago

This is done, though the quick view hover thing is a little pointless, since clicking the quick view button will change to a single selection. You should decide if either (a) the selection shouldn't change when it is clicked, or (b) it should, and thus should only show the quick view button when there is a single selection. The former would be a new issue.

brendand commented 9 years ago

The way it works in Bento is when you click on a row, all the accessory view icons appear just for that row. Selecting multiple rows will actually show you all the accessory buttons.

multiple selections: screen shot 2015-03-05 at 10 49 08 pm

single row selected:

screen shot 2015-03-05 at 10 53 38 pm

brendand commented 9 years ago

I notice there's a delay with the grab handle jumping to the top or bottom of the first or last cell depending on the direction you're dragging. Any way to tighten that redraw timing up?

brendand commented 9 years ago

P.S. :heart: the cell shading on the fill function.

Dejal commented 9 years ago

Selection: I could do that, but I personally think that having lots of accessory buttons visible is ugly (we don't need to clone Bento's approach). Also, that doesn't address my question: clicking will always change the selection, so I was asking if clicking a button should work without changing the selection, or only show the button when there's a single selection, since that's effectively how it works now.

Re the delay, I could see if I can improve that. It's due to the tracking areas and redrawing lagging behind the dragging (so making it faster might slow down dragging).

brendand commented 9 years ago

Hmm... I agree that having all those accessory buttons is ugly. I do like the idea of showing all the accessory buttons in every cell within the same row though. It lets the user know there are accessory buttons in other cells. I agree that we don't have to show every accessory button like Bento does during multiple selection. In fact, I don't think any accessory buttons should show during multiple row selection.

Dejal commented 9 years ago

Okay, I can change it to not show any accessory buttons when multiple cells are selected (which solves the issue of clicking changing the selection), and also to show all accessory buttons in the row of the selected cell.

Dejal commented 9 years ago

Done. That simplified the table grid logic (don't need a tracking area for the accessory buttons). I also moved the decision on when to display the accessory buttons to the controller, since it already has some logic there. (In -tableGrid:accessoryButtonImageForColumn:row:).

brendand commented 9 years ago

:+1: