datocms / plugins

Repository providing samples using the Plugins SDK
MIT License
33 stars 47 forks source link

[Web Previews] Allow to specify the initial width of the preview panel #86

Closed JanStevens closed 1 year ago

JanStevens commented 1 year ago

Hi,

It would be handy to have some configuration of the web preview initial width.

https://github.com/datocms/plugins/blob/2e88c830d866f9ca333b19345edcfc61b9eee195/web-previews/src/index.tsx#L36

Not everyone has a super large screen and when working with mostly mobile content having a default smaller screen would be handy.

Additionally if it could be "sticky" between sessions (based on the last resize you did as a user) that would be ideal.

Thanks

souljuse commented 1 year ago

What would you say if instead of adding a new configuration parameter, we simply save the preferred width on resizing? Would that solve the problem?

JanStevens commented 1 year ago

That would also be handy but having an initial width for all content editors and new future content editors sounds handy to me.

Saving the width in resize is a good improvement

stefanoverna commented 1 year ago

Released in v1.0.13 of the plugin! Thanks @JanStevens!