Closed Harman-singh-waraich closed 4 days ago
The pull request introduces significant changes across multiple files in the Kleros application. Key modifications include updates to the .gitignore
file to exclude additional build artifacts and cache files, the creation of a new ESLint configuration, and the addition of a package.json
file for the kleros-app
package. Several React components and utility functions are introduced, including user authentication features and hooks for session storage. Additionally, existing files are updated for improved user feedback mechanisms during operations such as email updates and file uploads.
File Path | Change Summary |
---|---|
.gitignore |
Added entries for .parcel-cache , Yarn v2 cache, Serverless Webpack, .stylelintcache , .svelte-kit , and .history . |
kleros-app/eslint.config.mjs |
Created a new ESLint configuration with various plugins and rules for JavaScript/TypeScript projects. |
kleros-app/package.json |
Introduced a new package.json file specifying metadata, scripts, and dependencies for the @kleros/kleros-app package. |
kleros-app/src/App.tsx |
Added a new App component as the entry point for the React application. |
kleros-app/src/index.html |
Created a new HTML file for the Kleros application with basic structure and a script tag for the main module. |
kleros-app/src/lib/atlas/hooks/useSessionStorage.ts |
Introduced a custom hook for managing session storage state. |
kleros-app/src/lib/atlas/index.ts |
Exported all entities from the providers and utils modules. |
kleros-app/src/lib/atlas/providers/AtlasProvider.tsx |
Added a context provider for user authentication and interactions with an Atlas service. |
kleros-app/src/lib/atlas/utils/addUser.ts |
Created a GraphQL mutation for adding a user with error handling. |
kleros-app/src/lib/atlas/utils/createMessage.ts |
Updated the createMessage function to include an optional statement parameter. |
kleros-app/src/lib/atlas/utils/fetchUser.ts |
Introduced functionality to fetch user data from a GraphQL API. |
kleros-app/src/lib/atlas/utils/getNonce.ts |
Added a function to fetch a nonce value associated with an Ethereum address. |
kleros-app/src/lib/atlas/utils/index.ts |
Added new enums for Products and Roles , and re-exported utility functions. |
kleros-app/src/lib/atlas/utils/loginUser.ts |
Created a GraphQL mutation for user login functionality. |
kleros-app/src/lib/atlas/utils/updateEmail.ts |
Introduced a GraphQL mutation for updating a user's email address. |
kleros-app/src/lib/atlas/utils/uploadToIpfs.ts |
Added functionality for uploading files to IPFS with error handling. |
web/src/components/EnsureAuth.tsx |
Enhanced the EnsureAuth component with toast notifications for user sign-in actions. |
web/src/context/AtlasProvider.tsx |
Simplified the AtlasProvider component by utilizing the _AtlasProvider from @kleros/kleros-app . |
web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/EmailVerificationInfo.tsx |
Updated to include toast notifications for email update processes. |
web/src/layout/Header/navbar/Menu/Settings/Notifications/FormContactDetails/index.tsx |
Enhanced with toast notifications for email updates and user additions. |
web/src/pages/Cases/CaseDetails/Evidence/SubmitEvidenceModal.tsx |
Improved error handling and user feedback during file uploads. |
web/src/pages/Resolver/Policy/index.tsx |
Updated file upload handling with enhanced error notifications. |
web/src/pages/Settings/EmailConfirmation/index.tsx |
Updated import paths and improved styled component formatting. |
web/src/utils/index.ts |
Added a utility function isUndefined for type safety. |
kleros-app/tsconfig.json |
Introduced a TypeScript configuration file for the Kleros application. |
package.json |
Updated workspace structure and added new development dependencies. |
prettier-config/package.json |
Upgraded the prettier dependency version. |
web/package.json |
Added a dependency on the @kleros/kleros-app package. |
web/src/utils/atlas/*.ts |
Removed various utility files related to user management and GraphQL operations. |
.gitignore
file may relate to the integration of IPFS file uploads, as the new entries could help manage files generated during the upload process.SubmitEvidenceModal
component, which involve file uploads, are relevant as they may interact with the changes made in the main PR regarding file management in the .gitignore
.Type: FeatureπΏ
, Package: Web
π In the land of code where rabbits play,
New features hop in, brightening the day.
With hooks and toasts, our app's a delight,
Ignoring the clutter, our future is bright!
So let's raise a cheer for this code we adore,
With every new change, we leap and explore! π
Name | Link |
---|---|
Latest commit | 34f25c79db4844b3c2cd8c3af50b9026257dfd79 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet-devtools/deploys/673db29045b129000822d710 |
Name | Link |
---|---|
Latest commit | |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet/deploys/673ed047a111e907ea9a22f4 |
Name | Link |
---|---|
Latest commit | 34f25c79db4844b3c2cd8c3af50b9026257dfd79 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-university/deploys/673db29076843e0008103d01 |
Code Climate has analyzed commit 34f25c79 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.
Name | Link |
---|---|
Latest commit | 34f25c79db4844b3c2cd8c3af50b9026257dfd79 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-neo/deploys/673db29018bc32000890ab09 |
Failed conditions
11.1% Duplication on New Code (required β€ 10%)
Closing as too many conflicts in yarn.lock making it dirty. Migrated changes to #1756 on latest dev
branch
PR-Codex overview
This PR focuses on restructuring the
kleros-app
codebase by removing several utility files, updating dependencies, and enhancing theAtlasProvider
. It also introduces new functionalities for user management and email handling while improving the overall application structure.Detailed summary
web/src/utils/atlas
.prettier
version inprettier-config/package.json
.isUndefined
utility function inkleros-app/src/utils/index.ts
.kleros-app/src/index.html
.App
component inkleros-app/src/App.tsx
.useSessionStorage
hook inkleros-app/src/lib/atlas/hooks/useSessionStorage.ts
.getNonce
,fetchUser
,addUser
,updateEmail
, andloginUser
.createMessage
to accept an optionalstatement
parameter.uploadToIpfs
to includeProducts
andRoles
enums.AtlasProvider
to manage user sessions and interactions with GraphQL.AtlasProvider
to use a new configuration structure.Summary by CodeRabbit
New Features
App
as the entry point for the application.useSessionStorage
for managing state synchronized with session storage.AtlasProvider
for user authentication and interactions with the Atlas service.addUser
,loginUser
, andupdateEmail
.Enhancements
EnsureAuth
andEmailVerificationInfo
components to provide better user interaction.Bug Fixes
Chores
.gitignore
andtsconfig.json
, for better development experience.