Open Harman-singh-waraich opened 4 days ago
This pull request introduces several significant changes to the kleros-app
project, including the addition of a README.md
file for documentation, a new ESLint configuration file, and a package.json
file for dependency management. It also includes the creation of various components and utility functions, such as a custom hook for session storage and several GraphQL operations for user management. Additionally, there are updates to existing components and the removal of obsolete files, enhancing the overall structure and organization of the codebase.
File Path | Change Summary |
---|---|
kleros-app/README.md |
New documentation file created for the kleros-app project. |
kleros-app/eslint.config.mjs |
New ESLint configuration file added to enforce coding standards. |
kleros-app/package.json |
New package.json file created for the @kleros/kleros-app package. |
kleros-app/src/App.tsx |
New App component created as the entry point of the application. |
kleros-app/src/index.html |
New HTML file created as the main entry point for the application. |
kleros-app/src/lib/atlas/hooks/useSessionStorage.ts |
New custom hook for managing session storage state. |
kleros-app/src/lib/atlas/index.ts |
Exported all entities from ./providers and ./utils modules. |
kleros-app/src/lib/atlas/providers/AtlasProvider.tsx |
New context provider for user authentication and interactions with Atlas service. |
kleros-app/src/lib/atlas/providers/index.ts |
Exported all entities from AtlasProvider . |
kleros-app/src/lib/atlas/utils/addUser.ts |
New utility function for adding a user via GraphQL mutation. |
kleros-app/src/lib/atlas/utils/createMessage.ts |
Updated createMessage function to include an optional statement parameter. |
kleros-app/src/lib/atlas/utils/fetchUser.ts |
New utility function for fetching user data from a GraphQL API. |
kleros-app/src/lib/atlas/utils/getNonce.ts |
New utility function for fetching a nonce associated with an address using GraphQL. |
kleros-app/src/lib/atlas/utils/index.ts |
Introduced Products and Roles enums and re-exported various utility functions. |
kleros-app/src/lib/atlas/utils/loginUser.ts |
New utility function for user login via GraphQL mutation. |
kleros-app/src/lib/atlas/utils/updateEmail.ts |
New utility function for updating a user's email address via GraphQL mutation. |
kleros-app/src/lib/atlas/utils/uploadToIpfs.ts |
New utility function for uploading files to IPFS. |
kleros-app/src/lib/index.ts |
Exported all members from the module. |
kleros-app/src/utils/index.ts |
New utility function isUndefined added. |
kleros-app/tsconfig.json |
New TypeScript configuration file added. |
package.json |
Added new workspace for kleros-app . |
prettier-config/package.json |
Updated prettier dependency version. |
web/.eslintrc.json |
Deleted ESLint configuration file. |
web/eslint.config.mjs |
New ESLint configuration file added. |
web/package.json |
Updated dependencies and added new packages. |
web/src/components/EnsureAuth.tsx |
Updated to use new toast notifications and changed import source. |
web/src/context/AtlasProvider.tsx |
Simplified by removing custom context management and using _AtlasProvider from @kleros/kleros-app . |
web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/EmailVerificationInfo.tsx |
Updated import paths and added toast notifications for email updates. |
web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx |
Updated import paths and added toast notifications for user addition and email updates. |
web/src/pages/Cases/CaseDetails/Evidence/SubmitEvidenceModal.tsx |
Enhanced error handling and updated import paths. |
web/src/pages/Resolver/Policy/index.tsx |
Updated import paths and improved toast notifications for file uploads. |
web/src/pages/Settings/EmailConfirmation/index.tsx |
Updated import path and formatted styled components. |
web/src/utils/atlas/addUser.ts |
Deleted file containing user addition functionality. |
web/src/utils/atlas/fetchUser.ts |
Deleted file containing user fetching functionality. |
web/src/utils/atlas/getNonce.ts |
Deleted file containing nonce fetching functionality. |
web/src/utils/atlas/index.ts |
Deleted aggregator file for utility functions. |
web/src/utils/atlas/loginUser.ts |
Deleted file containing user login functionality. |
web/src/utils/atlas/updateEmail.ts |
Deleted file containing email update functionality. |
web/src/utils/atlas/uploadToIpfs.ts |
Deleted file containing IPFS upload functionality. |
web/src/utils/uploadFormDataToIPFS.ts |
Deleted file for uploading FormData to IPFS. |
web/src/utils/wrapWithToast.ts |
Added new toast utility functions for user feedback. |
kleros-app/vite.config.js |
New Vite configuration file added for the kleros-app library. |
web/netlify.toml |
Updated Netlify build command for workspace installations. |
uploadFile
method in AtlasProvider
, which is directly related to the changes in the main PR that document how to use the AtlasProvider
for file uploads.SubmitEvidenceModal
component, which is relevant as it involves the submission of evidence, likely utilizing the uploadFile
method introduced in the main PR.SubmitEvidenceModal
, which is pertinent to the changes in the main PR that document the usage of AtlasProvider
for managing user authentication and interactions.AtlasProvider
to improve session verification and error handling, which aligns with the main PR's focus on documenting the AtlasProvider
and its functionalities.emailUpdateableAt
, which may relate to the user management aspects discussed in the main PR regarding the AtlasProvider
.🐇 In the garden, changes bloom bright,
A README to guide, shining light.
New hooks and functions, all in a row,
With toasts for the users, watch them glow!
Kleros-app grows, a leap and a bound,
In this code wonderland, joy is found! 🌼
Name | Link |
---|---|
Latest commit | 86a88bcfe4af595d07e48b131bb06c7b2f2b91e9 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-neo/deploys/6744acee4bb1d20008aac960 |
Deploy Preview | https://deploy-preview-1756--kleros-v2-neo.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Name | Link |
---|---|
Latest commit | 86a88bcfe4af595d07e48b131bb06c7b2f2b91e9 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet/deploys/6744aceee7f74e0008402c2d |
Name | Link |
---|---|
Latest commit | 86a88bcfe4af595d07e48b131bb06c7b2f2b91e9 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-university/deploys/6744aceec58f770008fc0909 |
Deploy Preview | https://deploy-preview-1756--kleros-v2-university.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Name | Link |
---|---|
Latest commit | 86a88bcfe4af595d07e48b131bb06c7b2f2b91e9 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet-devtools/deploys/6744aceed17d8800083b9958 |
Code Climate has analyzed commit 86a88bcf and detected 30 issues on this pull request.
Here's the issue category breakdown:
Category | Count |
---|---|
Duplication | 6 |
Style | 24 |
View more on Code Climate.
Failed conditions
20.9% Duplication on New Code (required ≤ 10%)
PR-Codex overview
This PR focuses on restructuring the
kleros-app
library by consolidating utility functions, enhancing type safety, and improving error handling. It also updates various dependencies and refines components for better user experience.Detailed summary
web/src/utils/atlas
.kleros-app/src/lib/atlas/utils
.kleros-app/src/lib/atlas/providers/AtlasProvider
for improved functionality.Summary by CodeRabbit
Release Notes
New Features
README.md
for project documentation.App
component as the entry point for the application.useSessionStorage
for managing session storage state.package.json
file defining the application's metadata and dependencies.Enhancements
AtlasProvider
.netlify.toml
configuration for deployment.Bug Fixes
Documentation
Chores
kleros-app
in the project structure.