-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactor components for improved accessibility and consistency #345
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis PR refactors component exports across multiple files to improve code consistency and accessibility. The main change involves standardizing how components are exported by using direct named exports instead of collecting exports at the bottom of files. This makes the code more maintainable and follows modern JavaScript/TypeScript best practices. Class diagram for refactored component exportsclassDiagram
class CardTop {
+useNode()
}
class Card {
+useNode()
+theme.useToken()
}
class AhpIdFormConfirmationTop {
+useNode()
}
class AhpIdFormConfirmation {
+useNode()
}
class MenuComponent {
+antdTheme.useToken()
}
class AhpIdFormTop {
+useNode()
}
class AhpIdForm {
+useNode()
}
class AhpPaymentRequestFormTop {
+useNode()
}
class AhpPaymentRequestForm {
+useNode()
}
class AhpRequestFeedbackFormTop {
+useNode()
}
class AhpRequestFeedbackForm {
+useNode()
}
class AhpSendMoneyFormTop {
+useNode()
}
class AhpSendMoneyForm {
+useNode()
}
class Breadcrumbs {
+usePageLayouts()
}
class Container {
+useNode()
}
class Footer {
+theme.useToken()
}
class PropertyDetails {
+useParams()
}
class TextComponent {
+useNode()
}
class TextThing {
+useNode()
}
class CountryInfo2 {
+theme.useToken()
}
class ImageComponent {
+useNode()
}
class PropertiesListing {
+theme.useToken()
}
class Grid {
+useNode()
}
class SiteEditorFiles {
+useParams()
}
class SiteEditorPageEditor {
+theme.useToken()
}
class SiteEditorPageTree {
+usePageLayouts()
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @SanjithAnde - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟡 Review instructions: 3 issues found
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
let Card: any; | ||
|
||
Card = () => { | ||
export const Card = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (review_instructions): Missing CardProps interface for the Card component
Please define a CardProps interface for the component's props according to 002-ui-tsx-files.md
Review instructions:
Path patterns: ui-*/**/*.tsx
Instructions:
An interface or type should be defined for the component's props, named Props.
|
||
|
||
const CardTop = (props: any) => { | ||
export const CardTop = (props: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (review_instructions): Props should be typed with CardTopProps interface instead of any
Please define a CardTopProps interface for the component's props according to 002-ui-tsx-files.md
Review instructions:
Path patterns: ui-*/**/*.tsx
Instructions:
An interface or type should be defined for the component's props, named Props.
|
||
MenuComponent = ({ theme, ...props } : TextProp) => { | ||
export const MenuComponent = ({ theme, ...props } : TextProp) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (review_instructions): Props interface should be named MenuComponentProps instead of TextProp
Please rename the TextProp interface to MenuComponentProps according to 002-ui-tsx-files.md
Review instructions:
Path patterns: ui-*/**/*.tsx
Instructions:
An interface or type should be defined for the component's props, named Props.
…SearchClients() any more
Export components to enhance accessibility and maintain consistency across the codebase.
Summary by Sourcery
Enhancements: