Skip to content

Commit

Permalink
fix for mr michael
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Oct 27, 2022
1 parent d0c8a92 commit c0f35b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -406,14 +406,19 @@ const EventDetailsComponent: React.FC<Props> = ({
[tabs, selectedTabId]
);

const tourAnchor = useMemo(
() => (isTourAnchor ? { 'tour-step': getTourAnchor(3, SecurityStepId.alertsCases) } : {}),
[isTourAnchor]
);

return (
<GuidedOnboardingTourStep
isTourAnchor={isTourAnchor}
step={3}
stepId={SecurityStepId.alertsCases}
>
<StyledEuiTabbedContent
{...(isTourAnchor ? { 'tour-step': getTourAnchor(3, SecurityStepId.alertsCases) } : {})}
{...tourAnchor}
data-test-subj="eventDetails"
tabs={tabs}
selectedTab={selectedTab}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import React, { useMemo } from 'react';
import React, { useCallback, useMemo } from 'react';

import type { EuiTourStepProps } from '@elastic/eui';
import { EuiButton, EuiImage, EuiSpacer, EuiText, EuiTourStep } from '@elastic/eui';
Expand All @@ -25,6 +25,7 @@ export const SecurityTourStep = ({ children, step, stepId }: SecurityTourStep) =
() => securityTourConfig[stepId].find((config) => config.step === step),
[step, stepId]
);
const onClick = useCallback(() => incrementStep(stepId), [incrementStep, stepId]);
// step === 5 && stepId === SecurityStepId.alertsCases is in Cases app and out of context.
// If we mount this step, we know we need to render it
// we are also managing the context on the siem end in the background
Expand All @@ -38,7 +39,7 @@ export const SecurityTourStep = ({ children, step, stepId }: SecurityTourStep) =
const footerAction: EuiTourStepProps['footerAction'] = !hideNextButton ? (
<EuiButton
size="s"
onClick={() => incrementStep(stepId)}
onClick={onClick}
color="success"
data-test-subj="onboarding--securityTourNextStepButton"
tour-step="nextButton"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ const ActionsComponent: React.FC<ActionProps> = ({
() =>
isTourShown(SecurityStepId.alertsCases) &&
eventType === 'signal' &&
// TODO: Steph make sure this is right
isDetectionsAlertsTable(timelineId) &&
ariaRowindex === 1,
[isTourShown, ariaRowindex, eventType, timelineId]
Expand Down

0 comments on commit c0f35b9

Please sign in to comment.