Skip to content

Conversation

@LayaTaal
Copy link
Contributor

@LayaTaal LayaTaal commented Jan 19, 2026

What does this do/fix?

When a vertical tab is clicked on mobile, the viewport now scrolls to show the selected tab at the top. It also takes into consideration prefers-reduced-motion when animating in.

QA

Links to relevant issues

Screenshots/video:

Pull request checklist

  • I've added a changelog entry for these changes.
  • I've linked to a relevant Jira issue.
  • I've captured a screenshot or screencast of the changes and linked it above.

When a vertical tab is clicked on mobile, the viewport now scrolls
to show the selected tab at the top. Added scroll-margin-top to
account for the sticky header.
@LayaTaal LayaTaal self-assigned this Jan 19, 2026
@LayaTaal LayaTaal marked this pull request as ready for review January 21, 2026 17:03
@LayaTaal LayaTaal requested a review from Copilot January 21, 2026 17:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements automatic scrolling functionality for vertical tabs on mobile devices. When a tab is selected, the viewport smoothly scrolls to bring that tab into view at the top of the screen, while respecting user accessibility preferences for reduced motion.

Changes:

  • Added CSS scroll margin to account for sticky header positioning on mobile
  • Implemented JavaScript scroll behavior that activates only on mobile when tabs merge
  • Updated changelog to document the fix

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
wp-content/themes/core/blocks/tribe/vertical-tabs/style.pcss Adds scroll-margin-top for mobile to account for sticky header height
wp-content/themes/core/assets/js/utils/tabs.js Implements scrollIntoView behavior on mobile with reduced motion support
CHANGELOG.md Documents the fix for vertical tabs scrolling behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@GeoffDusome GeoffDusome left a comment

Choose a reason for hiding this comment

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

🟢 Looks good to me; I think we initially had it this way but we removed it for some reason.

@LayaTaal LayaTaal added the Launch Environment Deploys to dokku label Jan 22, 2026
Copy link
Collaborator

@dpellenwood dpellenwood left a comment

Choose a reason for hiding this comment

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

📗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants