carbon icon indicating copy to clipboard operation
carbon copied to clipboard

Tabs component scroll button on mobile scrolling very little

Open gptt916 opened this issue 3 years ago • 8 comments

What package(s) are you using?

  • [ ] carbon-components
  • [x] carbon-components-react

Detailed description

Describe in detail the issue you're having.

When on mobile, the scroll buttons only scroll by about 15 pixels when clicked on. Holding does not work on mobile as it brings up the item menu.

Is this issue related to a specific component?

Yes, Tabs

What did you expect to happen? What happened instead? What would you like to see changed?

Matching scroll distance/behaviour on mobile/desktop.

What browser are you working in?

any mobile, or alternatively, chrome responsive mode

What version of the Carbon Design System are you using?

Latest

What offering/product do you work on? Any pressing ship or release dates we should be aware of?

IBM Cloud docs

Steps to reproduce the issue

  1. Go to https://react.carbondesignsystem.com/?path=/story/components-tabs--default
  2. In desktop chrome, toggle on device toolbar
  3. From the drop down, select Iphone X
  4. click on the scroll buttons
  • Screenshots or code image

gptt916 avatar Mar 10 '21 21:03 gptt916

cc @aagonzales we increased the scroll speed in https://github.com/carbon-design-system/carbon/pull/7148 but should it be modified again?

emyarod avatar Mar 10 '21 22:03 emyarod

bump @aagonzales when you get a sec!

joshblack avatar Apr 05 '21 14:04 joshblack

It does seem pretty slow. The click and hold option doesn't seem to be making it move at all, didn't we used to have the function @emyarod

aagonzales avatar Apr 05 '21 15:04 aagonzales

Looks like now when you click and hold it prompts a menu to appear instead of continuing to scroll at a faster speed Apr-05-2021 10-48-35

aagonzales avatar Apr 05 '21 15:04 aagonzales

mobile users should be able to swipe across the tabs to scroll. clicking and holding won't work on mobile because of the "long press" action, and I'm not sure if we should override that behavior

emyarod avatar Apr 05 '21 15:04 emyarod

Oh interesting, yeah if I just use a smaller browser width vs the mobile view the speed seems to be correct. So I guess yes we should increase the speed on the mobile setting to match the speed of a click for the desktop version.

Apr-05-2021 10-59-06

aagonzales avatar Apr 05 '21 16:04 aagonzales

the speed on mobile is currently the same as desktop, but desktop scrolls faster because a mouse click/trackpad press normally registers as several click events, but a tap on mobile only registers as a single click. to separate the behavior on mobile and nonmobile devices would be a bit tricky as well. I think this requires more investigation but for the time being at least mobile users will be able to swipe to scroll

emyarod avatar Apr 05 '21 16:04 emyarod

We're using version 10 and experiencing this issue of very little scrolling left to right on desktop. Is this something addressed with version 11 or can this be applied to version 10 as well without breaking anything?

mekaufman avatar Sep 20 '22 16:09 mekaufman

@mekaufman The scrolling behavior for tabs was improved with v11 - the change is unfortunately not backwards compatible with v10. The recommendation from here would be to use v11 as it's fixed there.

https://user-images.githubusercontent.com/3360588/199058964-cf8477c3-47e0-470c-9eea-abd1ea7fc278.mov

tay1orjones avatar Oct 31 '22 16:10 tay1orjones