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
Is your feature request related to a problem? Please describe
Sometimes UI design differs for mobiles and mobiles with different orientations. For now Essentials/Viewport addon allows to specify for every exact story the viewport/defaultViewport param, so when user selects that story in storybook the proper viewport to be shown. That's fine and lets me to make different stories for Desktop and Mobiles. But if UI differs because of different mobile orientation, I should tell to all devs something like this "please use the Mobile story and do not forget to switch the viewport orientation to check different cases". That's not so good. I'd like to be able to specify viewport/defaultOrientation so I were able to make different stories for Mobile Landscape and Mobile Portrait orientations.
Describe the solution you'd like
I'd like to see the extended the ViewportAddonParameter with the defaultOrientation: 'portrait' | 'landscape' so ViewportToolState.isRotated to be initiated according to this value as it works for defaultViewport.
Thus it will be possible to select not only desired viewport, but also the desired viewport orientation for every single story when required.
Describe alternatives you've considered
Alternative could be the adding the ViewportAddonParameter.defaultIsRotated: boolean field, but defaultOrientation is better and easier to understand.
Are you able to assist to bring the feature to reality?
Yes, I can
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe
Sometimes UI design differs for mobiles and mobiles with different orientations. For now Essentials/Viewport addon allows to specify for every exact story the
viewport/defaultViewport
param, so when user selects that story in storybook the proper viewport to be shown. That's fine and lets me to make different stories for Desktop and Mobiles. But if UI differs because of different mobile orientation, I should tell to all devs something like this "please use the Mobile story and do not forget to switch the viewport orientation to check different cases". That's not so good. I'd like to be able to specifyviewport/defaultOrientation
so I were able to make different stories for Mobile Landscape and Mobile Portrait orientations.Describe the solution you'd like
I'd like to see the extended the
ViewportAddonParameter
with thedefaultOrientation: 'portrait' | 'landscape'
soViewportToolState.isRotated
to be initiated according to this value as it works fordefaultViewport
.Thus it will be possible to select not only desired viewport, but also the desired viewport orientation for every single story when required.
Describe alternatives you've considered
Alternative could be the adding the
ViewportAddonParameter.defaultIsRotated: boolean
field, butdefaultOrientation
is better and easier to understand.Are you able to assist to bring the feature to reality?
Yes, I can
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: