Skip to content
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: resolver miniguides #1636

Merged
merged 13 commits into from
Jul 3, 2024
Merged

feat: resolver miniguides #1636

merged 13 commits into from
Jul 3, 2024

Conversation

kemuru
Copy link
Contributor

@kemuru kemuru commented Jul 1, 2024

PR-Codex overview

The focus of this PR is to update styles and dependencies related to UI components in the project.

Detailed summary

  • Added padding to various components for landscape view
  • Updated @kleros/ui-components-library to version 2.14.0
  • Refactored SVG styling for mini guides components
  • Removed unused imports and styles

The following files were skipped due to too many changes: web/src/components/Popup/MiniGuides/MainStructureTemplate.tsx, web/src/pages/Resolver/index.tsx, web/src/components/Popup/MiniGuides/DisputeResolver/index.tsx, web/src/components/Popup/MiniGuides/Onboarding/index.tsx, web/src/assets/svgs/mini-guides/dispute-resolver/parameters.svg, web/src/assets/svgs/mini-guides/dispute-resolver/policy.svg, web/src/assets/svgs/mini-guides/dispute-resolver/parties.svg, web/src/assets/svgs/mini-guides/dispute-resolver/start-a-case.svg, web/src/assets/svgs/mini-guides/dispute-resolver/voting-options.svg, web/src/assets/svgs/mini-guides/dispute-resolver/well-done.svg

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • New Features

    • Improved paragraph styling for better readability in the MiniGuides popup.
  • Style

    • Added new padding-bottom styles to various components for consistent layout and spacing across different pages.
  • Refactor

    • Removed the Close styled component from the MiniGuides popup, streamlining the close action logic.
  • Chores

    • Updated @kleros/ui-components-library version to ^2.14.0 in package.json.

Copy link
Contributor

coderabbitai bot commented Jul 1, 2024

Walkthrough

The changes focus on improving the styling and UI components across multiple files in the web directory. Enhancements include adding styled components for better paragraph rendering, updating padding-bottom properties with dynamic values in several Container components, and refining popup close action handling. Additionally, the @kleros/ui-components-library dependency version has been updated in the package.json file.

Changes

File(s) Change Summary
web/src/components/Popup/MiniGuides/PageContentsTemplate.tsx Introduced StyledParagraph styled component and updated LeftContent component to utilize this new styling
web/src/pages/Resolver/Briefing/Title.tsx Added padding-bottom with a dynamic value in the Container styled component
web/src/pages/Resolver/Parameters/Category.tsx Added padding-bottom style rule to the Container component
web/src/pages/Resolver/Parameters/Court.tsx Added padding-bottom with responsive size calculation to the Container component
web/src/pages/Resolver/Parameters/Jurors.tsx Added padding-bottom to the Container component
web/src/pages/Resolver/Policy/index.tsx Added padding-bottom with a responsive size calculation to the Container component
web/package.json Updated @kleros/ui-components-library version from ^2.12.0 to ^2.14.0
web/src/components/Popup/MiniGuides/MainStructureTemplate.tsx Removed Close styled component and refactored close action logic to directly call onClose() and removeOnboardingHashPath() functions

Poem

Amid the lines of code we weave,
Styled paragraphs now do the deed.
With padding, margins, tweaks refined,
A smoother UI, you'll surely find.
The library updated, functions clear,
This patch is done, let's give a cheer!
🐇✨💻

Tip

AI model upgrade

gpt-4o model for reviews and chat is now live

OpenAI claims that this model is better at understanding and generating code than the previous models. Please join our Discord Community to provide any feedback or to report any issues.


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kemuru kemuru changed the title feat: setup structure for resolver miniguides feat: resolver miniguides Jul 1, 2024
Copy link

netlify bot commented Jul 1, 2024

Deploy Preview for kleros-v2 ready!

Name Link
🔨 Latest commit 062af96
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2/deploys/6685742db5763300084e3ca6
😎 Deploy Preview https://deploy-preview-1636--kleros-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jul 1, 2024

Deploy Preview for kleros-v2-neo ready!

Name Link
🔨 Latest commit 062af96
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2-neo/deploys/6685742daaa6880009213b2f
😎 Deploy Preview https://deploy-preview-1636--kleros-v2-neo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jul 1, 2024

Deploy Preview for kleros-v2-university ready!

Name Link
🔨 Latest commit 062af96
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2-university/deploys/6685742d2f92f80008bba912
😎 Deploy Preview https://deploy-preview-1636--kleros-v2-university.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kemuru kemuru added the Package: Web Court web frontend label Jul 1, 2024
@kemuru kemuru linked an issue Jul 1, 2024 that may be closed by this pull request
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between d701b0d and 95f1400.

Files selected for processing (3)
  • web/src/components/Popup/MiniGuides/DisputeResolver/CrowdfundAppeal.tsx (1 hunks)
  • web/src/components/Popup/MiniGuides/DisputeResolver/index.tsx (1 hunks)
  • web/src/pages/Resolver/index.tsx (4 hunks)
Additional comments not posted (3)
web/src/components/Popup/MiniGuides/DisputeResolver/CrowdfundAppeal.tsx (1)

1-40: LGTM!

The CrowdfundAppeal component is well-structured and leverages styled-components effectively to apply theme-based styling to the SVG.

web/src/components/Popup/MiniGuides/DisputeResolver/index.tsx (1)

1-39: LGTM!

The DisputeResolver component is well-structured and integrates seamlessly with the PageContentsTemplate component. The prop types and usage are appropriate.

web/src/pages/Resolver/index.tsx (1)

Line range hint 5-90: LGTM!

The DisputeResolver component uses the useToggle hook effectively to manage the state of isDisputeResolverMiniGuideOpen. The integration of the HowItWorks component with the Resolver component as the MiniGuideComponent is well-implemented.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 1, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 95f1400 and 184cdea.

Files ignored due to path filters (6)
  • web/src/assets/svgs/mini-guides/dispute-resolver/parameters.svg is excluded by !**/*.svg
  • web/src/assets/svgs/mini-guides/dispute-resolver/parties.svg is excluded by !**/*.svg
  • web/src/assets/svgs/mini-guides/dispute-resolver/policy.svg is excluded by !**/*.svg
  • web/src/assets/svgs/mini-guides/dispute-resolver/start-a-case.svg is excluded by !**/*.svg
  • web/src/assets/svgs/mini-guides/dispute-resolver/voting-options.svg is excluded by !**/*.svg
  • web/src/assets/svgs/mini-guides/dispute-resolver/well-done.svg is excluded by !**/*.svg
Files selected for processing (8)
  • web/src/components/Popup/MiniGuides/DisputeResolver/Parameters.tsx (1 hunks)
  • web/src/components/Popup/MiniGuides/DisputeResolver/Parties.tsx (1 hunks)
  • web/src/components/Popup/MiniGuides/DisputeResolver/Policy.tsx (1 hunks)
  • web/src/components/Popup/MiniGuides/DisputeResolver/StartACase.tsx (1 hunks)
  • web/src/components/Popup/MiniGuides/DisputeResolver/VotingOptions.tsx (1 hunks)
  • web/src/components/Popup/MiniGuides/DisputeResolver/WellDone.tsx (1 hunks)
  • web/src/components/Popup/MiniGuides/DisputeResolver/index.tsx (1 hunks)
  • web/src/components/Popup/MiniGuides/PageContentsTemplate.tsx (2 hunks)
Files skipped from review due to trivial changes (2)
  • web/src/components/Popup/MiniGuides/DisputeResolver/Parameters.tsx
  • web/src/components/Popup/MiniGuides/DisputeResolver/StartACase.tsx
Files skipped from review as they are similar to previous changes (1)
  • web/src/components/Popup/MiniGuides/DisputeResolver/index.tsx
Additional context used
Biome
web/src/components/Popup/MiniGuides/PageContentsTemplate.tsx

[error] 71-71: Avoid passing content using the dangerouslySetInnerHTML prop.

Setting content using code can expose users to cross-site scripting (XSS) attacks

(lint/security/noDangerouslySetInnerHtml)

Additional comments not posted (5)
web/src/components/Popup/MiniGuides/DisputeResolver/Policy.tsx (1)

1-31: Good use of styled-components and theme variables.

The use of styled-components and theme variables for styling the SVG ensures consistency and maintainability.

web/src/components/Popup/MiniGuides/DisputeResolver/Parties.tsx (1)

1-31: Good use of styled-components and theme variables.

The use of styled-components and theme variables for styling the SVG ensures consistency and maintainability.

web/src/components/Popup/MiniGuides/DisputeResolver/VotingOptions.tsx (1)

1-35: Good use of styled-components and theme variables.

The use of styled-components and theme variables for styling the SVG ensures consistency and maintainability.

web/src/components/Popup/MiniGuides/DisputeResolver/WellDone.tsx (1)

1-47: Good use of styled-components and theme variables.

The use of styled-components and theme variables for styling the SVG ensures consistency and maintainability.

web/src/components/Popup/MiniGuides/PageContentsTemplate.tsx (1)

45-51: LGTM!

The StyledParagraph component is well-defined with appropriate styling attributes.

@kemuru kemuru marked this pull request as ready for review July 2, 2024 11:43
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 184cdea and 8b076c5.

Files selected for processing (8)
  • web/src/components/Popup/MiniGuides/Onboarding/index.tsx (5 hunks)
  • web/src/pages/Resolver/Briefing/Title.tsx (1 hunks)
  • web/src/pages/Resolver/Parameters/Category.tsx (1 hunks)
  • web/src/pages/Resolver/Parameters/Court.tsx (1 hunks)
  • web/src/pages/Resolver/Parameters/Jurors.tsx (1 hunks)
  • web/src/pages/Resolver/Policy/index.tsx (1 hunks)
  • web/src/pages/Resolver/Timeline.tsx (1 hunks)
  • web/src/pages/Resolver/index.tsx (5 hunks)
Files skipped from review due to trivial changes (3)
  • web/src/pages/Resolver/Parameters/Court.tsx
  • web/src/pages/Resolver/Parameters/Jurors.tsx
  • web/src/pages/Resolver/Timeline.tsx
Files skipped from review as they are similar to previous changes (1)
  • web/src/pages/Resolver/index.tsx
Additional comments not posted (10)
web/src/pages/Resolver/Briefing/Title.tsx (1)

19-19: LGTM!

The addition of responsive padding to the Container styled component is correct and consistent with the project's styling conventions.

web/src/pages/Resolver/Parameters/Category.tsx (1)

19-19: LGTM!

The addition of responsive padding to the Container styled component is correct and consistent with the project's styling conventions.

web/src/pages/Resolver/Policy/index.tsx (1)

23-23: LGTM!

The addition of responsive padding to the Container styled component is correct and consistent with the project's styling conventions.

web/src/components/Popup/MiniGuides/Onboarding/index.tsx (7)

10-10: LGTM!

The addition of the new import for DisputeResolver is correct and consistent with the project's conventions.


39-46: LGTM!

The addition of the new link for Dispute Resolver in the leftPageContents array is correct and consistent with the project's conventions.


62-62: LGTM!

The addition of the new state variable isDisputeResolverMiniGuideOpen is correct and consistent with the project's conventions.


69-70: LGTM!

The update to the isAnyMiniGuideOpen variable to include isDisputeResolverMiniGuideOpen is correct and consistent with the project's conventions.


77-78: LGTM!

The update to the canCloseOnboarding variable to include isDisputeResolverMiniGuideOpen is correct and consistent with the project's conventions.


91-92: LGTM!

The update to the toggleSubMiniGuide function to include Dispute Resolver is correct and consistent with the project's conventions.


113-113: LGTM!

The update to the return statement to include the DisputeResolver component is correct and consistent with the project's conventions.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 8b076c5 and 598df35.

Files selected for processing (2)
  • web/src/components/Popup/MiniGuides/DisputeResolver/index.tsx (1 hunks)
  • web/src/components/Popup/MiniGuides/PageContentsTemplate.tsx (2 hunks)
Files skipped from review as they are similar to previous changes (2)
  • web/src/components/Popup/MiniGuides/DisputeResolver/index.tsx
  • web/src/components/Popup/MiniGuides/PageContentsTemplate.tsx

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 2, 2024
Copy link
Contributor

@Harman-singh-waraich Harman-singh-waraich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks really good,

One thing i would update is the gap between "close" button and the svg.
Currently it tricks the eye into thinking that the close button is not aligned with the "How it works" text.
So make the gap between close button and svg more.

Screenshot 2024-07-02 at 6 01 55 PM

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 598df35 and 4669205.

Files selected for processing (2)
  • web/src/components/Popup/MiniGuides/MainStructureTemplate.tsx (2 hunks)
  • web/src/pages/Resolver/index.tsx (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • web/src/pages/Resolver/index.tsx
Additional comments not posted (2)
web/src/components/Popup/MiniGuides/MainStructureTemplate.tsx (2)

Line range hint 14-14: LGTM!

The addition of padding-bottom using responsiveSize enhances the responsiveness of the LeftContainer component.


182-182: LGTM!

The addition of padding using responsiveSize enhances the responsiveness of the RightContainer component.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 2, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between d89e6ac and 0035cd3.

Files selected for processing (1)
  • web/src/components/Popup/MiniGuides/Onboarding/index.tsx (6 hunks)
Files skipped from review as they are similar to previous changes (1)
  • web/src/components/Popup/MiniGuides/Onboarding/index.tsx

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 2, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 0035cd3 and bb82c67.

Files selected for processing (2)
  • web/src/components/Popup/MiniGuides/JurorLevels.tsx (1 hunks)
  • web/src/components/Popup/MiniGuides/PageContentsTemplate.tsx (2 hunks)
Files skipped from review due to trivial changes (1)
  • web/src/components/Popup/MiniGuides/JurorLevels.tsx
Files skipped from review as they are similar to previous changes (1)
  • web/src/components/Popup/MiniGuides/PageContentsTemplate.tsx

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 2, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between bb82c67 and eafab3e.

Files selected for processing (6)
  • web/src/components/Popup/MiniGuides/PageContentsTemplate.tsx (2 hunks)
  • web/src/pages/Resolver/Briefing/Title.tsx (1 hunks)
  • web/src/pages/Resolver/Parameters/Category.tsx (1 hunks)
  • web/src/pages/Resolver/Parameters/Court.tsx (1 hunks)
  • web/src/pages/Resolver/Parameters/Jurors.tsx (3 hunks)
  • web/src/pages/Resolver/Policy/index.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (6)
  • web/src/components/Popup/MiniGuides/PageContentsTemplate.tsx
  • web/src/pages/Resolver/Briefing/Title.tsx
  • web/src/pages/Resolver/Parameters/Category.tsx
  • web/src/pages/Resolver/Parameters/Court.tsx
  • web/src/pages/Resolver/Parameters/Jurors.tsx
  • web/src/pages/Resolver/Policy/index.tsx

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 3, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between eafab3e and 21a9676.

Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
Files selected for processing (2)
  • web/package.json (1 hunks)
  • web/src/components/Popup/MiniGuides/MainStructureTemplate.tsx (3 hunks)
Files skipped from review due to trivial changes (1)
  • web/package.json
Files skipped from review as they are similar to previous changes (1)
  • web/src/components/Popup/MiniGuides/MainStructureTemplate.tsx

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 3, 2024
Copy link

codeclimate bot commented Jul 3, 2024

Code Climate has analyzed commit 062af96 and detected 9 issues on this pull request.

Here's the issue category breakdown:

Category Count
Duplication 9

View more on Code Climate.

Copy link

sonarqubecloud bot commented Jul 3, 2024

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

Commits

Files that changed from the base of the PR and between 21a9676 and 062af96.

Files selected for processing (1)
  • web/src/components/Popup/MiniGuides/MainStructureTemplate.tsx (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • web/src/components/Popup/MiniGuides/MainStructureTemplate.tsx

Copy link
Contributor

@alcercu alcercu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@alcercu alcercu added this pull request to the merge queue Jul 3, 2024
Merged via the queue into dev with commit 0fc3ef7 Jul 3, 2024
21 of 23 checks passed
@kemuru kemuru deleted the feat/add-resolver-miniguides branch July 3, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mini-guide: Dispute resolver
3 participants