Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<dialog #searchDialog>
<dialog #searchDialog id="docsSearchDialog">
<div class="docs-search-container" (docsClickOutside)="closeSearchDialog()">
<docs-text-field
[autofocus]="true"
Expand Down
1 change: 1 addition & 0 deletions adev/src/app/core/constants/element-ids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@

export const PRIMARY_NAV_ID = 'primaryNav';
export const SECONDARY_NAV_ID = 'secondaryNav';
export const SEARCH_DIALOG_ID = 'docsSearchDialog';
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[attr.id]="PRIMARY_NAV_ID"
class="wrapper"
(docsClickOutside)="closeMobileNav()"
[docsClickOutsideIgnore]="[SECONDARY_NAV_ID]"
[docsClickOutsideIgnore]="[SECONDARY_NAV_ID, SEARCH_DIALOG_ID]"
>
<!-- Mobile nav bar -->
<div class="adev-mobile-nav-bar">
Expand Down
3 changes: 2 additions & 1 deletion adev/src/app/core/layout/navigation/navigation.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import {NavigationEnd, Router, RouterLink} from '@angular/router';
import {filter, map, startWith} from 'rxjs/operators';
import {DOCS_ROUTES, REFERENCE_ROUTES, TUTORIALS_ROUTES} from '../../../routing/routes';
import {PRIMARY_NAV_ID, SECONDARY_NAV_ID} from '../../constants/element-ids';
import {PRIMARY_NAV_ID, SEARCH_DIALOG_ID, SECONDARY_NAV_ID} from '../../constants/element-ids';
import {COMMAND, CONTROL, SEARCH_TRIGGER_KEY} from '../../constants/keys';
import {ANGULAR_LINKS} from '../../constants/links';
import {PAGE_PREFIX} from '../../constants/pages';
Expand Down Expand Up @@ -52,6 +52,7 @@ export class Navigation {
protected ngLinks = ANGULAR_LINKS;
protected readonly PRIMARY_NAV_ID = PRIMARY_NAV_ID;
protected readonly SECONDARY_NAV_ID = SECONDARY_NAV_ID;
protected readonly SEARCH_DIALOG_ID = SEARCH_DIALOG_ID;

// We can't use the ActivatedRouter queryParams as we're outside the router outlet
protected readonly isUwu = 'location' in globalThis ? location.search.includes('uwu') : false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="adev-secondary-nav-mask"
[class.docs-nav-secondary--open]="isSecondaryNavVisible()"
(docsClickOutside)="close()"
[docsClickOutsideIgnore]="[PRIMARY_NAV_ID]"
[docsClickOutsideIgnore]="[PRIMARY_NAV_ID, SEARCH_DIALOG_ID]"
>
<div
class="docs-nav-secondary docs-scroll-track-transparent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
import {ActivatedRouteSnapshot, NavigationEnd, Router, RouterStateSnapshot} from '@angular/router';
import {distinctUntilChanged, filter, map, skip, startWith} from 'rxjs/operators';
import {SUB_NAVIGATION_DATA} from '../../../routing/sub-navigation-data';
import {PRIMARY_NAV_ID, SECONDARY_NAV_ID} from '../../constants/element-ids';
import {PRIMARY_NAV_ID, SEARCH_DIALOG_ID, SECONDARY_NAV_ID} from '../../constants/element-ids';
import {PAGE_PREFIX} from '../../constants/pages';

export const ANIMATION_DURATION = 500;
Expand Down Expand Up @@ -57,6 +57,7 @@ export class SecondaryNavigation {

protected readonly PRIMARY_NAV_ID = PRIMARY_NAV_ID;
protected readonly SECONDARY_NAV_ID = SECONDARY_NAV_ID;
protected readonly SEARCH_DIALOG_ID = SEARCH_DIALOG_ID;

private readonly routeMap: Record<string, NavigationItem[]> = {
[PAGE_PREFIX.REFERENCE]: getNavigationItemsTree(SUB_NAVIGATION_DATA.reference, (tree) =>
Expand Down
Loading