[Feature Request] Add defaultBreakpoint option to Live Preview configuration
#14366
Exia081
started this conversation in
Feature Requests & Ideas
Replies: 1 comment
-
|
Good idea, I moved this to a discussion instead though |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the Bug.
Description
Currently, the
LivePreviewConfigdoes not support setting a default breakpoint for the Live Preview iframe. When users configure multiple device breakpoints, there's no way to specify which breakpoint should be selected by default when opening the Live Preview panel.Current Behavior
When Live Preview is opened, Payload CMS seems to default to the first breakpoint in the
breakpointsarray or the responsive view. Users have no control over which breakpoint is displayed by default.Proposed Enhancement
Add a
defaultBreakpointoption to theLivePreviewConfigtype that allows developers to specify which breakpoint should be active by default.Proposed API
Example Usage
Use Case
This feature would be particularly useful when:
Current Workaround
The only workaround is to place the desired default breakpoint as the first item in the
breakpointsarray, but this affects the order of breakpoint buttons in the UI, which may not be the desired user experience.Additional Context
LivePreviewConfiginpayload/dist/config/types.d.tsThis enhancement would provide better control over the Live Preview experience without breaking existing configurations (since it would be an optional field with a sensible default).
Reproduction Steps
Environment Info
Beta Was this translation helpful? Give feedback.
All reactions