VilledeMontreal / angular-ui

https://services.montreal.ca/bao-storybook/
MIT License
5 stars 8 forks source link

The screenSize property is not required on the SystemHeader storybook #172

Open ydg opened 1 year ago

ydg commented 1 year ago

The 'Viewport' option of the 'Canvas' view is made for that image

OlivierAlbertini commented 1 year ago

That's true ! Thanks !

OlivierAlbertini commented 1 year ago

Hi @ydg

Do you have the bandwidth to do it ? I can assign you if so. Let me know !

MaudeLaflamme commented 1 year ago

@OlivierAlbertini Salut @ydg ! I added the screenSize property in order to showcase the different buttons' configuration (depending on the type of screen it's being viewed on) without having to add script to the storybook example. The reason being that I haven't managed to find how to insert scripts within storybook examples. So with the screenSize property, I can directly add my conditional template inside ng-template tags IN the storybook example template, therefore allowing future users of the SystemHeader component to have the complete template in order to have a responsive component.

Hope this is clear, let me know if you have any questions (or suggestions) :)

OlivierAlbertini commented 1 year ago

@OlivierAlbertini Salut @ydg ! I added the screenSize property in order to showcase the different buttons' configuration (depending on the type of screen it's being viewed on) without having to add script to the storybook example. The reason being that I haven't managed to find how to insert scripts within storybook examples. So with the screenSize property, I can directly add my conditional template inside ng-template tags IN the storybook example template, therefore allowing future users of the SystemHeader component to have the complete template in order to have a responsive component.

Hope this is clear, let me know if you have any questions (or suggestions) :)

Perhaps it's just linking the functionality to the viewport. When we change the viewport, it should pass the viewport value to the component like https://varya.me/blog/stories-with-different-viewports/

ydg commented 1 year ago

Yes, what I meant is if the end user wants to see how the component behaves in different viewport he should do it in the Viewport view of the Canvas.