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

Fix: Redesign of the payment page in the final step of registration #990

Merged
merged 14 commits into from
Jan 26, 2025

Conversation

cryptogru812
Copy link
Contributor

@cryptogru812 cryptogru812 commented Jan 24, 2025

Close #954

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced registration flow with improved step visualization.
    • Added background image to registration steps.
    • Introduced step completion indicators.
    • Introduced a "Cancel" button in the checkout process.
  • UI/UX Improvements

    • Refined styling for registration, checkout, and upsell components.
    • Updated color schemes using CSS variables.
    • Improved responsive design across components.
    • Streamlined component rendering logic.
  • Text Updates

    • Updated promotional messaging for domain registration offers.
    • Modified text styles for form legends and descriptions.
  • Minor Enhancements

    • Added visual separators in UI components.
    • Enhanced error handling in wallet connection process.
    • Improved layout and structure of various components.

Copy link

vercel bot commented Jan 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app-starknet-id ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 26, 2025 5:16am
sepolia-app-starknet-id ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 26, 2025 5:16am

Copy link

vercel bot commented Jan 24, 2025

@aidenwong812 is attempting to deploy a commit to the LFG Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

coderabbitai bot commented Jan 24, 2025

Walkthrough

The pull request involves a comprehensive redesign of the registration flow, focusing on the payment page and associated components. Changes span multiple files including registerV3.tsx, checkoutCard.tsx, registerSteps.tsx, upsellCard.tsx, and related CSS modules. The modifications aim to enhance the visual structure, improve component rendering, and update styling to create a more cohesive and responsive user interface for the domain registration process.

Changes

File Change Summary
components/domains/registerV3.tsx Restructured rendering logic based on currentStep state, simplified conditional rendering of components.
components/domains/steps/checkoutCard.tsx Repositioned UpsellCard rendering, restructured button container with new styling, added "Cancel" button.
components/domains/steps/registerSteps.tsx Added background image, modified step progress icons and layout, introduced DoneFilledIcon, adjusted conditions for icon rendering.
components/domains/steps/upsellCard.tsx Simplified component structure, added Divider, modified text and layout.
styles/components/registerV3.module.css Updated layout, added new classes, introduced responsive design elements.
styles/components/textField.module.css Modified font properties for error and legend classes.
styles/components/upsellCard.module.css Significant styling updates, added responsive design elements.
utils/discounts/evergreen.ts Updated promotional description text for renewal and registration.
styles/components/button.module.css Changed border-radius from 500px to 8px for button styling.
styles/components/evmModalMessage.module.css Updated color property for .cardDesc class to use CSS variable.
styles/components/icons.module.css Modified color property for .tooltipSub class, removing fallback color.
styles/discount.module.css Updated color property for .description class, removing fallback color.
styles/domain.module.css Updated color property for .description class, removing fallback color.
styles/globals.css Modified color definitions and introduced new CSS variable --content-600.
styles/verify.module.css Updated color property for .subtitle class, removing fallback color.

Assessment against linked issues

Objective Addressed Explanation
Redesign payment page in registration step 3 (#954)
Improve visual layout of registration flow (#954)
Enhance responsiveness of UI components (#954)

Possibly related PRs

  • ref: delete mail #934: The changes in the RegisterV3 component involve the removal of the groups prop, which is also reflected in the CheckoutCard component's updates in this PR, indicating a related restructuring of component props and functionality.
  • fix: Refont domain registration step 2 #993: The modifications in the RegisterV3 component's CSS file show a complete removal and re-addition of styles, which aligns with the overall refont efforts in this PR, suggesting a connection in the visual presentation and styling of the registration process.

Suggested labels

🔥 Ready for review

Suggested reviewers

  • Marchand-Nicolas

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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.

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

🧹 Nitpick comments (15)
components/domains/steps/upsellCard.tsx (3)

46-49: Check heading structure for accessibility.
Using <h3> is beneficial for emphasis, but ensure there's a logical heading hierarchy (e.g., preceding <h1> or <h2>) to assist screen readers and maintain semantic correctness.


51-57: Provide a descriptive aria-labelledby.
Instead of "demo-controlled-radio-buttons-group", consider using a more descriptive label ID to improve accessibility and clarity for screen readers.

-aria-labelledby="demo-controlled-radio-buttons-group"
+aria-labelledby="upsell-selection-radio-buttons-group"

58-65: Consider i18n strategy for the label text.
“‘Yes, count on me!’” works well for informal contexts, but if internationalization is a requirement, externalize these strings to a localization file.

components/domains/registerV3.tsx (2)

58-72: Consider validating domain inputs
This conditional block for the SearchBar and UserInfoForm is clear. However, there’s no apparent validation or feedback mechanism if the domain is invalid or left empty. Consider adding some basic validation or an error message to enhance user experience.


73-89: Consolidate multi-step registration logic
The rendering for steps 2 and 3 looks correct. As the registration flow scales (e.g., new steps or variants), repeating multiple conditionals might introduce complexity. Centralizing the logic (e.g., using a step-based map or a wizard-like component) could reduce future maintenance complexity.

components/domains/steps/registerSteps.tsx (3)

50-60: Group label and icon for accessibility
Bundling the label with ContactCardIcon helps visual grouping, but consider adding aria-label or descriptive text for screen readers.


75-88: PFP step logic
The PFP step is rendered only if showPfp is true, which depends on whether the user has NFTs. This is a clean approach, but ensure that skipping this step (when the user has no NFTs) won’t cause issues in subsequent steps.


89-92: Optional refactor for icon code reuse
Both the ContactCardIcon and this PfpIcon share a similar structure. Consider extracting the repeated logic (icon, text, and checkmark) into a reusable smaller component to keep your code DRY.

styles/components/textField.module.css (1)

27-31: Provide a fallback for custom font
Switching to "QuickZap" from the default fonts can enhance style consistency. Add a generic fallback font (e.g., font-family: "QuickZap", sans-serif;) in case "QuickZap" fails to load.

styles/components/upsellCard.module.css (2)

44-49: Reduced font size and line height
Lowering .catch font size from 36px to 24px and line height from 42px to 32px can improve readability on smaller screens. Just confirm it still meets design guidelines for brand consistency.


53-57: Adjusting spacing and text color
Decreasing top margin and changing color to var(--content-600, #8c8989) is likely part of a broader restyle. Make sure these changes align with the site’s overall responsive design, especially in “dark mode” or theme overrides.

styles/components/registerV3.module.css (4)

3-3: Consider using relative units for container padding

While the layout changes look good, using fixed padding (166px) might cause issues on very small screens, even with the media queries. Consider using relative units (e.g., clamp()) for more fluid responsiveness.

.container {
-  padding: 0px 166px;
+  padding: 0px clamp(16px, 10vw, 166px);
}

Also applies to: 6-6, 12-12


161-165: Enhance checkout button alignment properties

The checkoutButton class could benefit from additional alignment properties to ensure consistent centering across different screen sizes.

.checkoutButton {
  width: 100%;
  display: flex;
  justify-content: center;
+  align-items: center;
+  gap: 8px;
}

340-344: Standardize breakpoints and improve mobile layout

The current breakpoints seem arbitrary and some media queries have overlapping concerns. Consider:

  1. Using standard breakpoints (e.g., 1440px, 1024px, 768px, 640px)
  2. Consolidating overlapping media queries
  3. Ensuring the mobile steps layout maintains visual hierarchy
-@media (max-width: 1570px) {
+@media (max-width: 1440px) {
   .container {
-    padding: 0px 120px;
+    padding: 0px clamp(32px, 8vw, 120px);
   }
 }

 @media screen and (max-width: 640px) {
   .progressSteps {
     width: 100%;
     flex-direction: row;
     height: 120px;
     align-items: flex-start;
     justify-content: space-around;
+    overflow-x: auto;
+    -webkit-overflow-scrolling: touch;
+    scrollbar-width: none;
   }
+  
+  .progressSteps::-webkit-scrollbar {
+    display: none;
+  }
 }

Also applies to: 378-380, 392-406


6-6: Maintain consistency in color variable usage

There's inconsistent usage of color variables throughout the file. Some colors use CSS variables (e.g., var(--background)), while others use direct hex values (e.g., #FFFFFF).

Consider converting all color values to use CSS variables for better theme consistency and maintenance:

-  background-color: #FFFFFF
+  background-color: var(--background-paper)

Also applies to: 150-150, 255-255

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d8df7ba and 873cdbb.

⛔ Files ignored due to path filters (1)
  • public/register/grass.png is excluded by !**/*.png
📒 Files selected for processing (8)
  • components/domains/registerV3.tsx (1 hunks)
  • components/domains/steps/checkoutCard.tsx (2 hunks)
  • components/domains/steps/registerSteps.tsx (3 hunks)
  • components/domains/steps/upsellCard.tsx (2 hunks)
  • styles/components/registerV3.module.css (6 hunks)
  • styles/components/textField.module.css (1 hunks)
  • styles/components/upsellCard.module.css (2 hunks)
  • utils/discounts/evergreen.ts (2 hunks)
✅ Files skipped from review due to trivial changes (2)
  • utils/discounts/evergreen.ts
  • components/domains/steps/checkoutCard.tsx
🔇 Additional comments (10)
components/domains/steps/upsellCard.tsx (3)

3-3: Import looks good.
It's appropriate to import these Material UI components here, and there's no immediate issue with this addition.


66-70: Maintain consistent tone across labels.
“‘No, thanks!’” is consistent with the overall friendly tone. If future alternatives are considered, ensure uniformity in style and messaging.


73-73: Divider usage is appropriate.
This helps visually separate the upsell section from subsequent content. Just confirm that className="w-full" aligns with your overall layout conventions.

components/domains/steps/registerSteps.tsx (4)

2-2: New imports look correct
Importing Image from next/image and DoneFilledIcon does not introduce obvious issues. Ensure that the icon component and assets are properly licensed and loaded for production.

Also applies to: 9-9


36-42: Check responsive behavior with the background image
The additional stepsBackground container and background image can enrich the UI. Verify it doesn’t overlap or distort under smaller viewports or different breakpoints.


61-64: Conditionally displaying DoneFilledIcon
The done icon is loosely tied to currentStep >= 1. Confirm that the logic accurately reflects the step’s completion state and doesn’t inadvertently appear for uncompleted steps.


99-123: Reevaluate “greater than” vs. “greater than or equal to”
Using currentStep > 3 for the checkout step may skip displaying the icon when currentStep exactly equals 3. Verify that this condition matches the desired user journey—does the checkout step start at 3 or 4?

styles/components/upsellCard.module.css (3)

6-6: Ensure layout remains consistent when width is 100%
Replacing a fixed container width with width: 100% may cause layout shifts. Confirm that child elements or sibling components still display correctly, especially in narrow viewports.


21-21: Use of CSS variable for background
Using var(--background) is a solid approach for better theming, as long as the variable is defined globally. Ensure that there’s a fallback color if the variable isn’t available.


60-64: New .radioGroupContainer styles
Defining a dedicated container for radio inputs clarifies layout management. This pattern is good for modular design, and the border-radius: 8px; is consistent with your card style. Keep an eye on uniform padding for narrower screens.

Copy link
Collaborator

@Marchand-Nicolas Marchand-Nicolas left a comment

Choose a reason for hiding this comment

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

Really good job! Well done :)
Just a few changes and we're good!

  • There should be a cancel button on mobile (to redirect on the home page)
image
  • On desktop, these small separators do not look the same as on figma, and they should be hidden on mobile
    image

  • The button here do not look like on figma (it should be squared)

image image
  • The text here should not be bold
image

@Marchand-Nicolas Marchand-Nicolas added the ❌ Change request Change requested from reviewer label Jan 24, 2025
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

🧹 Nitpick comments (2)
styles/components/upsellCard.module.css (2)

6-11: Remove duplicate justify-content property.

The .container class has justify-content: space-between; declared twice (lines 3 and 8).

.container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background-color: white;
-  justify-content: space-between;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

Line range hint 60-76: Use CSS variables for consistent theming.

The new classes use hardcoded colors which may cause maintenance issues:

  • #45454533 in .radioGroupContainer
.radioGroupContainer {
  width: 100%;
-  border: 1px solid #45454533;
+  border: 1px solid var(--border-color, rgba(69, 69, 69, 0.2));
  border-radius: 8px;
  padding: 8px 20px;
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 873cdbb and 221a40c.

📒 Files selected for processing (6)
  • components/domains/steps/checkoutCard.tsx (3 hunks)
  • components/domains/steps/upsellCard.tsx (2 hunks)
  • styles/components/button.module.css (2 hunks)
  • styles/components/registerV3.module.css (6 hunks)
  • styles/components/textField.module.css (1 hunks)
  • styles/components/upsellCard.module.css (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • styles/components/textField.module.css
  • components/domains/steps/upsellCard.tsx
  • styles/components/registerV3.module.css
  • components/domains/steps/checkoutCard.tsx
🔇 Additional comments (4)
styles/components/upsellCard.module.css (2)

44-58: LGTM! Typography improvements enhance readability.

The typography changes are well-structured:

  • Using CSS variables for colors improves theme consistency
  • Reduced font sizes and adjusted line heights enhance readability
  • Proper text hierarchy maintained between catch and description

123-127: LGTM! Well-structured responsive design.

The media queries effectively handle responsive layout with appropriate breakpoints and clear behavior definitions.

styles/components/button.module.css (2)

16-16: LGTM! Significant visual change from pill to rounded rectangle shape.

The change from a pill shape to a more modern rounded rectangle (8px) aligns well with contemporary UI design patterns while maintaining visual hierarchy.


101-101: Verify border-radius consistency across components.

The focus ring border-radius correctly matches the button's radius. However, let's ensure this 8px border-radius is consistently applied across other components in the payment page redesign.

✅ Verification successful

Border radius consistency verified across components

The 8px border-radius is consistently applied across standard components including buttons, cards, and containers. The varying border-radius values found in registration components (16px, 52px) appear to be intentional design decisions for specific UI elements.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for border-radius declarations in related CSS files
echo "Checking border-radius consistency in CSS files..."
rg -g "*.css" -g "*.scss" "border-radius:\s*(8px|500px)" --no-heading

echo -e "\nChecking specifically payment and registration related files..."
fd -e css -e scss . | grep -iE '(payment|register|checkout)' | xargs rg "border-radius" --no-heading

Length of output: 2541


Script:

#!/bin/bash
# Check for potential payment-related files and design system constants
echo "Checking for payment-related components with different naming patterns..."
fd -t f -e css -e scss . | xargs rg -l "(card|billing|invoice|subscription|pay)"

echo -e "\nChecking for design system or theme files..."
fd -t f -e css -e scss -e js -e ts . | grep -iE '(theme|design-system|constants|variables|tokens)' | xargs cat

Length of output: 8161

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

🧹 Nitpick comments (1)
styles/components/upsellCard.module.css (1)

59-63: Consider enhancing radio group focus states.

While the container styling looks good, consider adding focus states for better accessibility:

 .radioGroupContainer {
   width: 100%;
   border: 1px solid #45454533;
   border-radius: 8px;
   padding: 8px 20px;
+  position: relative;
 }
+.radioGroupContainer:focus-within {
+  outline: 2px solid var(--primary);
+  outline-offset: 2px;
+}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 221a40c and 039a54c.

📒 Files selected for processing (1)
  • styles/components/upsellCard.module.css (4 hunks)
🔇 Additional comments (4)
styles/components/upsellCard.module.css (4)

6-6: Great improvements to container responsiveness!

The changes to make the container width flexible and use CSS variables for theming are good practices that improve maintainability and responsiveness.

Also applies to: 20-20


43-48: Typography improvements enhance readability!

The adjustments to font sizes, line heights, and spacing create a better visual hierarchy. Good use of CSS variables with fallback colors.

Also applies to: 52-57


72-75: Clean implementation of the divider!

Good use of CSS variables for theming consistency.


122-126: Good responsive design consideration!

Hiding the divider on mobile screens helps maintain a clean layout on smaller devices.

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

🧹 Nitpick comments (1)
components/UI/navbar.tsx (1)

Line range hint 88-98: Consider adding timeout and max retries for wallet connection.

The current implementation recursively retries connection on failure without limits, which could lead to infinite retries if there's a persistent issue. This might impact user experience and system resources.

-  const connectWallet = async (connector: Connector) => {
+  const connectWallet = async (
+    connector: Connector,
+    retryCount: number = 0,
+    maxRetries: number = 3
+  ) => {
     try {
-      // eslint-disable-next-line @typescript-eslint/ban-ts-comment
-      // @ts-ignore
-      await connectAsync({ connector });
+      await connectAsync({ connector: connector as Connector });
       localStorage.setItem("SID-connectedWallet", connector.id);
       localStorage.setItem("SID-lastUsedConnector", connector.id);
     } catch (e) {
       // Restart the connection if there is an error except if the user has rejected the connection
       console.error(e);
       const error = e as Error;
-      if (error.name !== "UserRejectedRequestError") connectWallet(connector);
+      if (error.name !== "UserRejectedRequestError" && retryCount < maxRetries) {
+        await new Promise(resolve => setTimeout(resolve, 1000)); // Add delay between retries
+        return connectWallet(connector, retryCount + 1, maxRetries);
+      }
+      throw error; // Re-throw if max retries reached or user rejected
     }
   };
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 039a54c and bbd9119.

📒 Files selected for processing (1)
  • components/UI/navbar.tsx (1 hunks)
🔇 Additional comments (1)
components/UI/navbar.tsx (1)

Line range hint 88-98: Enhance error handling with user feedback.

The current implementation silently retries on errors, which might confuse users about the connection status. Consider adding user feedback for connection attempts and specific error messages.

Let's verify if there's a toast or notification system already in place:

✅ Verification successful

Use existing notification system for wallet connection feedback

The codebase already has a robust notification system using MUI's Alert component. Instead of silently retrying, use the existing useNotificationManager hook to display connection status:

const { addTransaction } = useNotificationManager();
try {
  await connectAsync({ connector });
  localStorage.setItem("SID-connectedWallet", connector.id);
  localStorage.setItem("SID-lastUsedConnector", connector.id);
} catch (e) {
  const error = e as Error;
  if (error.name !== "UserRejectedRequestError") {
    addTransaction({
      type: NotificationType.TRANSACTION,
      severity: "error",
      message: "Failed to connect wallet. Retrying...",
    });
    connectWallet(connector);
  }
}
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for toast/notification implementations
rg -i "toast|notification|alert" --type ts --type tsx

Length of output: 83


Script:

#!/bin/bash
# First, check package.json for UI dependencies
echo "Checking package.json for UI libraries:"
cat package.json | grep -i "toast\|notification\|alert"

echo -e "\nSearching for toast/notification patterns:"
# Search in both .ts and .tsx files using find and grep
find . -type f \( -name "*.ts" -o -name "*.tsx" \) -exec grep -i "toast\|notification\|alert" {} \;

Length of output: 41475

Copy link
Collaborator

@Marchand-Nicolas Marchand-Nicolas left a comment

Choose a reason for hiding this comment

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

On mobile (and sometimes desktop too) I can see a shadow bellow the buttons, please remove it
image
Also, when the purchase button is bigger than usual (e.g. when I don't have enough eth) the text is broken. In that case, if there is not enough space, wrap the buttons (but if there is space because the text is smaller, do not wrap)

Copy link
Collaborator

@Marchand-Nicolas Marchand-Nicolas left a comment

Choose a reason for hiding this comment

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

Sorry didn't see it at first, the "x" button is not present on desktop:
image
(It should behave as the mobile cancel button)

@Marchand-Nicolas
Copy link
Collaborator

After that we're good I think! gg

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

🧹 Nitpick comments (1)
styles/components/upsellCard.module.css (1)

59-63: Consider adding hover and focus states.

The radio group container could benefit from interactive states for better user experience.

 .radioGroupContainer {
   width: 100%;
   border: 1px solid #45454533;
   border-radius: 8px;
   padding: 8px 20px;
+  transition: border-color 0.2s ease;
+ }
+
+ .radioGroupContainer:hover,
+ .radioGroupContainer:focus-within {
+  border-color: var(--primary);
 }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b46320b and 21ef07b.

📒 Files selected for processing (7)
  • styles/components/evmModalMessage.module.css (1 hunks)
  • styles/components/icons.module.css (1 hunks)
  • styles/components/upsellCard.module.css (4 hunks)
  • styles/discount.module.css (1 hunks)
  • styles/domain.module.css (1 hunks)
  • styles/globals.css (3 hunks)
  • styles/verify.module.css (1 hunks)
🔇 Additional comments (11)
styles/verify.module.css (1)

13-13: LGTM! Good use of CSS variables.

The removal of the fallback color in favor of using only var(--content-600) improves maintainability by centralizing color definitions.

styles/domain.module.css (1)

28-28: LGTM! Consistent with design system.

The color change maintains consistency with other components using the same CSS variable.

styles/components/evmModalMessage.module.css (1)

78-78: LGTM! Good conversion to CSS variable.

Converting the hardcoded color #8c8989 to var(--content-600) improves theme consistency and maintainability.

styles/components/icons.module.css (1)

105-105: LGTM! Consistent variable usage.

The change aligns with the project-wide effort to standardize color variables.

styles/components/upsellCard.module.css (3)

6-11: LGTM! Improved responsive design.

Making the container width flexible with width: 100% improves the responsive behavior.


20-20: LGTM! Consistent theme usage.

Using var(--background) aligns with the project's CSS variable standardization.


122-126: LGTM! Good mobile optimization.

The addition of a 640px breakpoint for hiding the divider improves the mobile layout.

styles/globals.css (3)

34-34: LGTM: New color variable addition for content text.

The new --content-600 variable provides a consistent color scheme for content text across the application.


28-28: Maintain consistent color value casing.

Good attention to detail in maintaining lowercase hexadecimal color values throughout the file.

Also applies to: 31-31, 83-83


Line range hint 62-66: LGTM: Updated description styling.

The description class now uses the centralized --content-600 variable, promoting consistency across the application.

styles/discount.module.css (1)

Line range hint 42-47: LGTM: Consistent color variable usage.

The .description class now uses the centralized --content-600 variable without fallback, which is safe since the variable is defined in globals.css.

Copy link
Collaborator

@Marchand-Nicolas Marchand-Nicolas left a comment

Choose a reason for hiding this comment

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

Well done lgtm!

Copy link
Collaborator

@Marchand-Nicolas Marchand-Nicolas left a comment

Choose a reason for hiding this comment

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

Please resolve the conflicts so that I can merge

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

🧹 Nitpick comments (4)
styles/components/registerV3.module.css (4)

1-13: Consider adjusting container padding for better responsiveness.

The container's fixed width (1084px) combined with large padding (166px) could cause horizontal scrolling on screens between 1084px and 1416px wide.

.container {
  display: flex;
  flex-direction: column;
  width: 1084px;
  max-width: 100%;
  background-color: var(--background);
  justify-content: space-between;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  z-index: 0;
-  padding: 0px 166px;
+  padding: 0px min(166px, 15%);
}

27-62: Standardize CSS units for better maintainability.

The typography styles mix different units (rem, px) for font sizes and line heights. Consider standardizing to rem for better scalability and maintenance.

.price {
  color: rgb(31 41 55);
-  font-size: 1.25rem /* 20px */;
-  line-height: 1.5rem /* 24px */;
+  font-size: 1.25rem;
+  line-height: 1.2;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.legend {
  color: #6d696a;
-  font-size: 14px;
-  line-height: 20px; /* 142.857% */
+  font-size: 0.875rem;
+  line-height: 1.43;
  font-style: normal;
  font-weight: 500;
}

251-261: Use CSS variables for consistent color management.

The .stepsContainer uses hardcoded colors. Consider using CSS variables for better theme management and consistency.

.stepsContainer {
  min-width: 220px;
  display: flex;
  position: relative;
  flex-direction: column;
  justify-content: space-between;
-  border: 1px solid #4545451A;
+  border: 1px solid var(--content-100);
  border-radius: 16px;
  box-shadow: 0px 2px 30px 0px rgba(0, 0, 0, 0.06);
-  background-color: #FFFFFF
+  background-color: var(--background-paper);
}

326-343: Enhance interactive feedback with transitions.

The gas method buttons lack transition effects, which could make state changes feel abrupt. Also, consider using CSS variables for consistent colors.

.gasMethod,
.gasMethodSelected {
  border: 1px solid #cdcccc;
  border-radius: 8px;
  padding: 0.5rem 1rem;
+  transition: all 0.2s ease;
}

.gasMethod:disabled {
-  color: #666666;
-  background-color: #cdcccc;
+  color: var(--content-400);
+  background-color: var(--content-200);
  cursor: not-allowed;
}

.gasMethodSelected {
  background-color: var(--primary);
  color: white;
  border: 1px solid white;
}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 21ef07b and 25e31c2.

📒 Files selected for processing (3)
  • styles/components/button.module.css (0 hunks)
  • styles/components/registerV3.module.css (1 hunks)
  • styles/components/textField.module.css (1 hunks)
💤 Files with no reviewable changes (1)
  • styles/components/button.module.css
🚧 Files skipped from review as they are similar to previous changes (1)
  • styles/components/textField.module.css
🔇 Additional comments (1)
styles/components/registerV3.module.css (1)

281-291: Add hover and focus states for interactive steps.

The progressStep class is missing hover and focus states, which are important for accessibility and user interaction feedback.

Copy link
Collaborator

@Marchand-Nicolas Marchand-Nicolas left a comment

Choose a reason for hiding this comment

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

Incredible work, lgtm! It looks really good :)

@Marchand-Nicolas Marchand-Nicolas merged commit 70e7911 into lfglabs-dev:testnet Jan 26, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❌ Change request Change requested from reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redesign of the payment page in the final step of registration
2 participants