diff --git a/packages/ibm-products/src/components/SidePanel/SidePanel.docs-page.js b/packages/ibm-products/src/components/SidePanel/SidePanel.docs-page.js index 12911e413c..36f1c36bb5 100644 --- a/packages/ibm-products/src/components/SidePanel/SidePanel.docs-page.js +++ b/packages/ibm-products/src/components/SidePanel/SidePanel.docs-page.js @@ -8,7 +8,7 @@ import React from 'react'; import { StoryDocsPage } from '../../global/js/utils/StoryDocsPage'; -import * as stories from './SidePanel'; +import * as stories from './SidePanel.stories'; const DocsPage = () => ( { - if (open) { - setTimeout(() => { + if (open && animationComplete) { + if ( + selectorPrimaryFocus && + getSpecificElement(sidePanelRef?.current, selectorPrimaryFocus) + ) { + const primeFocusEl = getSpecificElement( + sidePanelRef?.current, + selectorPrimaryFocus + ); if ( - selectorPrimaryFocus && - getSpecificElement(sidePanelRef?.current, selectorPrimaryFocus) + primeFocusEl && + window?.getComputedStyle(primeFocusEl)?.display !== 'none' ) { - const primeFocusEl = getSpecificElement( - sidePanelRef?.current, - selectorPrimaryFocus - ); - if ( - primeFocusEl && - window?.getComputedStyle(primeFocusEl)?.display !== 'none' - ) { - (primeFocusEl as HTMLElement)?.focus(); - } - } else if (!slideIn) { - firstElement?.focus(); + setTimeout(() => primeFocusEl?.focus(), 0); } - }, 0); + } else if (!slideIn) { + setTimeout(() => firstElement?.focus(), 0); + } } }, [ animationComplete, diff --git a/packages/ibm-products/telemetry.yml b/packages/ibm-products/telemetry.yml index 248c74a6ca..be04f5afec 100644 --- a/packages/ibm-products/telemetry.yml +++ b/packages/ibm-products/telemetry.yml @@ -456,14 +456,17 @@ collect: - editButtonText - editing - editSuccess + - editSuccessMessage - editSuccessTitle - errorText - generateButtonText - generateSuccessBody + - generateSuccessMessage - generateSuccessTitle - generateTitle - hasAPIKeyVisibilityToggle - hasDownloadLink + - helperText - hideAPIKeyLabel - loadingText - modalLabel @@ -532,6 +535,7 @@ collect: - fixedIsVisible # CoachmarkOverlayElements - isVisible + - onBack # CoachmarkStackHome - onClickNavItem # Columns