Skip to content

Global partials support#1856

Merged
rmainwork merged 12 commits intomainfrom
rm/global-partials
Mar 4, 2026
Merged

Global partials support#1856
rmainwork merged 12 commits intomainfrom
rm/global-partials

Conversation

@rmainwork
Copy link
Copy Markdown
Contributor

@rmainwork rmainwork commented Feb 17, 2026

This PR adds global partials support under /content/partials. Partials created here can be included between products (as demonstrated below between Consul and Boundary). A sample partial was added in 5d7b951 for testing purposes and included in pages for Boundary and Consul. This will be removed before merging.

image image

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 17, 2026

Vercel Previews Deployed

Name Status Preview Updated (UTC)
Dev Portal ✅ Ready (Inspect) Visit Preview Wed Mar 4 21:13:25 UTC 2026
Unified Docs API ✅ Ready (Inspect) Visit Preview Wed Mar 4 21:09:10 UTC 2026

@rmainwork rmainwork force-pushed the rm/global-partials branch 3 times, most recently from cf5a50b to 9633240 Compare February 17, 2026 22:57
@rmainwork rmainwork changed the title Global partials POC Global partials support Feb 17, 2026
@rmainwork rmainwork marked this pull request as ready for review February 17, 2026 23:09
@rmainwork rmainwork requested review from a team as code owners February 17, 2026 23:09
@rmainwork rmainwork force-pushed the rm/global-partials branch 2 times, most recently from 115f1cc to 5c0186f Compare February 19, 2026 21:33
Copy link
Copy Markdown
Contributor

@LeahMarieBush LeahMarieBush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Don't forget to remove the examples 🚢

@rmainwork
Copy link
Copy Markdown
Contributor Author

rmainwork commented Feb 20, 2026

Thanks @LeahMarieBush! Good call out on remembering to remove the examples!

I've also added a test to fully capture the inclusion of content from /content/global/partials. Mocking the filesystem is a bit of a test smell...but I couldn't figure out how else to capture that specific behavior in a test. Dunno if you have any better ideas, but all super open to suggestions if so :)

@github-actions github-actions Bot removed Vault Content update for Vault product docs WAF HCP Vault Radar Terraform MCP Server labels Feb 27, 2026
Some sample content was added ine5db0801b27f81c6597985c34f8099e88c37ee59 to
demonstrate the global partials functionality. However, this needs to be removed
prior to merge

Reverts e5db080
If a global partial that was included with the global path alias is
missing, we should throw - not fall through to any local partial that
may or may not have the same name...
Copy link
Copy Markdown
Contributor

@LeahMarieBush LeahMarieBush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a few minor comments but after those are resolved this will be good to go!

Comment thread content/global/partials/README.md Outdated
Comment thread content/boundary/v0.21.x/content/docs/commands/accounts/change-password.mdx Outdated
- Updated README to reflect the `@global/` namespace
- Also added example combining local and global partials
Whitespace changes were accidentally introduced from `main` in testing.
Restore these to dismiss unnecessary CODEOWNERS reviews
Copy link
Copy Markdown
Contributor

@LeahMarieBush LeahMarieBush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 🎉

@rmainwork
Copy link
Copy Markdown
Contributor Author

@LeahMarieBush sweet - when the build finishes I'll merge then

@rmainwork rmainwork merged commit ea8ad34 into main Mar 4, 2026
17 checks passed
@rmainwork rmainwork deleted the rm/global-partials branch March 4, 2026 21:16
victorr pushed a commit that referenced this pull request Mar 6, 2026
* Global partials POC

Implement basic global partials POC support

* Create sample content

Create example content demonstrating global partial functionality

* Ignore directories not listed in PRODUCT_CONFIG

* Move global partials dir to /content/global/partials

* Test global partials inclusion using a mocked fs

Adds a test verifying that @include directives resolve partials from
content/global/partials. The filesystem is mocked with memfs so the
test does not depend on real content in that directory — important
because the functionality under test is path-dependent, and placing
fixture data in the real content tree would couple tests to production
content(and also clutter the content directory with junk test data).

* Remove global partials sample content

Some sample content was added ine5db0801b27f81c6597985c34f8099e88c37ee59 to
demonstrate the global partials functionality. However, this needs to be removed
prior to merge

Reverts e5db080

* Compile prebuild

* Add missing test fixture

* Create global path alias

* Don't fall through to local partials

If a global partial that was included with the global path alias is
missing, we should throw - not fall through to any local partial that
may or may not have the same name...

* Updated README

- Updated README to reflect the `@global/` namespace
- Also added example combining local and global partials

* Restore accidental whitespace changes

Whitespace changes were accidentally introduced from `main` in testing.
Restore these to dismiss unnecessary CODEOWNERS reviews
hellobontempo pushed a commit that referenced this pull request Mar 9, 2026
* Global partials POC

Implement basic global partials POC support

* Create sample content

Create example content demonstrating global partial functionality

* Ignore directories not listed in PRODUCT_CONFIG

* Move global partials dir to /content/global/partials

* Test global partials inclusion using a mocked fs

Adds a test verifying that @include directives resolve partials from
content/global/partials. The filesystem is mocked with memfs so the
test does not depend on real content in that directory — important
because the functionality under test is path-dependent, and placing
fixture data in the real content tree would couple tests to production
content(and also clutter the content directory with junk test data).

* Remove global partials sample content

Some sample content was added ine5db0801b27f81c6597985c34f8099e88c37ee59 to
demonstrate the global partials functionality. However, this needs to be removed
prior to merge

Reverts e5db080

* Compile prebuild

* Add missing test fixture

* Create global path alias

* Don't fall through to local partials

If a global partial that was included with the global path alias is
missing, we should throw - not fall through to any local partial that
may or may not have the same name...

* Updated README

- Updated README to reflect the `@global/` namespace
- Also added example combining local and global partials

* Restore accidental whitespace changes

Whitespace changes were accidentally introduced from `main` in testing.
Restore these to dismiss unnecessary CODEOWNERS reviews
rmainwork added a commit that referenced this pull request Mar 13, 2026
Compiled prebuild scripts were missed from the original PR (#1856)
meaning that users who depended on global partials were unable to use
them
@rmainwork rmainwork mentioned this pull request Mar 13, 2026
rmainwork added a commit that referenced this pull request Mar 13, 2026
* Prebuild Scripts

Compiled prebuild scripts were missed from the original PR (#1856)
meaning that users who depended on global partials were unable to use
them

* Remove console logs from prebuild script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants