Skip to content

Commit

Permalink
DEVPROD-11251: Fix jumpy first guidcue during sectioning discovery fl…
Browse files Browse the repository at this point in the history
…ow (#378)
  • Loading branch information
SupaJoon authored Sep 12, 2024
1 parent 6d55e64 commit 22fe953
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useEffect, useState } from "react";
import { GuideCue, GuideCueProps } from "@leafygreen-ui/guide-cue";
import { useSectionsFeatureDiscoveryContext } from "context/SectionsFeatureDiscoveryContext";

Expand All @@ -6,13 +7,23 @@ export const SectionsToggleGuideCue: React.FC<{
}> = ({ refEl }) => {
const { closeFirstGuideCue, firstGuideCueOpen, setFirstGuideCueOpen } =
useSectionsFeatureDiscoveryContext();
const [open, setOpen] = useState(false);
useEffect(() => {
if (firstGuideCueOpen) {
const timeoutId = setTimeout(() => {
setOpen(true);
}, 200);
return () => clearTimeout(timeoutId);
}
setOpen(false);
}, [firstGuideCueOpen]);
return (
<GuideCue
currentStep={1}
data-cy="sections-cue-1"
numberOfSteps={1}
onPrimaryButtonClick={closeFirstGuideCue}
open={firstGuideCueOpen}
open={open}
refEl={refEl}
setOpen={setFirstGuideCueOpen}
title="Opt-In to Sectioned Task Logs"
Expand Down
36 changes: 35 additions & 1 deletion apps/parsley/src/gql/generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -837,14 +837,48 @@ export type HostEventLogData = {
export type HostEventLogEntry = {
__typename?: "HostEventLogEntry";
data: HostEventLogData;
eventType?: Maybe<Scalars["String"]["output"]>;
eventType?: Maybe<HostEventType>;
id: Scalars["String"]["output"];
processedAt: Scalars["Time"]["output"];
resourceId: Scalars["String"]["output"];
resourceType: Scalars["String"]["output"];
timestamp?: Maybe<Scalars["Time"]["output"]>;
};

export enum HostEventType {
HostAgentDeployed = "HOST_AGENT_DEPLOYED",
HostAgentDeployFailed = "HOST_AGENT_DEPLOY_FAILED",
HostAgentMonitorDeployed = "HOST_AGENT_MONITOR_DEPLOYED",
HostAgentMonitorDeployFailed = "HOST_AGENT_MONITOR_DEPLOY_FAILED",
HostConvertedProvisioning = "HOST_CONVERTED_PROVISIONING",
HostConvertingProvisioning = "HOST_CONVERTING_PROVISIONING",
HostConvertingProvisioningError = "HOST_CONVERTING_PROVISIONING_ERROR",
HostCreated = "HOST_CREATED",
HostCreatedError = "HOST_CREATED_ERROR",
HostDnsNameSet = "HOST_DNS_NAME_SET",
HostExpirationWarningSent = "HOST_EXPIRATION_WARNING_SENT",
HostIdleNotification = "HOST_IDLE_NOTIFICATION",
HostJasperRestarted = "HOST_JASPER_RESTARTED",
HostJasperRestarting = "HOST_JASPER_RESTARTING",
HostJasperRestartError = "HOST_JASPER_RESTART_ERROR",
HostModified = "HOST_MODIFIED",
HostProvisioned = "HOST_PROVISIONED",
HostProvisionError = "HOST_PROVISION_ERROR",
HostProvisionFailed = "HOST_PROVISION_FAILED",
HostRunningTaskCleared = "HOST_RUNNING_TASK_CLEARED",
HostRunningTaskSet = "HOST_RUNNING_TASK_SET",
HostScriptExecuted = "HOST_SCRIPT_EXECUTED",
HostScriptExecuteFailed = "HOST_SCRIPT_EXECUTE_FAILED",
HostStarted = "HOST_STARTED",
HostStatusChanged = "HOST_STATUS_CHANGED",
HostStopped = "HOST_STOPPED",
HostTaskFinished = "HOST_TASK_FINISHED",
HostTemporaryExemptionExpirationWarningSent = "HOST_TEMPORARY_EXEMPTION_EXPIRATION_WARNING_SENT",
HostTerminatedExternally = "HOST_TERMINATED_EXTERNALLY",
VolumeExpirationWarningSent = "VOLUME_EXPIRATION_WARNING_SENT",
VolumeMigrationFailed = "VOLUME_MIGRATION_FAILED",
}

/**
* HostEvents is the return value for the hostEvents query.
* It contains the event log entries for a given host.
Expand Down

0 comments on commit 22fe953

Please sign in to comment.