-
Notifications
You must be signed in to change notification settings - Fork 14
feat: add new values to iconName enum backend #8593
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
WalkthroughAdds ten new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.cursor/rules/base.mdc)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/base.mdc)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
🔇 Additional comments (1)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit efeef01
☁️ Nx Cloud last updated this comment at |
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
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: 1
🤖 Fix all issues with AI agents
In `@apis/api-journeys-modern/schema.graphql`:
- Around line 596-605: The GraphQL schema added IconName values
ArrowLeftContained2, ArrowRightContained2, and Note2 but the frontend is missing
their implementations; create React icon components named ArrowLeftContained2,
ArrowRightContained2, and Note2 (exported as default) matching the pattern used
by existing icons, add corresponding files for each in the icons directory, and
register/import them in the Icon.tsx mapping so Icon.tsx returns these
components for the IconName values; alternatively, if these enum values are not
needed, remove them from the schema to keep Icon.tsx and the icon component set
in sync.
🧹 Nitpick comments (1)
apis/api-journeys/schema.graphql (1)
732-762: Consider updating the docstring to reflect custom icons.The new icon names (
ArrowLeftContained2,Home4,UserProfile2, etc.) don't follow the@mui/icons-materialnaming pattern, suggesting these are custom icons. The docstring on line 732 states the enum is "equivalent to the icons found in@mui/icons-material," which may be misleading.Consider updating the docstring to clarify that the enum now includes both MUI icons and custom icons.
📝 Suggested docstring update
-"""IconName is equivalent to the icons found in `@mui/icons-material`""" +"""IconName includes icons from `@mui/icons-material` and custom icons""" enum IconName {
📜 Review details
Configuration used: Repository 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 ignored due to path filters (8)
apis/api-journeys/src/__generated__/graphql.tsis excluded by!**/__generated__/**apis/api-journeys/src/app/__generated__/graphql.tsis excluded by!**/__generated__/**apps/journeys-admin/__generated__/globalTypes.tsis excluded by!**/__generated__/**apps/journeys/__generated__/globalTypes.tsis excluded by!**/__generated__/**apps/resources/__generated__/globalTypes.tsis excluded by!**/__generated__/**apps/watch/__generated__/globalTypes.tsis excluded by!**/__generated__/**libs/journeys/ui/__generated__/globalTypes.tsis excluded by!**/__generated__/**libs/shared/gql/src/__generated__/graphql-env.d.tsis excluded by!**/__generated__/**
📒 Files selected for processing (4)
apis/api-gateway/schema.graphqlapis/api-journeys-modern/schema.graphqlapis/api-journeys/schema.graphqlapis/api-journeys/src/app/modules/block/icon/icon.graphql
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-20T23:32:18.117Z
Learnt from: mikeallisonJS
Repo: JesusFilm/core PR: 7486
File: apis/api-journeys-modern/schema.graphql:199-205
Timestamp: 2025-08-20T23:32:18.117Z
Learning: The ChatButton.link field in api-journeys is actually nullable (String), not non-nullable (String!) as previously learned. When migrating GraphQL types from api-journeys to api-journeys-modern, the ChatButton.link field should remain nullable to match the existing api-journeys schema.
Applied to files:
apis/api-journeys-modern/schema.graphql
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
- GitHub Check: Deploy Preview (watch, 8593/merge, pull_request, 22)
- GitHub Check: Deploy Preview (journeys-admin, 8593/merge, pull_request, 22)
- GitHub Check: Deploy Preview (journeys, 8593/merge, pull_request, 22)
- GitHub Check: Deploy Preview (short-links, 8593/merge, pull_request, 22)
- GitHub Check: Deploy Preview (videos-admin, 8593/merge, pull_request, 22)
- GitHub Check: Deploy Preview (player, 8593/merge, pull_request, 22)
- GitHub Check: Deploy Preview (resources, 8593/merge, pull_request, 22)
- GitHub Check: build (22)
- GitHub Check: test (22, 3/3)
- GitHub Check: test (22, 1/3)
- GitHub Check: test (22, 2/3)
- GitHub Check: lint (22)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
apis/api-journeys/src/app/modules/block/icon/icon.graphql (1)
1-33: LGTM! New icon values are consistent across all schema files.The 10 new
IconNameenum values are correctly added and match the other schema files in this PR. The same docstring suggestion applies here - consider updating lines 1-3 to reflect that the enum now includes custom icons beyond@mui/icons-material.apis/api-gateway/schema.graphql (1)
3448-3457: Three of the ten new IconName enum values lack frontend implementations.While 7 of the new icon values (Home4, MessageChat1, LinkAngled, Phone, UserProfile2, UsersProfiles3, Volume5) have corresponding components in
libs/shared/ui/src/components/icons/Icon.tsx, the following three do not:
- ArrowLeftContained2
- ArrowRightContained2
- Note2
These enum values are defined in the schema and included in the GraphQL generated types, but they are missing from the Icon component mapping, which means they will fail at runtime if used. Either add the missing icon component implementations or remove these three values from the schema.
⛔ Skipped due to learnings
Learnt from: mikeallisonJS Repo: JesusFilm/core PR: 7486 File: apis/api-journeys-modern/schema.graphql:199-205 Timestamp: 2025-08-20T23:32:18.117Z Learning: The ChatButton.link field in api-journeys is actually nullable (String), not non-nullable (String!) as previously learned. When migrating GraphQL types from api-journeys to api-journeys-modern, the ChatButton.link field should remain nullable to match the existing api-journeys schema.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| ArrowLeftContained2 | ||
| ArrowRightContained2 | ||
| MessageChat1 | ||
| Home4 | ||
| LinkAngled | ||
| Volume5 | ||
| Note2 | ||
| UserProfile2 | ||
| UsersProfiles3 | ||
| Phone |
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.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for icon component mappings or implementations that handle the new icon names
echo "=== Searching for icon name mappings ==="
rg -n -C3 'ArrowLeftContained2|ArrowRightContained2|MessageChat1|Home4|LinkAngled|Volume5|Note2|UserProfile2|UsersProfiles3|Phone' --type=ts --type=tsx -g '!*.graphql'
echo ""
echo "=== Searching for IconName type usage and handlers ==="
rg -n 'IconName' --type=ts --type=tsx -g '!*.graphql' -g '!*.spec.ts' | head -50
echo ""
echo "=== Looking for icon resolution/mapping logic ==="
rg -n -C5 'icon.*map\|iconMap\|getIcon\|renderIcon\|iconName.*case' --type=ts --type=tsx -g '!*.graphql' | head -80Repository: JesusFilm/core
Length of output: 306
🏁 Script executed:
#!/bin/bash
# Search for the new icon names in all files
echo "=== Searching for new icon names in codebase ==="
rg -n 'ArrowLeftContained2|ArrowRightContained2|MessageChat1|Home4|LinkAngled|Volume5|Note2|UserProfile2|UsersProfiles3' --max-count 20 -g '!node_modules' -g '!*.graphql'
echo ""
echo "=== Searching for IconName references ==="
rg -n 'IconName' -g '!node_modules' -g '!*.graphql' -A 3 | head -80
echo ""
echo "=== Looking for icon mapping patterns ==="
rg -n 'icon.*switch|icon.*case|iconMap|getIcon|renderIcon' -g '!node_modules' -g '!*.graphql' | head -50
echo ""
echo "=== Check if schema.graphql files reference icon implementations ==="
fd -t f 'schema.graphql' -g '!node_modules' --exec rg -l 'IconName' {}Repository: JesusFilm/core
Length of output: 24590
🏁 Script executed:
#!/bin/bash
# Check the Icon.tsx file to see full import list and mapping
echo "=== Checking Icon.tsx imports and mappings ==="
rg -A 300 'import.*from' libs/shared/ui/src/components/icons/Icon.tsx | head -150
echo ""
echo "=== Looking for the icon mapping object ==="
rg -A 150 'const.*=.*\{$' libs/shared/ui/src/components/icons/Icon.tsx | grep -A 100 'Home4\|ArrowLeft\|ArrowRight\|Phone\|Note2' | head -100Repository: JesusFilm/core
Length of output: 6880
🏁 Script executed:
#!/bin/bash
# Search specifically for the 4 potentially missing icons
echo "=== Searching Icon.tsx for imports of missing icons ==="
rg 'ArrowLeftContained2|ArrowRightContained2|Note2|Phone' libs/shared/ui/src/components/icons/Icon.tsx
echo ""
echo "=== Check if component files exist for these icons ==="
fd -t f '(ArrowLeftContained2|ArrowRightContained2|Note2|Phone)' libs/shared/ui/src/components/icons/
echo ""
echo "=== Check the type union in Icon.tsx for all icon names ==="
rg -A 200 'export type.*Icon.*=.*\|' libs/shared/ui/src/components/icons/Icon.tsx | grep -E 'ArrowLeftContained2|ArrowRightContained2|Note2|Phone' | head -20Repository: JesusFilm/core
Length of output: 325
🏁 Script executed:
#!/bin/bash
# Search for the 3 remaining potentially missing icons
echo "=== Searching Icon.tsx for ArrowLeftContained2, ArrowRightContained2, Note2 ==="
rg 'ArrowLeftContained2|ArrowRightContained2|Note2' libs/shared/ui/src/components/icons/Icon.tsx
echo ""
echo "=== Check if component files exist ==="
fd -t f '(ArrowLeftContained2|ArrowRightContained2|Note2)' libs/shared/ui/src/components/icons/
echo ""
echo "=== Search entire Icon.tsx file for type definitions ==="
wc -l libs/shared/ui/src/components/icons/Icon.tsx
echo ""
echo "=== Check lines around the icon type union for these names ==="
rg -n "export type IconName" libs/shared/ui/src/components/icons/Icon.tsx
echo ""
echo "=== Read the type definition section ==="
sed -n '300,500p' libs/shared/ui/src/components/icons/Icon.tsx | grep -E 'ArrowLeftContained2|ArrowRightContained2|Note2|Phone'Repository: JesusFilm/core
Length of output: 429
🏁 Script executed:
#!/bin/bash
# Read the actual IconName type definition
echo "=== Reading IconName type definition from Icon.tsx ==="
sed -n '232,500p' libs/shared/ui/src/components/icons/Icon.tsxRepository: JesusFilm/core
Length of output: 4385
🏁 Script executed:
#!/bin/bash
# Check if ArrowLeftContained2, ArrowRightContained2, Note2 are in the type definition
echo "=== Checking for the 3 missing icons in IconName type ==="
grep -E 'ArrowLeftContained2|ArrowRightContained2|Note2' libs/shared/ui/src/components/icons/Icon.tsx
echo ""
echo "=== Verify these component files don't exist ==="
ls -la libs/shared/ui/src/components/icons/ | grep -E 'ArrowLeftContained2|ArrowRightContained2|Note2'
echo ""
echo "=== Search the entire codebase for these icon names ==="
rg 'ArrowLeftContained2|ArrowRightContained2|Note2' -g '!*.graphql' -g '!__generated__' --max-count 5Repository: JesusFilm/core
Length of output: 222
Frontend icon implementations missing for 3 new enum values.
The schema adds 10 new IconName values, but only 7 have corresponding implementations in libs/shared/ui/src/components/icons/Icon.tsx:
- ✅ Implemented:
Home4,LinkAngled,MessageChat1,UserProfile2,UsersProfiles3,Phone,Volume5 - ❌ Missing:
ArrowLeftContained2,ArrowRightContained2,Note2
Add the missing icon component files and register them in Icon.tsx, or remove these names from the schema.
🤖 Prompt for AI Agents
In `@apis/api-journeys-modern/schema.graphql` around lines 596 - 605, The GraphQL
schema added IconName values ArrowLeftContained2, ArrowRightContained2, and
Note2 but the frontend is missing their implementations; create React icon
components named ArrowLeftContained2, ArrowRightContained2, and Note2 (exported
as default) matching the pattern used by existing icons, add corresponding files
for each in the icons directory, and register/import them in the Icon.tsx
mapping so Icon.tsx returns these components for the IconName values;
alternatively, if these enum values are not needed, remove them from the schema
to keep Icon.tsx and the icon component set in sync.
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
The latest updates on your projects.
|
|
Cancelling this PR. Doing the backend and front end in same ticket #8596 |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.