Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Hub - DQA - Mobile Nav #2270

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/admin-views/help-hub.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$hub_tabs = [
[
'target' => 'tec-help-tab',
'class' => 'tec-nav__tab--subnav-active',
'class' => 'tec-nav__tab--active',
'label' => __( 'Support Hub', 'the-events-calendar' ),
'id' => 'tec-help-tab',
'template' => 'help-hub/support/support-hub',
Expand Down
6 changes: 3 additions & 3 deletions src/resources/js/admin/help-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ tribe.helpPage = tribe.helpPage || {};
} );

// Find the currently active tab and corresponding container.
let currentTab = document.querySelector( '.tec-nav__tab.tec-nav__tab--subnav-active' );
let currentTab = document.querySelector( '.tec-nav__tab.tec-nav__tab--active' );
let tabContainer = currentTab ? document.getElementById( currentTab.getAttribute( 'data-tab-target' ) ) : null;

// Update modal button span text to the active tab’s text by default.
Expand Down Expand Up @@ -317,11 +317,11 @@ tribe.helpPage = tribe.helpPage || {};
*/
obj.updateActiveTab = (tabs, target) => {
// Remove the active class from all tabs
tabs.forEach((t) => t.classList.remove('tec-nav__tab--subnav-active'));
tabs.forEach((t) => t.classList.remove('tec-nav__tab--active'));

// Find and activate all tabs with the same data-tab-target
document.querySelectorAll(`[data-tab-target="${target}"]`).forEach((matchingTab) => {
matchingTab.classList.add('tec-nav__tab--subnav-active');
matchingTab.classList.add('tec-nav__tab--active');
});
};

Expand Down
4 changes: 4 additions & 0 deletions src/resources/postcss/help-hub.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ ul.tec-help-list__list-expanded {
display: block;
}

.tribe_events_page_tec-events-settings .tribe_settings.wrap .tec-nav__modal-controls {
margin-top: var(--tec-spacer-3);
}

@media (--viewport-xsmall) {
.tec-tab-container {
padding: var(--tec-spacer-7);
Expand Down
Loading