Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.
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
7 changes: 0 additions & 7 deletions docs/components/api/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ export default class ApiSearch extends React.Component {
// perform these functions when the users selects a menu item
handleResultClick = (selection) => {
try {
// track click so we can guage usage of this feature
if (window && window.analytics) {
analytics.track('Searched GL JS API Reference', {
query: this.state.filter,
clicked: selection.path
});
}
// open selection in current window
routeTo(selection.path);
// clear search
Expand Down
103 changes: 48 additions & 55 deletions docs/components/page-shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
// docs-page-shell
import ReactPageShell from '../../vendor/docs-page-shell/react-page-shell.js';
// dr-ui components
import AnalyticsShell from '@mapbox/dr-ui/analytics-shell';
import PageLayout from '@mapbox/dr-ui/page-layout';
import { buildMeta, findParentPath } from '@mapbox/dr-ui/page-layout/utils';
// site variables
Expand All @@ -13,7 +12,6 @@ import { withLocation } from '@mapbox/batfish/modules/with-location';
// dataSelectors
import navigation from '@mapbox/batfish/data/navigation';
import filters from '@mapbox/batfish/data/filters';
import mbxMeta from '@mapbox/batfish/data/mbx-meta';
import apiNavigation from '@mapbox/batfish/data/api-navigation';

import { styleSpecNavigation } from '../data/style-spec-navigation';
Expand Down Expand Up @@ -108,62 +106,57 @@ class PageShell extends React.Component {
meta={meta}
darkHeaderText={true}
>
<AnalyticsShell
mbxMetadata={mbxMeta[this.props.location.pathname]}
<PageLayout
domain={{
title: 'MapLibre',
path: 'https://maplibre.org/'
}}
hideSearch={true}
location={location}
frontMatter={{
...frontMatter,
...(frontMatter.overviewHeader && {
overviewHeader: {
...frontMatter.overviewHeader,
version: isStyleSpec
? styleSpecVersion
: version,
...(frontMatter.overviewHeader.image && {
image: (
<div className="overview-header-browser mb6">
<Browser>
<AppropriateImage
imageId={
frontMatter
.overviewHeader
.image
}
alt=""
className="hmax300"
/>
</Browser>
</div>
)
})
}
}),
headings: this.renderCustomHeadings()
}}
constants={constants}
navigation={navigation}
filters={filters}
AppropriateImage={AppropriateImage}
// use custom sidebar for API and Style Spec since this data needs to be generated
customAside={this.renderCustomAside()}
>
<PageLayout
domain={{
title: 'MapLibre',
path: 'https://maplibre.org/'
}}
hideSearch={true}
location={location}
frontMatter={{
...frontMatter,
...(frontMatter.overviewHeader && {
overviewHeader: {
...frontMatter.overviewHeader,
version: isStyleSpec
? styleSpecVersion
: version,
...(frontMatter.overviewHeader.image && {
image: (
<div className="overview-header-browser mb6">
<Browser>
<AppropriateImage
imageId={
frontMatter
.overviewHeader
.image
}
alt=""
className="hmax300"
/>
</Browser>
</div>
)
})
}
}),
headings: this.renderCustomHeadings()
}}
constants={constants}
navigation={navigation}
filters={filters}
AppropriateImage={AppropriateImage}
// use custom sidebar for API and Style Spec since this data needs to be generated
customAside={this.renderCustomAside()}
<div
className={classnames('', {
'style-spec-page': isStyleSpec
})}
>
<div
className={classnames('', {
'style-spec-page': isStyleSpec
})}
>
{children}
</div>
</PageLayout>
</AnalyticsShell>
{children}
</div>
</PageLayout>
</ReactPageShell>
);
}
Expand Down