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: Change the color of the date chip #1116

Merged
merged 6 commits into from
Mar 3, 2025

Conversation

dicethedev
Copy link
Contributor

@dicethedev dicethedev commented Mar 3, 2025

I changed the color of the 'date chip' to red when the domain expired. I kept it green as it is currently when the domain has not yet expired.
close: #1026

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • The identity card now displays domain expiry information with dynamic visual cues that clearly differentiate active and expired domains.
  • Style

    • Enhanced styling updates improve the display of expiry details, including new classes for the expiry container and icon, as well as updated text styles for better visual clarity.
    • Introduced a new error color palette for consistent representation of error states throughout the application.
    • Added a new CSS variable for improved theming options.

Copy link

vercel bot commented Mar 3, 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 Mar 3, 2025 1:46pm

Copy link
Contributor

coderabbitai bot commented Mar 3, 2025

Walkthrough

The update modifies the IdentityCard component and its associated CSS to include a new variable, isDomainExpired, which determines the domain's expiry status. This affects the conditional rendering of the expiry section, including the styling of the expiry container, CalendarIcon, and expiry text. Minor whitespace adjustments were made in the token ID rendering, and class order updates were implemented. The CSS changes consist of new classes and updates to existing classes. No changes were made to exported or public entities.

Changes

File(s) Summary
components/…/identityCard.tsx Introduced isDomainExpired for conditional rendering based on domain expiry; updated class names and styling for expiry container and CalendarIcon; removed extra whitespace.
styles/…/identityCard.module.css Added new CSS class .notExpiryContainer; updated .expiryContainer, .expiryText, and .notExpiryText for color and typography adjustments related to expiry information styling.
styles/…/theme.ts Introduced a new error property in the palette object, defining colors for error states.
styles/…/globals.css Added new CSS variable --negative-light with color value #f6d5d5.

Possibly related PRs

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.
  • @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

vercel bot commented Mar 3, 2025

@dicethedev 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 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: 3

🧹 Nitpick comments (1)
components/identities/identityCard.tsx (1)

221-223: Improved whitespace handling

Good cleanup of unnecessary whitespace inside the span element.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cf7e677 and e4d6d0f.

📒 Files selected for processing (2)
  • components/identities/identityCard.tsx (5 hunks)
  • styles/components/identityCard.module.css (2 hunks)
🔇 Additional comments (3)
styles/components/identityCard.module.css (2)

121-133: Good implementation of the expired state styling

The styling for the expired container with the light red background and shadow effects creates a clear visual distinction for expired domains, aligning well with the PR objective.


153-162: LGTM! Text styling is consistent with the design

The updated expiry text styling maintains readability while fitting well with the overall card design.

components/identities/identityCard.tsx (1)

156-157: Consistent class naming in CopyContent component

The class ordering change maintains consistency across the component.

Also applies to: 172-173

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.

I don't see the calendar icon. I think you have set the same red color as the brackground for it
Screenshot 2025-03-03 at 10 16 13 AM

  • reuse the css variables defined in styles/globals.css

@Marchand-Nicolas Marchand-Nicolas added the ❌ Change request Change requested from reviewer label Mar 3, 2025
@dicethedev
Copy link
Contributor Author

@Marchand-Nicolas You can make a review again!

@Marchand-Nicolas
Copy link
Collaborator

@dicethedev you didn't fix this #1116 (review)

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/identityCard.module.css (1)

121-133: Review: Verify Expired Date Chip Container Styling

The new .expiryContainer class defines the styling for the expired date chip. Please verify that using

background: var(--primary-700, #f6d5d5);

correctly reflects the intended red theme for expired domains. It might be more semantic and clearer to use a dedicated design token (for example, var(--negative-bg)) if one exists. Also, confirm that the fallback color #f6d5d5 matches the design specifications for the red alert.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 41534f1 and 216b99a.

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

135-137: Review: Confirm Expiry Icon Color

The .expiryContainerIcon class now sets the icon’s color to var(--negative), which aligns with previous design feedback. Please double-check that this variable resolves to the appropriate red tone for expired status in your theme.


153-162: Review: Check Expiry Text Color Consistency

In the updated .expiryText class, the text color is set to var(--secondary). Confirm that this choice meets the design requirements for expired chips. If the intent is for the text itself also to reflect the expired status with a red tone, consider using the appropriate color variable or adjusting the value accordingly.

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/identityCard.module.css (2)

121-133: Styling Update: .expiryContainer for Expired Domains

The .expiryContainer now uses background: var(--negative-light); along with a subtle box-shadow. This change clearly signals an expired (error) state for the date chip. Verify that the lighter red tone (--negative-light) delivers sufficient contrast and visual impact. If a more pronounced red is desirable, consider using var(--negative) or adjusting the shade accordingly.


149-158: Text Styling in .expiryText

The expired chip’s text is styled with color: var(--secondary); which provides a neutral contrast against the light red background. Please verify that this color choice meets accessibility contrast guidelines. If issues arise, consider experimenting with an alternative (e.g., a lighter or complementary tone) to ensure clarity.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ee55236 and e9b872e.

📒 Files selected for processing (2)
  • styles/components/identityCard.module.css (1 hunks)
  • styles/globals.css (1 hunks)
🔇 Additional comments (3)
styles/globals.css (1)

36-38: Enhancement: New CSS Variable for Error States

The new variable --negative-light: #f6d5d5; is a good addition to the theme, providing a dedicated light red tint for expired domains. Ensure that this shade complies with the visual design guidelines for error states across the application.

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

135-147: New Class: .notExpiryContainer for Active Domains

The introduction of the .notExpiryContainer class with background: var(--primary300); fits the requirement by visually distinguishing active (non-expired) domains with a greenish background. The consistent styling (padding, border-radius, shadow) ensures uniformity with other chip elements.


160-169: Text Styling in .notExpiryText

The .notExpiryText class uses color: var(--black); and appears to offer good contrast on the greenish background defined in .notExpiryContainer. This styling is clear and consistent with the visual design for active domains.

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.

Perfect! Good job! LGTM

@Marchand-Nicolas Marchand-Nicolas merged commit af5a582 into lfglabs-dev:testnet Mar 3, 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.

Update the Domain Expiration feature - Change the color of the date chip
2 participants