diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cf71e8bec..2b51e46ab5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The following is a curated list of changes in the Enact sandstone module, newest ### Fixed +- `sandstone/Panels.Header` to show title and subtitle properly in `sandstone/WizardPanels` - `sandstone/Scroller`, `sandstone/Slider`, and `sandstone/VirtualList` to have default prop when `undefined` prop is passed - `sandstone/Scroller` to show scroll indicator when `focusableScrollbar` prop is `true` - `sandstone/Steps` prop `size` to accept number type diff --git a/Panels/Header.js b/Panels/Header.js index 8443225814..9ff6497f5a 100644 --- a/Panels/Header.js +++ b/Panels/Header.js @@ -438,6 +438,7 @@ const HeaderBase = kind({ slotBeforeRef, slotSize, titleCell, + type, ...rest }) => { delete rest.arranger; @@ -447,7 +448,6 @@ const HeaderBase = kind({ delete rest.subtitleId; delete rest.title; delete rest.titleId; - delete rest.type; // Set up the back button const backButton = (backButtonAvailable && !noBackButton ? ( @@ -483,7 +483,7 @@ const HeaderBase = kind({ // Hide slots for the first render to avoid unexpected positioning when 'centered' is given. // After the first render, HeaderMeasurementDecorator measures widths of slots and set right 'slotSize'. const hideSlots = { - opacity: centered && (!slotBeforeRef.current || !slotAfterRef.current) ? '0' : null + opacity: centered && slotSize === '0rem' ? '0' : null }; // The side Cells are always present, even if empty, to support the measurement ref. @@ -496,7 +496,7 @@ const HeaderBase = kind({ {backButton}{slotBefore} - {titleCell} + {(type === 'wizard' && (slotBefore?.props?.visible || slotAfter?.props?.visible) && slotSize === '0rem') ? null : titleCell} {slotAfter}{closeButton} diff --git a/samples/sampler/stories/qa/WizardPanels.js b/samples/sampler/stories/qa/WizardPanels.js index 9b04e79b81..a0e42f75d6 100644 --- a/samples/sampler/stories/qa/WizardPanels.js +++ b/samples/sampler/stories/qa/WizardPanels.js @@ -360,3 +360,33 @@ _WizardPanelsWithAlert.parameters = { noPanel: true } }; + +const WizardPanelsWithLongSubtitle = () => { + return ( + + + + + + + + + + + ); +}; + +export const _WizardPanelsWithLongSubtitle = () => ; + +_WizardPanelsWithLongSubtitle.storyName = 'with long subtitle'; +_WizardPanelsWithLongSubtitle.parameters = { + props: { + noPanel: true + } +};