Skip to content

Commit

Permalink
Fix mobile experience
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Jan 30, 2024
1 parent ba74d97 commit c1d1317
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions frontend/src/layout/navigation-3000/navigationLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
props({} as { inputElement?: HTMLInputElement | null }),
connect(() => ({
values: [sceneLogic, ['sceneConfig'], navigationLogic, ['mobileLayout'], teamLogic, ['currentTeam']],
actions: [navigationLogic, ['closeAccountPopover']],
})),
actions({
hideSidebar: true,
Expand Down Expand Up @@ -133,6 +134,7 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
{
showNavOnMobile: () => true,
hideNavOnMobile: () => false,
closeAccountPopover: () => false,
},
],
isSidebarKeyboardShortcutAcknowledged: [
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/layout/navigation/TopBar/AccountPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ export function AccountPopoverOverlay(): JSX.Element {
const { user, otherOrganizations } = useValues(userLogic)
const { currentOrganization } = useValues(organizationLogic)
const { preflight } = useValues(preflightLogic)
const { mobileLayout } = useValues(navigationLogic)
const { closeAccountPopover } = useActions(navigationLogic)
const { billing } = useValues(billingLogic)
const { openSidePanel } = useActions(sidePanelStateLogic)
Expand Down Expand Up @@ -225,9 +226,11 @@ export function AccountPopoverOverlay(): JSX.Element {
<LemonButton
to="https://posthog.com/changelog"
onClick={(e) => {
e.preventDefault()
closeAccountPopover()
openSidePanel(SidePanelTab.Docs, '/changelog')
if (!mobileLayout) {
e.preventDefault()
openSidePanel(SidePanelTab.Docs, '/changelog')
}
}}
icon={<IconLive />}
fullWidth
Expand Down

0 comments on commit c1d1317

Please sign in to comment.