From 18acb16977415d7315868e38b86169eed633df67 Mon Sep 17 00:00:00 2001 From: Tyler Dane Date: Mon, 13 Oct 2025 16:09:40 -0500 Subject: [PATCH 1/3] feat(web): add Flask icon and beta button functionality to sidebar --- packages/web/src/App.tsx | 2 ++ packages/web/src/common/constants/posthog.constants.ts | 1 + packages/web/src/components/Icons/Flask.tsx | 7 +++++++ .../components/Sidebar/SidebarIconRow/SidebarIconRow.tsx | 8 ++++++++ .../views/Calendar/components/TodayButton/TodayButton.tsx | 5 +++++ 5 files changed, 23 insertions(+) create mode 100644 packages/web/src/common/constants/posthog.constants.ts create mode 100644 packages/web/src/components/Icons/Flask.tsx diff --git a/packages/web/src/App.tsx b/packages/web/src/App.tsx index b7433578c..88f7b3cdc 100644 --- a/packages/web/src/App.tsx +++ b/packages/web/src/App.tsx @@ -76,6 +76,8 @@ export const App = () => { capture_unhandled_rejections: true, capture_console_errors: true, }, + opt_in_site_apps: true, + person_profiles: "always", }} > {wrappedChildren} diff --git a/packages/web/src/common/constants/posthog.constants.ts b/packages/web/src/common/constants/posthog.constants.ts new file mode 100644 index 000000000..f79f8bf11 --- /dev/null +++ b/packages/web/src/common/constants/posthog.constants.ts @@ -0,0 +1 @@ +export const PH_ID_BETA_BUTTON = "beta-button"; diff --git a/packages/web/src/components/Icons/Flask.tsx b/packages/web/src/components/Icons/Flask.tsx new file mode 100644 index 000000000..a78434759 --- /dev/null +++ b/packages/web/src/components/Icons/Flask.tsx @@ -0,0 +1,7 @@ +import styled from "styled-components"; +import { Flask } from "@phosphor-icons/react"; +import { iconStyles } from "./styled"; + +export const FlaskIcon = styled(Flask)` + ${iconStyles} +`; diff --git a/packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx b/packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx index 38ac13b38..495288c11 100644 --- a/packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx +++ b/packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx @@ -1,8 +1,10 @@ import React from "react"; +import { PH_ID_BETA_BUTTON } from "@web/common/constants/posthog.constants"; import { theme } from "@web/common/styles/theme"; import { getMetaKey } from "@web/common/utils/shortcut/shortcut.util"; import { CalendarIcon } from "@web/components/Icons/Calendar"; import { CommandIcon } from "@web/components/Icons/Command"; +import { FlaskIcon } from "@web/components/Icons/Flask"; import { SpinnerIcon } from "@web/components/Icons/Spinner"; import { TodoIcon } from "@web/components/Icons/Todo"; import { Text } from "@web/components/Text"; @@ -82,6 +84,12 @@ export const SidebarIconRow = () => { } /> + + + {gCalImport.importing ? ( diff --git a/packages/web/src/views/Calendar/components/TodayButton/TodayButton.tsx b/packages/web/src/views/Calendar/components/TodayButton/TodayButton.tsx index dbfb868db..ee3e8a296 100644 --- a/packages/web/src/views/Calendar/components/TodayButton/TodayButton.tsx +++ b/packages/web/src/views/Calendar/components/TodayButton/TodayButton.tsx @@ -1,6 +1,11 @@ +import { useFeatureFlagEnabled } from "posthog-js/react"; import React from "react"; import { StyledTodayButton } from "./styled"; export const TodayButton = () => { + const isPlannerEnabled = useFeatureFlagEnabled("experiment_planner"); + + isPlannerEnabled && console.log("planner enabled"); + return Today; }; From ee339283099c75fc229008abc143d5970d98f9ff Mon Sep 17 00:00:00 2001 From: Tyler Dane Date: Mon, 13 Oct 2025 16:12:50 -0500 Subject: [PATCH 2/3] fix(web): hide PostHog beta feature button to avoid duplication --- packages/web/src/components/GlobalStyle/styled.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/web/src/components/GlobalStyle/styled.ts b/packages/web/src/components/GlobalStyle/styled.ts index dce6ecdb2..7e25c10e2 100644 --- a/packages/web/src/components/GlobalStyle/styled.ts +++ b/packages/web/src/components/GlobalStyle/styled.ts @@ -41,4 +41,12 @@ export const GlobalStyle = createGlobalStyle` background-color: ${theme.color.panel.scrollbarActive}; } } + + /* Hide PostHog beta feature button + Posthog adds this by default, but we're using our + own beta feature button, so we don't need both + */ + .beta-feature-button { + visibility: hidden !important; + } `; From 78e2a451b275fce368821f3b26cbda301c6ef526 Mon Sep 17 00:00:00 2001 From: Tyler Dane Date: Mon, 13 Oct 2025 17:18:11 -0500 Subject: [PATCH 3/3] fix(web): update beta button identifier and remove redundant styles --- packages/web/src/common/constants/posthog.constants.ts | 2 +- packages/web/src/components/GlobalStyle/styled.ts | 10 +--------- .../Sidebar/SidebarIconRow/SidebarIconRow.tsx | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/packages/web/src/common/constants/posthog.constants.ts b/packages/web/src/common/constants/posthog.constants.ts index f79f8bf11..a98b5320c 100644 --- a/packages/web/src/common/constants/posthog.constants.ts +++ b/packages/web/src/common/constants/posthog.constants.ts @@ -1 +1 @@ -export const PH_ID_BETA_BUTTON = "beta-button"; +export const PH_ID_BETA_BUTTON = "early-access-button"; // this needs to match the id of the button in the PostHog dashboard diff --git a/packages/web/src/components/GlobalStyle/styled.ts b/packages/web/src/components/GlobalStyle/styled.ts index 7e25c10e2..1c89cbe93 100644 --- a/packages/web/src/components/GlobalStyle/styled.ts +++ b/packages/web/src/components/GlobalStyle/styled.ts @@ -41,12 +41,4 @@ export const GlobalStyle = createGlobalStyle` background-color: ${theme.color.panel.scrollbarActive}; } } - - /* Hide PostHog beta feature button - Posthog adds this by default, but we're using our - own beta feature button, so we don't need both - */ - .beta-feature-button { - visibility: hidden !important; - } -`; + `; diff --git a/packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx b/packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx index 495288c11..fbbf19818 100644 --- a/packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx +++ b/packages/web/src/views/Calendar/components/Sidebar/SidebarIconRow/SidebarIconRow.tsx @@ -84,7 +84,7 @@ export const SidebarIconRow = () => { } /> - +