Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
We detected some changes in |
| extraExamples?: ReferenceEntityTemplateSchema['examples']; | ||
| } | ||
|
|
||
| function toPascalCase(name: string) { |
There was a problem hiding this comment.
I don't think so? See the follow up doc generation for this 2026-01 https://github.com/Shopify/ui-extensions/pull/4049/changes#diff-1b861b5affa29cc420f73eb83328a52dd4af6c51c03dcf85de0c6f8c49766ec5R204371-R204372
With this change, we are just applying the Pascal Case to type, and we leave the name(title) alone.
There was a problem hiding this comment.
@rennyG let me know if that works for you. I have approvals to merge this PR but don't want to if you have reservations.
There was a problem hiding this comment.
Accidentally merged :man-facepalming:
mcvinci
left a comment
There was a problem hiding this comment.
Hey @jhoffmcd! Thanks so much for putting this fix together. I did a quick test with generating some of the other shared docs like, admin UI, and all works as expected. ❤️
Would you mind cherrypicking this change to the 2026-04-rc and 2025-10 versions / branches as well? The sentence casing applies to versions 2025-10+.
|
Hey @mcvinci! I looked into cherry-picking this to both branches and found:
|
Super appreciate you looking into this, @jhoffmcd! It looks like we're covered in those other impacted versions then, which is perfect! Thanks again for fixing this. ❤️ |

Background
This pull request addresses an issue with component documentation generation where component names containing spaces were not being properly converted to valid TypeScript type names, causing type reference errors in the generated documentation.
Solution
Added a
toPascalCaseutility function that converts component names with spaces into proper PascalCase format for TypeScript type names. The function splits the name by spaces, capitalizes the first letter of each word, and joins them together. Additionally, updated thekebabCasedNameconversion to handle spaces by replacing them with hyphens.This approach ensures that component names like "My Component" are converted to "MyComponentElementProps" for type references while maintaining "my-component" for kebab-case usage. The alternative would have been to restrict component names to not contain spaces, but this solution maintains flexibility in naming while ensuring valid TypeScript types.
🎩
Checklist