pulumi / docs

All things Pulumi docs!
https://pulumi.com
Apache License 2.0
129 stars 222 forks source link

Suggestion about improving code examples for bigger code snippets #11732

Open robertlyson opened 3 years ago

robertlyson commented 3 years ago

Problem description

Hi 👋

Just going through docs for creating Azure Application Gateway and thinking if you were thinking about giving area for code more space so it's easier to follow bigger chunks of code?

Affected product version(s)

Suggestions for a fix

current image

something like below on my mind image

Maybe if the left panel could be expanded / collapsed with a button that would help as well?

susanev commented 3 years ago

@robertlyson thank you for reporting!! we have a planned piece of work that will be coming up soon to improve the layouts of our docs pages that should hopefully address this.

wondering though, would an expand/collapse kind of feature that allows the code to expand to your entire browser window help here?

robertlyson commented 3 years ago

Hi @susanev, thank you for your response!

wondering though, would an expand/collapse kind of feature that allows the code to expand to your entire browser window help here?

That would be a great help that's for sure. Just thinking if that's the best one as sometimes you need to jump to e.g. Supporting Types section (which is below the code sample) and for instance see what is required to construct properly ApplicationGatewayBackendAddressPoolResponse. But maybe if your idea would expand code sample and docs below it to full screen?

robertlyson commented 3 years ago

Actually, if full-screen mode could look like this (sorry for my poor design skills!), on the left code sample and of the right additional information about types used in examples and available options. Each area with separate scroll. Think this way folks could follow code examples and go to resources section to grab more details without losing code from eyes 🤔

image