feedback icon indicating copy to clipboard operation
feedback copied to clipboard

Cell Toolbar missing 'cell name' field on touch-enabled laptops

Open akrawitz opened this issue 2 years ago • 4 comments

Describe the bug On touch-enabled laptops, as on mobile devices, the Cell Toolbar is attached to the bottom of the cell instead of to the bottom of the window. In this configuration, the Cell Toolbar does not have the 'cell name' field, and the UI provides no alternative access to the cell name. As a result, there is no direct way to view or edit the cell name for non-Javascript cells.

To Reproduce Steps to reproduce the behavior:

  1. Enter 'Edit' mode for any non-Javascript notebook cell on a touch-enable or mobile device.
  2. The Cell Toolbar is at the bottom of the cell instead of at the bottom of the window.
  3. There is no 'cell name' field.

(This can be experienced on other devices using the device toolbar in Chrome DevTools to simulate a touch device such as an iPad Air.)

Expected behavior There should be some way to view and edit the 'cell name' on touch-enabled laptops and mobile devices.

Screenshots

Non-touch laptop: image

Touch-enabled laptop (no 'cell name' field!): image

Desktop (please complete the following information):

  • Device: Lenovo Thinkpad X390 Yoga (a 13" convertible 'business' laptop)
  • OS: Windows 11
  • Browser: Chrome
  • Version: 115

Additional context I can think of a few ways to address this issue:

  1. Distinguish touch-enabled laptops from touch-only mobile devices, and use the full window-attached cell toolbar on the laptops. (This would only help touch-enabled laptop users.)
  2. Include cell name field in cell toolbar when it is attached to cell instead of window, if the window is wide enough. (This would help touch-enabled laptop users and touch-only users with wide-enough screens.)
  3. Add a “Cell name” item to the cell’s menu, either always, or only when the cell name field is hidden from the toolbar. (This would help touch-enabled laptop users and all mobile users.)

akrawitz avatar Jul 24 '23 18:07 akrawitz

This happens also on non-touch-eabled laptops, i.e. MBR 14" 2021, M1 Max, macOS 14.5

espinielli avatar Sep 05 '24 11:09 espinielli

@espinielli Observable uses navigator.maxTouchPoints as indicator. On my M2 MacBook the property returns 0, so I suspect that you have some external touch-enabled input device (e.g. Magic Trackpad or iPad) connected?

mootari avatar Sep 05 '24 11:09 mootari

No, nothing...that's the weird thing... Any code I can run to debug and provide more info?

espinielli avatar Sep 05 '24 19:09 espinielli

I was wrong, my MS Windows laptop has touch screen capabilities (I never use it...it is docked on the desk...) And the toolbar is correctly working on the MBR...sorry for the fuss

espinielli avatar Sep 06 '24 07:09 espinielli