-
Notifications
You must be signed in to change notification settings - Fork 3
refactor: extract-dispute-templates-to-root #47
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 update involves refactoring hardcoded templates and data mappings in Curate v2 to be imported from a newly introduced external module, Changes
Poem
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 (
|
✅ Deploy Preview for curate-v2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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)
web/src/utils/submitListUtils.ts (1)
Line range hint
13-13
: Refactor suggestion: Avoid using thedelete
operator.Using
delete
can lead to performance issues due to deoptimization of the object. Consider setting the property toundefined
instead.- if (!isUndefined(listMetadata.policyURI) && listMetadata.policyURI === "") delete listMetadata.policyURI; + if (!isUndefined(listMetadata.policyURI) && listMetadata.policyURI === "") listMetadata.policyURI = undefined;
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (7)
- contracts/deploy/00-curate-v2.ts (1 hunks)
- contracts/package.json (1 hunks)
- package.json (1 hunks)
- templates/index.ts (1 hunks)
- templates/package.json (1 hunks)
- web/package.json (1 hunks)
- web/src/utils/submitListUtils.ts (2 hunks)
Files skipped from review due to trivial changes (3)
- contracts/deploy/00-curate-v2.ts
- templates/package.json
- web/package.json
Additional context used
Biome
web/src/utils/submitListUtils.ts
[error] 13-13: Avoid the delete operator which can impact performance. (lint/performance/noDelete)
Unsafe fix: Use an undefined assignment instead.
Additional comments not posted (4)
package.json (1)
25-26
: Approved addition of "templates" to workspaces.This change supports better modular management of templates, aligning with the project's goal to centralize template handling.
templates/index.ts (1)
1-92
: Approved the centralization of templates and data mappings.The new file organizes and exports templates and data mappings effectively, enhancing maintainability and reusability across the project.
contracts/package.json (1)
88-89
: Approved the addition of@kleros/curate-v2-templates
to dependencies.Adding this dependency is a crucial part of the refactoring to utilize centralized templates, which should streamline the management of template data.
web/src/utils/submitListUtils.ts (1)
8-8
: Approved the import of centralized templates.The update to import
registrationTemplate
,removalTemplate
, anddataMappings
from@kleros/curate-v2-templates
aligns well with the project's refactoring goals.
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 UI
Review profile: CHILL
Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (1)
- contracts/package.json (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- contracts/package.json
PR-Codex overview
This PR updates package dependencies, adds template files for Curate V2, and centralizes template imports for better organization.
Detailed summary
Summary by CodeRabbit
New Features
Chores
@kleros/curate-v2-templates
dependency to multiplepackage.json
files for better modularity and code management.