-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat(Support status redirect): add status to support panel #42223
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b6d625c
add status to support panel
clr182 aa4544a
Merge branch 'master' into supportPanelStatusNtoification
clr182 677b91e
Update frontend/src/layout/navigation-3000/sidepanel/panels/SidePanel…
clr182 3cf66ce
Update frontend/src/layout/navigation-3000/sidepanel/panels/SidePanel…
clr182 2b6c4d9
remove button
clr182 efcda45
Merge branch 'master' into supportPanelStatusNtoification
abigailbramble 6557c0e
Merge branch 'master' into supportPanelStatusNtoification
clr182 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import { useActions, useValues } from 'kea' | ||
| import React from 'react' | ||
|
|
||
| import { IconFeatures, IconHelmet, IconMap } from '@posthog/icons' | ||
| import { IconFeatures, IconHelmet, IconMap, IconWarning } from '@posthog/icons' | ||
| import { LemonButton, Link } from '@posthog/lemon-ui' | ||
|
|
||
| import { SupportForm } from 'lib/components/Support/SupportForm' | ||
|
|
@@ -20,6 +20,8 @@ import { AvailableFeature, BillingFeatureType, BillingPlan, BillingType, SidePan | |
|
|
||
| import { SidePanelPaneHeader } from '../components/SidePanelPaneHeader' | ||
| import { sidePanelLogic } from '../sidePanelLogic' | ||
| import { sidePanelStatusIncidentIoLogic } from './sidePanelStatusIncidentIoLogic' | ||
| import { sidePanelStatusLogic } from './sidePanelStatusLogic' | ||
|
|
||
| const Section = ({ title, children }: { title: string; children: React.ReactNode }): React.ReactElement => { | ||
| return ( | ||
|
|
@@ -32,6 +34,59 @@ const Section = ({ title, children }: { title: string; children: React.ReactNode | |
| ) | ||
| } | ||
|
|
||
| const StatusPageAlert = (): JSX.Element | null => { | ||
| const { featureFlags } = useValues(featureFlagLogic) | ||
| const useIncidentIo = !!featureFlags[FEATURE_FLAGS.INCIDENT_IO_STATUS_PAGE] | ||
| const { openSidePanel } = useActions(sidePanelLogic) | ||
|
|
||
| const { status: atlassianStatus, statusPage } = useValues(sidePanelStatusLogic) | ||
| const { status: incidentIoStatus, statusDescription: incidentIoDescription } = | ||
| useValues(sidePanelStatusIncidentIoLogic) | ||
|
|
||
| const status = useIncidentIo ? incidentIoStatus : atlassianStatus | ||
|
|
||
| if (status === 'operational') { | ||
| return null | ||
| } | ||
|
|
||
| const description = useIncidentIo ? incidentIoDescription : statusPage?.status.description || 'Active incident' | ||
|
|
||
| const severityClass = status.includes('outage') | ||
| ? 'bg-danger-highlight border-danger' | ||
| : 'bg-warning-highlight border-warning' | ||
|
|
||
| return ( | ||
| <div className={`border rounded p-3 mb-3 ${severityClass}`}> | ||
| <div className="flex items-start gap-2"> | ||
| <IconWarning className="text-warning w-5 h-5 shrink-0 mt-0.5" /> | ||
| <div className="flex-1"> | ||
| <p className="font-semibold mb-1"> | ||
| <span | ||
| className="cursor-pointer text-link hover:underline" | ||
| onClick={() => openSidePanel(SidePanelTab.Status)} | ||
| > | ||
| {description} | ||
| </span> | ||
| </p> | ||
| <div className="text-sm"> | ||
| <p className="mb-1">We're aware of an issue that may be affecting your PostHog experience.</p> | ||
| <p className="mb-0"> | ||
| You may wish to check our{' '} | ||
| <span | ||
| className="cursor-pointer text-link hover:underline" | ||
| onClick={() => openSidePanel(SidePanelTab.Status)} | ||
| > | ||
| current status | ||
| </span>{' '} | ||
| before contacting support. | ||
| </p> | ||
| </div> | ||
|
Comment on lines
+60
to
+83
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could also be worth exploring the |
||
| </div> | ||
| </div> | ||
| </div> | ||
| ) | ||
| } | ||
|
|
||
| // In order to set these turn on the `support-message-override` feature flag. | ||
|
|
||
| //Support offsite messaging | ||
|
|
@@ -323,6 +378,7 @@ export function SidePanelSupport(): JSX.Element { | |
|
|
||
| {showEmailSupport && isBillingLoaded && ( | ||
| <Section title="Contact us"> | ||
| <StatusPageAlert /> | ||
| <p>Can't find what you need and PostHog AI unable to help?</p> | ||
| <LemonButton | ||
| type="secondary" | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.