-
Notifications
You must be signed in to change notification settings - Fork 10
feat: update some styling config #452
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
Conversation
WalkthroughThis pull request systematically renames the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom Pre-merge checks in the settings. ✨ Finishing touches
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.
Actionable comments posted: 0
🧹 Nitpick comments (3)
src/shared/uiKit/input/Input.tsx (1)
65-65: LGTM! Icon prop successfully migrated tofill.The prop change aligns with the broader API migration from
colortofillacross icon components.Consider renaming the prop
leftOrnamentIconColor(line 22) toleftOrnamentIconFillfor consistency with the new API terminology. This would improve code readability and maintain naming consistency across the codebase.🔎 Optional refactor for naming consistency
- leftOrnamentIconColor?: string; + leftOrnamentIconFill?: string;And update the destructuring:
leftOrnamentIcon, - leftOrnamentIconColor, + leftOrnamentIconFill, testID = 'Input',And the usage:
<Icon name={leftOrnamentIcon} - fill={leftOrnamentIconColor} + fill={leftOrnamentIconFill} width={DEFAULT_ICON_SIZE}src/shared/uiKit/button/components/InnerIcon.tsx (1)
33-33: LGTM! Icon prop successfully migrated tofill.The prop change correctly aligns with the API migration across icon components.
The utility function
getTextColor(line 7) could be renamed togetFillColororgetIconColorfor consistency with the newfillterminology. This is a minor naming improvement that would enhance code clarity, though the current implementation functions correctly.src/shared/icons/components/LeftArrow.tsx (1)
5-5: Consider centralizing the default fill color.The default fill color
'#0C0D0F'is hardcoded across multiple icon components (User, LeftArrow, and likely others mentioned in the AI summary). Consider extracting this to a shared constant for easier maintenance and consistency.Example centralized constant approach
Create a constants file (e.g.,
src/shared/icons/constants.ts):export const DEFAULT_ICON_FILL = '#0C0D0F';Then import and use it in icon components:
+import { DEFAULT_ICON_FILL } from '../constants'; + -const LeftArrow = ({ fill = '#0C0D0F', ...props }: SvgProps) => { +const LeftArrow = ({ fill = DEFAULT_ICON_FILL, ...props }: SvgProps) => {
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (12)
src/app/_layout.tsxsrc/shared/components/navigation/components/HeaderLeft.tsxsrc/shared/components/navigation/components/TabBarIcon.tsxsrc/shared/icons/Icon.tsxsrc/shared/icons/components/Apps.tsxsrc/shared/icons/components/Envelope.tsxsrc/shared/icons/components/Home.tsxsrc/shared/icons/components/Key.tsxsrc/shared/icons/components/LeftArrow.tsxsrc/shared/icons/components/User.tsxsrc/shared/uiKit/button/components/InnerIcon.tsxsrc/shared/uiKit/input/Input.tsx
🧰 Additional context used
🧬 Code graph analysis (7)
src/shared/icons/components/Envelope.tsx (1)
src/shared/icons/components/index.ts (1)
Envelope(2-2)
src/shared/icons/components/User.tsx (1)
src/shared/icons/components/index.ts (1)
User(6-6)
src/shared/icons/components/Home.tsx (1)
src/shared/icons/components/index.ts (1)
Home(3-3)
src/shared/icons/components/Apps.tsx (1)
src/shared/icons/components/index.ts (1)
Apps(1-1)
src/shared/icons/components/Key.tsx (1)
src/shared/icons/components/index.ts (1)
Key(4-4)
src/shared/uiKit/button/components/InnerIcon.tsx (1)
src/shared/uiKit/button/utils/buttonStyling.utils.ts (1)
getTextColor(16-28)
src/shared/icons/components/LeftArrow.tsx (1)
src/shared/icons/components/index.ts (1)
LeftArrow(5-5)
🔇 Additional comments (10)
src/shared/components/navigation/components/HeaderLeft.tsx (1)
19-19: LGTM! Icon prop successfully migrated tofill.The change correctly updates the Icon component to use the new
fillprop, maintaining the same color value from the theme.src/shared/components/navigation/components/TabBarIcon.tsx (1)
25-27: LGTM! Icon prop successfully migrated tofill.The change correctly updates the Icon component to use the new
fillprop while preserving the conditional color logic based on focus state.src/app/_layout.tsx (1)
16-16: LGTM! Excellent refactor to useStyleSheet.create().This change follows React Native best practices by wrapping the styles object in
StyleSheet.create(). This provides:
- Style validation at creation time
- Performance optimization through style object caching
- Better integration with the react-native-unistyles theming system
Also applies to: 126-130
src/shared/icons/components/Envelope.tsx (1)
5-5: LGTM! Semantic improvement withfillprop.The rename from
colortofillis semantically appropriate since SVG elements use thefillattribute natively. The implementation correctly updates both the parameter destructuring and the Path element binding.Also applies to: 10-10
src/shared/icons/components/Key.tsx (1)
5-5: LGTM! Consistent with the icon API refactor.The prop rename is implemented correctly and aligns with the systematic
fillprop adoption across the icon component suite.Also applies to: 10-10
src/shared/icons/components/Apps.tsx (1)
5-5: LGTM! Consistent prop rename implementation.The changes correctly implement the
fillprop pattern matching the other icon components in this PR.Also applies to: 10-10
src/shared/icons/components/Home.tsx (1)
5-5: LGTM! Completes the consistent refactor.The prop rename is implemented correctly, completing the systematic transition to
fillacross the icon component suite.Also applies to: 10-10
src/shared/icons/Icon.tsx (1)
7-7: All Icon consumers have been updated to usefillprop.Verified all 4 Icon component usages in the codebase:
src/shared/uiKit/input/Input.tsx: Usingfill={leftOrnamentIconColor}src/shared/uiKit/button/components/InnerIcon.tsx: Usingfill={theme.colors[...]}src/shared/components/navigation/components/TabBarIcon.tsx: Usingfill={isFocused ? ... : ...}src/shared/components/navigation/components/HeaderLeft.tsx: Usingfill={theme.colors.content_primary}No legacy
colorprop usage remains. The breaking API change is complete and properly implemented.src/shared/icons/components/LeftArrow.tsx (1)
5-10: LGTM! Consistent prop rename fromcolortofill.The implementation correctly renames the prop from
colortofill, aligning with SVG semantics and the broader PR changes. The parameter destructuring and Path element binding are both properly updated. Verification confirms that all consumers, including HeaderLeft.tsx, have been updated to use thefillprop.src/shared/icons/components/User.tsx (1)
5-10: LGTM! Semantic improvement with prop rename fromcolortofill.The rename from
colortofillis semantically more accurate for SVG elements, asfillis the standard SVG attribute name. The implementation correctly updates the parameter destructuring and the Path element binding. All consumers have been properly updated—the Icon component forwards the fill prop correctly, and TabBarIcon uses it as expected with dynamic theming support across all icon components.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.