-
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(j-s): Tooltip with info about service not being required #17200
Conversation
WalkthroughThe changes in this pull request involve the addition of a new message definition for a tooltip in 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 (1)
apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.strings.ts (1)
41-42
: Consider extracting the threshold amount and date as constants.The hardcoded amount (1,355,762 kr) and date (01.01.2024) in the message could require code changes if these values change in the future.
Consider creating constants and using string interpolation:
+ const THRESHOLD_AMOUNT = 1355762; + const EFFECTIVE_DATE = '01.01.2024'; + serviceRequirementNotRequiredTooltip: { id: 'judicial.system.core:court.indictments.completed.service_requirement_not_required_tooltip', defaultMessage: - 'Ekki þarf að birta dóm þar sem sektarfjárhæð er lægri en sem nemur áfrýjunarfjárhæð í einkamáli kr. 1.355.762. Gildir frá 01.01.2024', + `Ekki þarf að birta dóm þar sem sektarfjárhæð er lægri en sem nemur áfrýjunarfjárhæð í einkamáli kr. ${THRESHOLD_AMOUNT.toLocaleString('is-IS')}. Gildir frá ${EFFECTIVE_DATE}`, description: 'Notað sem tooltip í valmöguleika fyrir það þegar ekki skal birta dómdfellda dóminn.', },This approach would:
- Make future updates easier
- Centralize these values for reuse
- Ensure consistent formatting of the amount using
toLocaleString
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.strings.ts
(1 hunks)apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.tsx
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.tsx
🧰 Additional context used
📓 Path-based instructions (1)
apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.strings.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."
🔇 Additional comments (1)
apps/judicial-system/web/src/routes/Court/Indictments/Completed/Completed.strings.ts (1)
39-45
: LGTM! The message structure follows the established pattern.
The new tooltip message is well-structured with proper ID, defaultMessage, and description fields, maintaining consistency with other messages in the file.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17200 +/- ##
==========================================
- Coverage 35.76% 35.76% -0.01%
==========================================
Files 6931 6931
Lines 147972 147958 -14
Branches 42170 42167 -3
==========================================
- Hits 52929 52919 -10
+ Misses 95043 95039 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 10 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 98 Total Test Services: 0 Failed, 90 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (2) |
Bæta við skýringatexta (info eða texti fyrir ofan box) hvenær birta á dóm og hvenær ekki
What
Added tooltip to service not required radio button option
Why
To clarify when servicing is not required
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Refactor
Style
Tests
Chores
Revert