-
Notifications
You must be signed in to change notification settings - Fork 57
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
fix(regulations-admin): Modal visible by default. Bugfixing. #14814
Conversation
WalkthroughThe recent updates encompass improvements and adjustments across various components and utilities. The Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- libs/portals/admin/regulations-admin/src/components/ConfirmModal/ConfirmModal.tsx (2 hunks)
- libs/portals/admin/regulations-admin/src/components/EditBasics.tsx (5 hunks)
- libs/portals/admin/regulations-admin/src/utils/formatAmendingRegulation.ts (3 hunks)
Additional Context Used
Path-based Instructions (3)
libs/portals/admin/regulations-admin/src/components/ConfirmModal/ConfirmModal.tsx (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/portals/admin/regulations-admin/src/components/EditBasics.tsx (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/portals/admin/regulations-admin/src/utils/formatAmendingRegulation.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Additional comments not posted (9)
libs/portals/admin/regulations-admin/src/components/ConfirmModal/ConfirmModal.tsx (2)
10-10
: The addition of thetitle
prop to theConfirmModalProps
interface is correct and enhances the component's flexibility.
18-18
: Thetitle
prop is correctly destructured and used within theText
component to render the modal's title.Also applies to: 40-40
libs/portals/admin/regulations-admin/src/components/EditBasics.tsx (4)
35-35
: Thereferences
state now usesDraftImpactForm[]
instead ofDraftChangeForm[]
. Ensure that this change is consistent with the rest of the codebase and thatDraftImpactForm
is the correct type to use here.
36-36
: The default value ofisModalVisible
has been changed fromfalse
totrue
, which aligns with the objective of making the modal visible by default.
37-37
: ThehasConfirmed
state variable has been added and initialized tofalse
. This is a useful addition for tracking user confirmation actions.
38-38
: ThehasSeenModal
state variable has been added and initialized tofalse
. This is a useful addition for tracking whether the user has seen the modal.libs/portals/admin/regulations-admin/src/utils/formatAmendingRegulation.ts (3)
29-29
: The adjustment to the template strings foramendingTitles
andrepealTitles
to conditionally remove a space after the prefix is a minor but important formatting change.Also applies to: 37-37
267-267
: The addition of the condition to check ifnewText
is'<br />'
when determining if an item is deleted is a necessary change to handle specific cases where the new text is just a line break.
369-369
: Passingitem.type
toformatAmendingRegBody
for conditional formatting is a logical change that ensures the correct formatting based on the item type.
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.
LGTM (mostly)
libs/portals/admin/regulations-admin/src/components/EditBasics.tsx
Outdated
Show resolved
Hide resolved
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
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- libs/portals/admin/regulations-admin/src/components/EditBasics.tsx (4 hunks)
Files skipped from review as they are similar to previous changes (1)
- libs/portals/admin/regulations-admin/src/components/EditBasics.tsx
Datadog ReportBranch report: ✅ 0 Failed, 24 Passed, 0 Skipped, 14.41s Total Time 🔻 Code Coverage Decreases vs Default Branch (1)
|
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
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- libs/portals/admin/regulations-admin/src/utils/formatAmendingRegulation.ts (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- libs/portals/admin/regulations-admin/src/utils/formatAmendingRegulation.ts
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14814 +/- ##
==========================================
- Coverage 36.90% 36.90% -0.01%
==========================================
Files 6322 6322
Lines 128797 128808 +11
Branches 36729 36736 +7
==========================================
Hits 47535 47535
- Misses 81262 81273 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|
* Fix amending bug * fix titles. Fix reference error * Add confirm modal * Remove console log * chore: nx format:write update dirty files --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: andes-it <builders@andes.is>
* Fix amending bug * fix titles. Fix reference error * Add confirm modal * Remove console log * chore: nx format:write update dirty files --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: andes-it <builders@andes.is>
* Fix amending bug * fix titles. Fix reference error * Add confirm modal * Remove console log * chore: nx format:write update dirty files --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: andes-it <builders@andes.is>
What
Add the confirmation modal display to show by default.
Minor bugfixing
Why
Modal not visible enough.
Bugs need to be fixed yes.
Checklist:
Summary by CodeRabbit
New Features
title
prop to the confirmation modal for customizable headings.Improvements