Skip to content

feat(tabs): scroll in paginated tabs (#DS-4259) - #1976

Open
NikGurev wants to merge 2 commits into
mainfrom
feat/DS-4259
Open

feat(tabs): scroll in paginated tabs (#DS-4259)#1976
NikGurev wants to merge 2 commits into
mainfrom
feat/DS-4259

Conversation

@NikGurev

@NikGurev NikGurev commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

ScrollDistance уже вычисляется. Поверх него добавлена логика скролл для табов с пагинацией:

  • скролл тачпадом
  • Shift scroll мышкой
  • Драг скролл с инерцией

Добавлен абзац с описанием поведения, примеры не менял

@NikGurev NikGurev self-assigned this Sep 2, 2026
@NikGurev NikGurev added the enhancement New feature or request label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 7790f0f):

https://koobiq-next--prs-1976-kcd63s4z.web.app

(expires Sat, 05 Sep 2026 14:03:53 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c

@NikGurev
NikGurev marked this pull request as ready for review September 2, 2026 14:04
@artembelik
artembelik requested a balanced review from Copilot September 3, 2026 07:28
@artembelik

Copy link
Copy Markdown
Contributor

добавление вертикальных табов немного поплыло, мб не в рамках данной фичи
image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The change introduces intricate gesture handling (drag inertia, click suppression, RTL sign flips, global document listeners, and lingering transition/suppression state) whose interaction edge cases warrant human review.

Pull request overview

This PR adds pointer/wheel-driven scrolling to the horizontal paginated tab header (KbqPaginatedTabHeader), on top of the existing pagination-arrow scrolling. Users can now reach overflowed tabs via touchpad horizontal swipe, Shift + mouse wheel, and mouse/pen click-and-drag with release inertia. The logic runs outside Angular for performance, bypasses the expensive scrollDistance setter during continuous updates (writing _scrollDistance directly and updating arrow state without a reflow), suppresses the CSS transition during drags/wheel bursts, and suppresses the trailing click after a drag so it doesn't select a tab.

Changes:

  • Added wheel handling (touchpad/Shift+wheel) with deltaMode normalization and page-scroll suppression via a non-passive listener.
  • Added drag scrolling with a movement threshold, velocity-based inertia projection, drag/no-transition CSS classes, grab/grabbing cursors, and click suppression.
  • Added burst-snap handling for rapid selection changes, plus unit tests and EN/RU docs describing the new gestures.
File summaries
File Description
packages/components/tabs/paginated-tab-header.ts Core wheel/drag/inertia scrolling logic, listeners, transition/click suppression, and clamp helper.
packages/components/tabs/tab-header.html / tab-nav-bar.html Add kbq-tab-header__scroll-container class to the tab list container.
packages/components/tabs/tab-header.scss / tab-nav-bar.scss Add kbq-tab-list_no-transition rule to disable the transition during continuous scroll.
packages/components/tabs/_tabs-common.scss Add grab/grabbing cursor styling for the scroll container.
packages/components/tabs/tab-header.spec.ts / tab-nav-bar.spec.ts Tests for arrow dimming, wheel scrolling, and drag/inertia/click-suppression.
packages/components/tabs/tabs.en.md / tabs.ru.md Document the new touchpad/Shift-wheel/drag interactions.
Review details
  • Files reviewed: 10/10 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +827 to +828
this.tabListContainer.nativeElement.classList.remove(DRAGGING_CLASS);
this.dragState = null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants