fix(create): missing header/footer in router template #426
Openouvreboite(GitHub profile, opens in a new tab)wants to merge 4 commits into
main fromrefs/pull/426/headopened ouvreboite(GitHub profile, opens in a new tab) changed the title
ouvreboite(GitHub profile, opens in a new tab) changed the title
Sign in to join this conversation.
No actionable comments were generated in the recent review.
Walkthrough
The React Router-only starter now displays the shared header and footer when examples are enabled and the scaffold is not blank. The header and footer use Router-specific text. Smoke tests cover the examples-enabled and default scaffolds.
Changes: Router-only React layout
packages/create/src/frameworks/react/project/base/src/routes/__root.tsx.ejs,packages/create/src/frameworks/react/project/base/src/components/Header.tsx.ejs,packages/create/src/frameworks/react/project/base/src/components/Footer.tsx.ejsincludeExamples && !blankin router-only mode. The components display Router-specific attribution, heading, and documentation link in that mode.packages/cli/tests-e2e/helpers.ts,packages/cli/tests-e2e/router-only-smoke.spec.ts,.changeset/router-only-react-layout.md@tanstack/createand@tanstack/cli.Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
tannerlinsleyMerge Risk:
Minimal · up to
58b97The Router-only starter regains its header and footer when examples are enabled, and the default scaffold is unchanged. The header's imports and links resolve in that scaffold, and smoke tests cover both configurations. No merge-blocking risk was identified.
Pre-merge checks:
4 · 
1
Full details: Docstring Coverage
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (4 skipped: 4 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate unit tests (beta)
Warning
Some tools did not complete. Review the errors below.
packages/cli/tests-e2e/helpers.ts
Parsing error: "parserOptions.project" has been provided for
@typescript-eslint/parser. The file was not found in any of the provided project(s): packages/cli/tests-e2e/helpers.tspackages/cli/tests-e2e/router-only-smoke.spec.ts
Parsing error: "parserOptions.project" has been provided for
@typescript-eslint/parser. The file was not found in any of the provided project(s): packages/cli/tests-e2e/router-only-smoke.spec.tsThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
c7c8ab5f-a16a-4cce-8e27-ba828e68e102Reviewing files that changed from the base of the PR and between ceecc794743fd4b5538fdea3c565ce07cdf0e57f and 58b97d015b9a9ba248203b9af0de610f0ddee6a6.
.changeset/router-only-react-layout.mdpackages/cli/tests-e2e/helpers.tspackages/cli/tests-e2e/router-only-smoke.spec.tspackages/create/src/frameworks/react/project/base/src/components/Footer.tsx.ejspackages/create/src/frameworks/react/project/base/src/components/Header.tsx.ejspackages/create/src/frameworks/react/project/base/src/routes/__root.tsx.ejsIncluded review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.