Add a Pulumi Design Guidelines guide for component authors#19779
Add a Pulumi Design Guidelines guide for component authors#19779joeduffy wants to merge 1 commit into
Conversation
|
@CamSoper @cnunciato A lot of work to make these "great," but I've been dreaming of a Pulumi (Component) Design Guidelines for quite some time, borne out of discussions with customers. I helped contribute to the .NET Design Guidelines back in the early days, so that's partly where the inspiration came from ... Would love to know what you think of the idea! |
|
Your site preview for commit df5ca66 is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-19779-df5ca665.s3-website.us-west-2.amazonaws.com |
Lighthouse Performance ReportCommit: df5ca66 | Metric definitions
|
6401475 to
916cd35
Compare
This adds a new multi-page guide under Building & Extending covering how to design Pulumi components and packages well, as distinct from the mechanics of building them that the existing component and packaging guides already cover. The guide is prescriptive rather than reference: it is organized around scannable DO / CONSIDER / AVOID / DON'T recommendations, a convention borrowed from the .NET Framework Design Guidelines, and spans choosing the right abstraction, naming, inputs and outputs, composition, single- versus multi-cloud, multi-language ergonomics, and versioning. The recommendation callouts are a new `guideline` shortcode. Rather than duplicate the existing note layout, it reuses the `.note` container and adds four color-coded variants and a per-type icon; the recommendation text supplies the bold lead word, which the styles then color. The variant styles live in the SCSS source under theme/, since the committed bundle.css is a generated artifact and editing it directly would not survive a build. The guidance is grounded in how Pulumi's own component libraries are designed — AWSX's high-level VPC inputs and sensible defaults, EKS's exposed kubeconfig and escape hatches — so the recommendations reflect practice rather than theory. Design Guidelines sits immediately after Components in the nav, since it is the natural next step once an author knows how to build one; the surrounding section weights shift by one to make room. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
916cd35 to
df5ca66
Compare
|
@claude Review this. |
|
Claude finished @joeduffy's task in 3m 42s —— View job PR Review: Pulumi Design Guidelines
This is a high-quality addition. The structure is sound, the DO/CONSIDER/AVOID/DON'T framing is implemented consistently, and the guidance is grounded in real AWSX/EKS patterns rather than invented examples. A few things to address before merging: Broken links (must fix)Two The tutorial lives at Affected files:
Minor issuesPython consumer examples use raw dict style ( vpc = Vpc("app", {
"cidr_block": "10.0.0.0/16",
"number_of_availability_zones": 3,
})This is valid, but
Children created after
The Implementation
Nav weights — What's working wellThe content itself is excellent:
The cross-linking between pages is dense and well-targeted — readers following any thread will land on the right continuation. |
|
@joeduffy The .NET Design Guidelines framing is a natural fit here -- the DO/CONSIDER/AVOID/DON'T taxonomy works really well for this kind of prescriptive guidance. The "defaults are part of the contract" and URN identity sections especially are things I wish existed in written form earlier. FYI, the |
What this adds
A new multi-page Pulumi Design Guidelines guide under Building & Extending, covering how to design components and packages well — as distinct from the mechanics of building them, which the existing component and packaging guides already cover. It is prescriptive rather than reference, organized around scannable DO / CONSIDER / AVOID / DON'T recommendations (a convention borrowed from the .NET Framework Design Guidelines).
Eight pages:
_index.md) — philosophy, audience, how to read the conventionsInput<T>, secrets, stable contractsparent, option propagation, components-of-componentsThe guidance is grounded in how Pulumi's own component libraries are designed (AWSX's high-level VPC inputs and sensible defaults; EKS's exposed
kubeconfigand escape hatches).Implementation notes
guidelineshortcode (layouts/shortcodes/guideline.html) renders the four color-coded callouts. It reuses the existing.notecontainer and adds per-type color + icon (check-circle/lightbulb/warning/prohibit); the recommendation text supplies the bold lead word, which the styles then color.theme/src/scss/_notes.scss), since the committedassets/css/bundle.cssis a generated artifact. The red semantic color trio already existed in_theme.scss. Reviewers runningmake serve/make buildwill get the recompiled bundle automatically.Verification
make lint— 0 markdown errors, prettier cleanmake lint-prose(Vale) — 0 errors; only nag-levelwrite-goodwarnings remain🤖 Generated with Claude Code