hashicorp / structure

Structure (aka "PDS") [deprecated]
https://hashicorp-structure.vercel.app
Mozilla Public License 2.0
24 stars 5 forks source link

BREAKING CHANGE: GlobalHeader using named blocks instead of contextual components #64

Closed meirish closed 3 years ago

meirish commented 3 years ago

Previously when using Pds::GlobalHeader it was necessary to use the yielded components in order to get the layout to work right. This had issues when trying to compose the GlobalHeader with application components that contained application business logic - causing all of that to roll up to whatever component used GlobalHeader.

This PR changes GlobalHeader to use ember's named blocks so that content can be slotted in to containers in the right place in the layout. It results in a couple of extra wrapping elements but I think that's an acceptable tradeoff.

A Storybook upgrade was also necessary in order to neatly thread the named-block polyfill through to Storybook's babel setup.

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/hashicorp/structure/11cj8d0i6
✅ Preview: https://structure-git-global-header-named-blocks.hashicorp.vercel.app

cbfx commented 3 years ago

the storybook preview is exciting! there's a lot of solid stuff