glide-data-grid icon indicating copy to clipboard operation
glide-data-grid copied to clipboard

Spacebar doesn't scroll table

Open twobit opened this issue 4 years ago • 13 comments

In MacOS the spacebar can be used to scroll a page at a time.

twobit avatar Feb 11 '22 10:02 twobit

Huh, I've been using MacOS for years and never learned that. Thanks for noting that! I'll fix this.

ivoelbert avatar Feb 11 '22 14:02 ivoelbert

shift-space also scrolls up

pzcfg avatar Feb 11 '22 22:02 pzcfg

This could get a little ambiguous though. right now if you have an editable cell selected and start typing, it edits the field. If a field is selected should it insert a space or scroll?

pzcfg avatar Feb 11 '22 22:02 pzcfg

When faced with this dilemma I always ask myself "what does google sheets and excel do?"

On Fri, Feb 11, 2022 at 2:27 PM Peter @.***> wrote:

This could get a little ambiguous though. right now if you have an editable cell selected and start typing, it edits the field. If a field is selected should it insert a space or scroll?

— Reply to this email directly, view it on GitHub https://github.com/glideapps/glide-data-grid/issues/170#issuecomment-1036688870, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAHN2YWPW6Y6JEQBFFQIPLU2WEL7ANCNFSM5OD25KMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jassmith avatar Feb 11 '22 22:02 jassmith

Ha, I was just checking that

ivoelbert avatar Feb 11 '22 22:02 ivoelbert

Same, just checked. I guess it's a matter of is the component a spreadsheet or a table?

twobit avatar Feb 11 '22 22:02 twobit

Both Google Sheets and Excel don't scroll on space. They start editing the selected cell. Also both always have a selected cell.

I think it's reasonable to do the scrolling if you don't have a selected cell, and go into edit mode if you do? Going into edit mode only if the selected cell is editable sounds confusing.

ivoelbert avatar Feb 11 '22 22:02 ivoelbert

Problem: There is no way to unselect a cell once one is selected. I would argue escape should probably do that...

On Fri, Feb 11, 2022 at 2:32 PM Ivo Elbert @.***> wrote:

Both Google Sheets and Excel don't scroll on space. They start editing the selected cell. Also both always have a selected cell.

I think it's reasonable to do the scrolling if you don't have a selected cell, and go into edit mode if you do? Just going into edit mode if the selected cell is editable sounds confusing.

— Reply to this email directly, view it on GitHub https://github.com/glideapps/glide-data-grid/issues/170#issuecomment-1036694952, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAHN2YQRW43H6372CTINFDU2WFARANCNFSM5OD25KMQ . You are receiving this because you commented.Message ID: @.***>

jassmith avatar Feb 11 '22 22:02 jassmith

Sounds reasonable. That was what I expected in GS and Excel, and none delivered 😄

ivoelbert avatar Feb 11 '22 22:02 ivoelbert

Problem: There is no way to unselect a cell once one is selected. I would argue escape should probably do that...

I can unselect cells by clicking the empty space to the right or bottom of the cells (if that's set)

pzcfg avatar Feb 11 '22 23:02 pzcfg

Thats fair but not reliably available.

On Fri, Feb 11, 2022 at 3:02 PM Peter @.***> wrote:

Problem: There is no way to unselect a cell once one is selected. I would argue escape should probably do that...

I can unselect cells by clicking the empty space to the right or bottom of the cells (if that's set)

— Reply to this email directly, view it on GitHub https://github.com/glideapps/glide-data-grid/issues/170#issuecomment-1036725297, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAHN272ICU4VZUWXFHIBOLU2WIQ3ANCNFSM5OD25KMQ . You are receiving this because you commented.Message ID: @.***>

jassmith avatar Feb 11 '22 23:02 jassmith

Huh, some notes on this:

  • esc already clears your selection
  • space and shift+space does scroll as expected, but only after a few interactions:
  1. Go to this story
  2. Click on some cell
  3. Tap esc to clear your selection
  4. Scroll down a bit (roughly half a page is enough on my setup, 2019 16' MBP on both Chrome and Safari)
  5. Play around with space and shift+space

I still didn't dig too much into why it behaves this way.

ivoelbert avatar Feb 13 '22 15:02 ivoelbert

Its because focus is not inside the data editor until you click ;)

jassmith avatar Feb 15 '22 23:02 jassmith