Skip to content

Commit

Permalink
DEVPROD-9665: Release sectioning beta (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
SupaJoon authored Sep 11, 2024
1 parent d9a8390 commit d43ba61
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -65,12 +64,10 @@ const DetailsMenuCard = forwardRef<HTMLDivElement, DetailsMenuProps>(
checked={jumpToFailingLineEnabled}
updateSettings={updateSettings}
/>
{releaseSectioning && (
<SectionsToggle
checked={sectionsEnabled}
updateSettings={updateSettings}
/>
)}
<SectionsToggle
checked={sectionsEnabled}
updateSettings={updateSettings}
/>
</Column>
</Row>
</Tab>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { GuideCue, GuideCueProps } from "@leafygreen-ui/guide-cue";
import { releaseSectioning } from "utils/featureFlag";
import { useSectionsFeatureDiscoveryContext } from ".";

export const JumpToFailingLineToggleGuideCue: React.FC<{
refEl: GuideCueProps["refEl"];
}> = ({ refEl }) => {
const { closeSecondGuideCue, secondGuideCueOpen, setSecondGuideCueOpen } =
useSectionsFeatureDiscoveryContext();
return releaseSectioning ? (
return (
<GuideCue
beaconAlign="right"
data-cy="sections-cue-2"
Expand All @@ -21,5 +20,5 @@ export const JumpToFailingLineToggleGuideCue: React.FC<{
Combined with sectioning, jump to failing line allows to streamline your
failure triage process.
</GuideCue>
) : null;
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand All @@ -18,7 +17,7 @@ const SectionsFeatureModal = () => {
const { sendEvent } = useSectionsFeatureDiscoveryAnalytics();
const { updateSettings } = useParsleySettings();

return releaseSectioning && isViewingTaskLog ? (
return isViewingTaskLog ? (
<StyledMarketingModal
buttonText="Enable sectioning"
data-cy="sections-feature-modal"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { GuideCue, GuideCueProps } from "@leafygreen-ui/guide-cue";
import { useSectionsFeatureDiscoveryContext } from "context/SectionsFeatureDiscoveryContext";
import { releaseSectioning } from "utils/featureFlag";

export const SectionsToggleGuideCue: React.FC<{
refEl: GuideCueProps["refEl"];
}> = ({ refEl }) => {
const { closeFirstGuideCue, firstGuideCueOpen, setFirstGuideCueOpen } =
useSectionsFeatureDiscoveryContext();
return releaseSectioning ? (
return (
<GuideCue
currentStep={1}
data-cy="sections-cue-1"
Expand All @@ -23,5 +22,5 @@ export const SectionsToggleGuideCue: React.FC<{
This beta feature is now available for task logs. Please send over any
feedback to the #ask-devprod-evergreen channel.
</GuideCue>
) : null;
);
};
2 changes: 0 additions & 2 deletions apps/parsley/src/hooks/useSections/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -61,7 +60,6 @@ export const useSections = ({
const { settings } = useParsleySettings();

const sectioningEnabled =
releaseSectioning &&
!!settings?.sectionsEnabled &&
logType === LogTypes.EVERGREEN_TASK_LOGS &&
renderingType === LogRenderingTypes.Default;
Expand Down
3 changes: 0 additions & 3 deletions apps/parsley/src/utils/featureFlag/index.ts

This file was deleted.

0 comments on commit d43ba61

Please sign in to comment.