-
Notifications
You must be signed in to change notification settings - Fork 30
feat(iOS): move all styles in a separate file #298
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
base: main
Are you sure you want to change the base?
feat(iOS): move all styles in a separate file #298
Conversation
szydlovsky
left a comment
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.
Only some naming and/or organisation-wise changes we need
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.
I'd rename it to MakeStyles.h and place it inside of makeStyles folder to have it organized a bit better
| EnrichedTextInputMakeStyles(__kindof EnrichedTextInputView *input); | ||
|
|
||
| FOUNDATION_EXPORT NSDictionary<NSNumber *, NSArray<NSNumber *> *> * | ||
| EnrichedTextInputConflictingStyles(void); |
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.
| EnrichedTextInputConflictingStyles(void); | |
| EnrichedTextInputMakeConflictingStyles(void); |
| EnrichedTextInputConflictingStyles(void); | ||
|
|
||
| FOUNDATION_EXPORT NSDictionary<NSNumber *, NSArray<NSNumber *> *> * | ||
| EnrichedTextInputBlockingStyles(void); |
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.
| EnrichedTextInputBlockingStyles(void); | |
| EnrichedTextInputMakeBlockingStyles(void); |
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.
Same, would rename to MakeStyles.mm and place inside makeStyles folder
| }; | ||
| } | ||
|
|
||
| NSDictionary<NSNumber *, NSArray<NSNumber *> *> *EnrichedTextInputConflictingStyles(void) { |
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.
| NSDictionary<NSNumber *, NSArray<NSNumber *> *> *EnrichedTextInputConflictingStyles(void) { | |
| NSDictionary<NSNumber *, NSArray<NSNumber *> *> *EnrichedTextInputMakeConflictingStyles(void) { |
| return dict; | ||
| } | ||
|
|
||
| NSDictionary<NSNumber *, NSArray<NSNumber *> *> *EnrichedTextInputBlockingStyles(void) { |
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.
| NSDictionary<NSNumber *, NSArray<NSNumber *> *> *EnrichedTextInputBlockingStyles(void) { | |
| NSDictionary<NSNumber *, NSArray<NSNumber *> *> *EnrichedTextInputMakeBlockingStyles(void) { |
Summary
The file
EnrichedTextInputView.mmit's huge, and it's really difficult to work with it. So now it handles everything, including styles/props/style application logic, etc. I decided to simplify it by dividing the logic into different classes with the same responsibility. So, the easiest way is to transfer the styles to a separate file.This PR code basically moves all the styles to a separate file to reduce the number of lines and simplify the logic in
EnrichedTextInputView.mmTest Plan
Build an example app for iOS
Screenshots / Videos
Include any visual proof that helps reviewers understand the change — UI updates, bug reproduction or the result of the fix.
Compatibility