From d43ba61cf37c842fb53847296e2396aa1236bbd9 Mon Sep 17 00:00:00 2001 From: SupaJoon Date: Wed, 11 Sep 2024 08:56:06 -0400 Subject: [PATCH] DEVPROD-9665: Release sectioning beta (#371) --- .../components/DetailsMenu/DetailsMenuCard/index.tsx | 11 ++++------- .../JumpToFailingLineToggleGuideCue.tsx | 5 ++--- .../SectionsFeatureModal/index.tsx | 3 +-- .../SectionsToggleGuideCue.tsx | 5 ++--- apps/parsley/src/hooks/useSections/index.ts | 2 -- apps/parsley/src/utils/featureFlag/index.ts | 3 --- 6 files changed, 9 insertions(+), 20 deletions(-) delete mode 100644 apps/parsley/src/utils/featureFlag/index.ts diff --git a/apps/parsley/src/components/DetailsMenu/DetailsMenuCard/index.tsx b/apps/parsley/src/components/DetailsMenu/DetailsMenuCard/index.tsx index 874de8ca7..806b1fe45 100644 --- a/apps/parsley/src/components/DetailsMenu/DetailsMenuCard/index.tsx +++ b/apps/parsley/src/components/DetailsMenu/DetailsMenuCard/index.tsx @@ -5,7 +5,6 @@ import { H3 } from "@leafygreen-ui/typography"; import { size } from "constants/tokens"; import { useSectionsFeatureDiscoveryContext } from "context/SectionsFeatureDiscoveryContext"; import { useParsleySettings } from "hooks/useParsleySettings"; -import { releaseSectioning } from "utils/featureFlag"; import ButtonRow from "./ButtonRow"; import SearchRangeInput from "./SearchRangeInput"; import { @@ -65,12 +64,10 @@ const DetailsMenuCard = forwardRef( checked={jumpToFailingLineEnabled} updateSettings={updateSettings} /> - {releaseSectioning && ( - - )} + diff --git a/apps/parsley/src/context/SectionsFeatureDiscoveryContext/JumpToFailingLineToggleGuideCue.tsx b/apps/parsley/src/context/SectionsFeatureDiscoveryContext/JumpToFailingLineToggleGuideCue.tsx index 119add894..8eaedbc05 100644 --- a/apps/parsley/src/context/SectionsFeatureDiscoveryContext/JumpToFailingLineToggleGuideCue.tsx +++ b/apps/parsley/src/context/SectionsFeatureDiscoveryContext/JumpToFailingLineToggleGuideCue.tsx @@ -1,5 +1,4 @@ import { GuideCue, GuideCueProps } from "@leafygreen-ui/guide-cue"; -import { releaseSectioning } from "utils/featureFlag"; import { useSectionsFeatureDiscoveryContext } from "."; export const JumpToFailingLineToggleGuideCue: React.FC<{ @@ -7,7 +6,7 @@ export const JumpToFailingLineToggleGuideCue: React.FC<{ }> = ({ refEl }) => { const { closeSecondGuideCue, secondGuideCueOpen, setSecondGuideCueOpen } = useSectionsFeatureDiscoveryContext(); - return releaseSectioning ? ( + return ( - ) : null; + ); }; diff --git a/apps/parsley/src/context/SectionsFeatureDiscoveryContext/SectionsFeatureModal/index.tsx b/apps/parsley/src/context/SectionsFeatureDiscoveryContext/SectionsFeatureModal/index.tsx index 1e0a9f394..6f80eefb6 100644 --- a/apps/parsley/src/context/SectionsFeatureDiscoveryContext/SectionsFeatureModal/index.tsx +++ b/apps/parsley/src/context/SectionsFeatureDiscoveryContext/SectionsFeatureModal/index.tsx @@ -6,7 +6,6 @@ import { zIndex } from "constants/tokens"; import { useLogContext } from "context/LogContext"; import { useSectionsFeatureDiscoveryContext } from "context/SectionsFeatureDiscoveryContext"; import { useParsleySettings } from "hooks/useParsleySettings"; -import { releaseSectioning } from "utils/featureFlag"; import { graphic } from "./graphic"; const SectionsFeatureModal = () => { @@ -18,7 +17,7 @@ const SectionsFeatureModal = () => { const { sendEvent } = useSectionsFeatureDiscoveryAnalytics(); const { updateSettings } = useParsleySettings(); - return releaseSectioning && isViewingTaskLog ? ( + return isViewingTaskLog ? ( = ({ refEl }) => { const { closeFirstGuideCue, firstGuideCueOpen, setFirstGuideCueOpen } = useSectionsFeatureDiscoveryContext(); - return releaseSectioning ? ( + return ( - ) : null; + ); }; diff --git a/apps/parsley/src/hooks/useSections/index.ts b/apps/parsley/src/hooks/useSections/index.ts index 462054cdb..cb05d91e2 100644 --- a/apps/parsley/src/hooks/useSections/index.ts +++ b/apps/parsley/src/hooks/useSections/index.ts @@ -3,7 +3,6 @@ import { LogRenderingTypes, LogTypes } from "constants/enums"; import { useToastContext } from "context/toast"; import { useParsleySettings } from "hooks/useParsleySettings"; import { reportError } from "utils/errorReporting"; -import { releaseSectioning } from "utils/featureFlag"; import { SectionData, getOpenSectionStateBasedOnLineNumbers, @@ -61,7 +60,6 @@ export const useSections = ({ const { settings } = useParsleySettings(); const sectioningEnabled = - releaseSectioning && !!settings?.sectionsEnabled && logType === LogTypes.EVERGREEN_TASK_LOGS && renderingType === LogRenderingTypes.Default; diff --git a/apps/parsley/src/utils/featureFlag/index.ts b/apps/parsley/src/utils/featureFlag/index.ts deleted file mode 100644 index 82b108fee..000000000 --- a/apps/parsley/src/utils/featureFlag/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { isProduction } from "utils/environmentVariables"; - -export const releaseSectioning = !isProduction();