Skip to content

Refactor: Rename interfaces to use "I" prefix and extract Component Props into separate interfaces #36

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

Closed

Conversation

christophstockinger
Copy link

This pull request proposes renaming all interfaces in the codebase to start with an "I" (e.g., User to IUser). This change follows the widely adopted convention of prefixing interfaces with "I" to clearly distinguish them from classes and regular objects. Adhering to this practice helps improve the readability and clarity of the code, especially when the code is being worked on or reviewed by various contributors.

Additionally, several React component props have been refactored into separate interfaces. This change enhances the maintainability and scalability of the code by making it more modular. Each component now has a clearly defined structure for its props, which also facilitates easier refactoring and reuse of components.

I hope these changes help improve the codebase and I’m happy to discuss further or make adjustments based on feedback.

Reasons for the Change:

Clarity and Consistency: Renaming interfaces with the "I" prefix follows a well-established convention, making it easier for contributors to quickly recognize interfaces in the codebase.
Improved Maintainability: Moving props into separate interfaces improves the modularity and structure of the code, enabling safer changes and easier reusability of components.
Better Readability: The code becomes more understandable by clearly separating interface definitions from their implementations.

Changes:

  • All interfaces have been renamed to begin with "I".
  • Several props from React components have been extracted into their own interfaces.
  • Update spelling of the stroke-width attribute in react components

@taylorotwell
Copy link
Member

Thanks for your pull request to Laravel!

Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.

If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions!

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.

2 participants