Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): Make scaffolded layout routing type-safe #11542

Merged
merged 3 commits into from
Sep 15, 2024

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Sep 13, 2024

With this feature we now make sure only valid route names are passed as titleTo and buttonTo props to the scaffolded layout.

This also means you get helpful code completion when typing out the prop values

image

Note that this only affects newly generated scaffolds. All existing scaffold layouts will have to be manually updated by the user (or regenerated) if they wish to have the extra type safety

@Tobbe Tobbe added the release:feature This PR introduces a new feature label Sep 13, 2024
@Tobbe Tobbe added this to the next-release milestone Sep 13, 2024
@Tobbe Tobbe force-pushed the tobbe-scaffold-keyof-typeof-routes branch from c334808 to 5843d0f Compare September 13, 2024 23:24
Copy link
Collaborator

@Josh-Walker-GM Josh-Walker-GM left a comment

Choose a reason for hiding this comment

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

Awesome

@Tobbe Tobbe merged commit 4eb1fb6 into redwoodjs:main Sep 15, 2024
50 checks passed
@Tobbe Tobbe deleted the tobbe-scaffold-keyof-typeof-routes branch September 15, 2024 13:16
@Josh-Walker-GM Josh-Walker-GM modified the milestones: next-release, v8.2.0 Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:feature This PR introduces a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants