You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use ToggleButtonGroup for HtmlPreview width selection #353
Replace the width radio group in HtmlPreview with the reusable ToggleButtonGroup from #352 so tools can use the shared preview with the segmented selector shown in the newsletter layout design.
This is the second of two PRs and depends on #352. Stack this PR on the ToggleButtonGroup PR so reviewers can review the standalone control first and the preview integration separately. Context: guardian/newsletters-nx#1056 and guardian/newsletters-nx#1102.
Keep exactly one width selected and prevent deselecting the current width without selecting another.
Selecting a segment changes the actual iframe width without re-fetching HTML or remounting the preview.
Preserve the existing widthOptions and defaultWidth API, including the default 320, 375, 425 and 650px options and support for custom widths.
Preserve the ability to omit the width selector with an empty widthOptions array.
Provide an accessible label for the width group and use the shared control for keyboard, focus, selected and disabled behaviour.
Keep the existing HTML fetching, loading, error/retry and sandbox behaviour unchanged; this PR is the width-control integration, not a preview lifecycle rewrite.
Update the preview Storybook examples, usage documentation and sandbox example.
Add focused integration coverage showing that selection updates the iframe width and the existing width configuration continues to work.
Activity