Skip to content

Commit

Permalink
Add support page events. Bump font size in support section.
Browse files Browse the repository at this point in the history
  • Loading branch information
frostyfan109 committed Sep 18, 2023
1 parent d169bd1 commit d4deb77
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/contexts/analytics-context/events/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as WorkspaceEvents from './workspace-events';
import * as SearchEvents from './search-events';
import * as SupportEvents from './support-events';
import * as RoutingEvents from './routing-events';
import * as MiscEvents from './misc-events';

Expand All @@ -12,6 +13,7 @@ export function AnalyticsEvents(analytics) {
...RoutingEvents,
...WorkspaceEvents,
...SearchEvents,
...SupportEvents,
...MiscEvents
}).map(
// Bind each event function to `AnalyticsEvents` to make `this.analytics` available.
Expand Down
6 changes: 6 additions & 0 deletions src/contexts/analytics-context/events/support-events.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function helpPortalOpened() {
this.analytics.trackEvent({
category: "ui_interaction",
action: "support_help_portal_open"
});
}
22 changes: 19 additions & 3 deletions src/views/support.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Fragment, useEffect } from 'react'
import { Typography } from 'antd'
import { useEnvironment } from '../contexts'
import { useAnalytics, useEnvironment } from '../contexts'
import { useTitle } from './'

const { Title } = Typography
Expand All @@ -27,13 +27,26 @@ const Documentation = () =>
</ul>
</Fragment>

const HEALSupport = () =>
const HEALSupport = () => {
const { analyticsEvents } = useAnalytics()
return (
<Fragment>
<Title level={1}>Need Help?</Title>
<div style={{ fontSize: 15 }}>
<Typography>To report a bug, request technical assistance, submit user feedback, or submit a different request, visit our Help Portal.</Typography>
<ul>
<li><a href="http://bit.ly/HEALSemanticSearch_Help" target="_blank" rel="noopener noreferrer"><b>Help Portal</b></a></li>
<li>
<a
href="http://bit.ly/HEALSemanticSearch_Help"
target="_blank"
rel="noopener noreferrer"
onClick={ () => {
analyticsEvents.helpPortalOpened()
} }
>
<b>Help Portal</b>
</a>
</li>
</ul>
</div>

Expand All @@ -44,11 +57,14 @@ const HEALSupport = () =>
We encourage you to get started with these introductory materials.
</Typography>
<ul>
{/* ADD analytics here when complete. */}
<li><b>User Guide</b> (in development)</li>
<li><b>FAQs</b> (in development)</li>
</ul>
</div>
</Fragment>
)
}

export const SupportView = () => {
const { context } = useEnvironment()
Expand Down

0 comments on commit d4deb77

Please sign in to comment.