-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat(web): Service web contact form - Add custom fields for 'Vinnueftirlitið' #17202
feat(web): Service web contact form - Add custom fields for 'Vinnueftirlitið' #17202
Conversation
WalkthroughThe changes in this pull request enhance the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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
🧹 Outside diff range and nitpick comments (2)
apps/web/components/ServiceWeb/Forms/StandardForm/StandardForm.tsx (2)
187-189
: Consider localizing the checkbox value instead of hardcoding 'Já'Hardcoding
'Já'
as the checkbox value may cause issues with internationalization if the application needs to support multiple locales in the future. It would be better to use a localized string or thelabel
value to ensure proper localization.
526-648
: Reduce code duplication in category-specific field renderingThe
useEffect
hook contains multiple switch cases where similar JSX code is repeated for differentVinnueftirlitidCategories
. To improve maintainability and readability, consider refactoring this code by extracting common elements into reusable components or helper functions.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (3)
apps/web/components/ServiceWeb/Forms/StandardForm/StandardForm.tsx
(6 hunks)apps/web/components/ServiceWeb/Forms/StandardForm/types.ts
(1 hunks)apps/web/screens/ServiceWeb/Forms/utils.ts
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
apps/web/screens/ServiceWeb/Forms/utils.ts (1)
Pattern apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/web/components/ServiceWeb/Forms/StandardForm/types.ts (1)
Pattern apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/web/components/ServiceWeb/Forms/StandardForm/StandardForm.tsx (1)
Pattern apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
🔇 Additional comments (4)
apps/web/components/ServiceWeb/Forms/StandardForm/StandardForm.tsx (2)
29-32
: New imports for added components and categories
The imports for CheckboxController
, InputController
, and VinnueftirlitidCategories
are correctly added to support the new functionality.
Also applies to: 48-48
100-107
: Labels added for new fields are appropriate
The labels for the new fields are correctly defined and maintain consistency with existing labels.
apps/web/components/ServiceWeb/Forms/StandardForm/types.ts (1)
4-4
: Updated CategoryId to include VinnueftirlitidCategories
The CategoryId
type correctly includes the new VinnueftirlitidCategories
, and the import is properly added.
Also applies to: 11-11
apps/web/screens/ServiceWeb/Forms/utils.ts (1)
100-113
: Added VinnueftirlitidCategories enum for new categories
The new VinnueftirlitidCategories
enum is correctly defined with all required categories.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17202 +/- ##
==========================================
- Coverage 35.75% 35.75% -0.01%
==========================================
Files 6935 6935
Lines 148076 148012 -64
Branches 42214 42180 -34
==========================================
- Hits 52946 52923 -23
+ Misses 95130 95089 -41
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportBranch report: ✅ 0 Failed, 84 Passed, 0 Skipped, 31.9s Total Time |
Service web contact form - Add custom fields for 'Vinnueftirlitið'
What
Why
Screenshots / Gifs
Screen.Recording.2024-12-11.at.13.48.53.mov
Checklist:
Summary by CodeRabbit
New Features
BasicCheckbox
component for enhanced user interaction.Bug Fixes
Documentation