Closed jianliao closed 1 month ago
Related issue: #4032 cc: @Rocss
@Rajdeepc me and Westbrook thought of making this behaviour optional, but did not see at that moment this edge case.
In this case, would this initial proposal be an accepted alternative? I know Westbrook had some comments on doing DOM calculations in this workflow, but I don't see a solution right now without them: https://github.com/adobe/spectrum-web-components/pull/4032/commits/1c1d7d1ec3d823cd55efd4b7b944a4a0d05a0be9#diff-b00b1c2026d53e2627110a96b16bd9a5a8247140577ab2a411d7cf2895fe4eb5R254
Open to any suggestions
I feel that auto-scroll into view should be auto detected at load and not optional for e.g if you make this optional how would you handle selected views in multiple tab views?
But what Jian has pointed out would be a bad UX for many consumers of <sp-tabs-overflow/>
element with this feature enabled by default.
Do you feel we can check for scroll direction and stop the vertical scroll into view coz we would only want to enable this for horizontal tab views?
Idk how we could stop the vertical scroll with the current scrollIntoView
implementation, from my knowledge you can not specify the direction using this method.
An alternative here is to use the scrollTabs
method from the Tabs
and specify the delta it needs to (horizontally) scroll if the selected tab is not into view.
Will be fixed in the next release by #4613
Code of conduct
Impacted component(s)
Tabs
Expected behavior
Preconditions:
Expected Behavior:
Actual behavior
Screenshots
https://spectrum.corp.adobe.com/page/action-bar/
https://github.com/adobe/spectrum-web-components/assets/1207520/5c81086e-2197-4b65-9c4d-45d8a2d8086f
What browsers are you seeing the problem in?
Chrome
How can we reproduce this issue?
https://studio.webcomponents.dev/edit/Sw2YyLG4GfgevvzkYbm8/src/index.ts?p=stories
Sample code that illustrates the problem
Logs taken while reproducing problem
No response