quadratic icon indicating copy to clipboard operation
quadratic copied to clipboard

selection auto complete

Open davidfig opened this issue 1 year ago • 4 comments

  • [x] basic dragging corner
  • [x] selecting the correct direction when dragging corner into open space (ie, not directly underneath or to the side of the current selection box)
  • [x] escape cancels the drag
  • [x] releasing activates the algorithms
  • [x] delete if smaller than selection
  • [x] simple counting algorithms
  • [x] text series algorithms
  • [x] copy cell instead of just value
  • [x] bug w/probably last selection not clearing on release

davidfig avatar Mar 26 '23 17:03 davidfig

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-379.de5w5iglj13on.amplifyapp.com

Apr-17-2023 16-33-32

To me, it feels a bit strange that the current selection gets highlighted as "remove" even when nothing is being removed.

I feel like I would expect red if we're removing, green if we're adding, and none if we're not doing either.

image

jimniels avatar Apr 18 '23 00:04 jimniels

Active selection after dragging

Excel and sheets always leave a drag interaction with the selected range active:

Apr-20-2023 14-14-51

Quadratic, conversely, leaves only the cell where you started the drag active:

Apr-20-2023 14-16-11

Dragging a single cell

Currently, if you drag an empty cell, the app just crashes and you have to reload. This seems easy enough to fix.

Excel and numbers both work where, if the first cell is empty, it empties all the cells over which you drag.

Apr-20-2023 14-19-57

Dragging a range of cells

If you drag a range of cells, it will duplicate that pattern within that range.

Sheets/excel:

Apr-20-2023 14-21-36

In Quadratic, dragging a range of cells does nothing:

Apr-20-2023 14-22-02

I would expect that dragging a selection, autocompletes within that selection range.

CleanShot 2023-04-20 at 14 24 58@2x

jimniels avatar Apr 20 '23 20:04 jimniels

Style changes

After playing with this some more, and looking at what excel/sheets do, I feel like a good interaction style here is to keep the blue outline for additive dragging, and then a red outline at the point when a subtractive drag is taking place.

Apr-20-2023 17-00-21

This means that, when dragging the selection for a single cell, you'll never see the "remove" red highlight, because you're never doing a subtractive drag with just one cell.

Apr-20-2023 17-05-17

Bugs

Horizontal delete

The fixes for vertical dragging are not working for horizontal dragging. Will have to investigate why the logic is wrong. The positioning seems to be triggering at the wrong place, as you can see here:

Apr-20-2023 16-57-29

Deleting one, then two or more

When deleting a range down to 2 or more, things work as expected:

deleting-to-2-or-more

But when deleting a range down to a single cell, it doesn't work:

deleting-to-1

jimniels avatar Apr 20 '23 23:04 jimniels