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

Add new file extension suffixes to naming conventions guide #42

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

denniskigen
Copy link
Owner

@denniskigen denniskigen commented Jun 19, 2024

This update adds information about three file type suffixes:

  • *.modal.tsx for modals
  • *.extension.tsx for extensions
  • *.workspace.tsx for workspace forms

Copy link

vercel bot commented Jun 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
o3-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2024 9:41pm

Copy link
Collaborator

@NethmiRodrigo NethmiRodrigo left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @denniskigen!

@brandones
Copy link
Collaborator

Why *.modal.component.tsx and not *.modal.tsx ?

@denniskigen
Copy link
Owner Author

Why *.modal.component.tsx and not *.modal.tsx ?

I could only find one occurrence of modal.tsx in Core, for example. It looks like we're not super consistent about that one pattern, or that the other custom extensions are more prevalent in our codebase. Either way, happy to change it to modal.tsx, but that'll require refactoring various files to match the new convention.

@brandones
Copy link
Collaborator

Yeah let's do modal.tsx and refactor :)

I think it would be awesome to have a consistent norm that each top-level element in the routes file has its own file extension, [whateveritis].tsx. And then component.tsx is anything that isn't loaded via the routes file.

@ibacher
Copy link
Collaborator

ibacher commented Jun 20, 2024

I love @brandones suggestion!

@denniskigen
Copy link
Owner Author

denniskigen commented Jun 26, 2024

Refactor is done everywhere, I think. I'm proceeding with merging this in.

@denniskigen denniskigen merged commit 729cf02 into main Jun 26, 2024
2 checks passed
@denniskigen denniskigen deleted the updated-file-naming-conventions branch June 26, 2024 08:43
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