Skip to content

Fix/UI issues#608

Merged
olgakup merged 4 commits intodevop/release-2.2.2from
fix/ui-issues
Feb 10, 2025
Merged

Fix/UI issues#608
olgakup merged 4 commits intodevop/release-2.2.2from
fix/ui-issues

Conversation

@olgakup
Copy link
Contributor

@olgakup olgakup commented Feb 4, 2025

Fixes:

  • logo cut on welcome screen
  • safari actions menu button spacing
  • updates icons in the wallet menu
  • token icon size in assets
  • text wrap in connect dapp header

Summary by CodeRabbit

  • New Features

    • Dynamic icons in tabs now toggle visually between active and inactive states.
    • Navigation links provide clearer active-state feedback to guide users.
  • Style

    • Updated popup header styling to maintain proper text layout.
    • Enhanced button appearance and focus outlines for improved accessibility.
    • Adjusted image dimensions and onboarding container layout for a consistent interface.

@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2025

Walkthrough

This pull request updates several UI components and styling details. A new style rule is introduced in the common popup to override text breaking behavior in header elements. In the network menu, router links now include an exact-active-class and pass active state properties to child components while adjusting opacity effects. Several tab icon components have been refactored to conditionally render different SVGs based on an isActive prop via <script setup>. Additionally, action elements are converted from links to buttons, image dimensions are fixed, and the onboarding container gets layout adjustments.

Changes

File(s) Change Summary
packages/extension/src/providers/ethereum/ui/styles/common-popup.less Added a nested h2 rule with word-break: normal !important to override the previous break-all styling within .common-popup.
packages/extension/src/ui/action/components/network-menu/index.vue Updated <router-link> elements with an exact-active-class attribute, added :is-active props for active route checks, and modified anchor opacity in styles.
packages/extension/src/ui/action/icons/tabs/{activity.vue, assets.vue, dapps.vue, nfts.vue} Refactored SVG rendering logic by introducing conditional rendering based on an isActive prop via <script setup>, updating SVG paths, and switching to a <div> wrapper for styling.
packages/extension/src/ui/action/views/network-activity/components/network-activity-action.vue Replaced <a> elements with <button> elements for "Deposit" and "Buy/Sell" actions; updated styles to include focus outlines and flexible layout properties.
packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue Updated the <img> element to define fixed dimensions (32px by 32px) instead of using a maximum width style.
packages/extension/src/ui/onboard/App.vue Added overflow-y: auto to the body and set a minimum height of 700px on the .onboard__container to improve layout responsiveness.

Sequence Diagram(s)

sequenceDiagram
    participant P as Parent Component
    participant T as Tab Icon Component
    participant R as Template Renderer

    P->>T: Provide isActive prop
    T->>T: Evaluate isActive value
    alt isActive true
      T->>R: Render SVG for active state
    else isActive false
      T->>R: Render SVG for inactive state
    end
Loading
sequenceDiagram
    participant R as Router
    participant NM as Network Menu Component
    participant TL as Router Link
    participant C as Child Component

    R->>NM: Supply current route info
    NM->>TL: Set exact-active-class based on route match
    TL->>C: Pass is-active prop
    C-->>TL: Render active link styling
Loading

Suggested reviewers

  • NickKelly1
  • gamalielhere
  • kvhnuke

Tip

🌐 Web search-backed reviews and chat
  • We have enabled web search-based reviews and chat for all users. This feature allows CodeRabbit to access the latest documentation and information on the web.
  • You can disable this feature by setting web_search: false in the knowledge_base settings.
  • Please share any feedback in the Discord discussion.

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.

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.

@github-actions
Copy link

github-actions bot commented Feb 4, 2025

💼 Build Files
chrome: enkrypt-chrome-931c6a71.zip
firefox: enkrypt-firefox-931c6a71.zip

💉 Virus total analysis
chrome: 931c6a71
firefox: 931c6a71

Copy link

@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 (4)
packages/extension/src/ui/action/views/network-activity/components/network-activity-action.vue (1)

71-77: Consider removing !important declarations from focus styles.

The button styling looks good, but the !important declarations in the focus styles might be unnecessary since these styles are already quite specific. Consider removing them:

 &:focus {
-  outline: -webkit-focus-ring-color auto 1px !important;
-  outline-offset: 2px !important;
+  outline: -webkit-focus-ring-color auto 1px;
+  outline-offset: 2px;
 }

Also applies to: 97-99, 111-114

packages/extension/src/ui/action/components/network-menu/index.vue (1)

95-95: Consider using CSS custom properties for opacity values.

The opacity values are hardcoded. Consider using CSS custom properties for better maintainability.

 .network-menu {
+  --opacity-default: 1;
+  --opacity-hover: 0.6;
   a {
-    opacity: 1;
+    opacity: var(--opacity-default);
     &:hover {
-      opacity: 0.6 !important;
+      opacity: var(--opacity-hover) !important;
     }
   }
   .router-link-active {
     &:hover {
-      opacity: 1 !important;
+      opacity: var(--opacity-default) !important;
     }
   }
 }

Also applies to: 102-104, 107-111

packages/extension/src/ui/action/icons/tabs/activity.vue (1)

27-34: Consider optimizing the SVG path.

The SVG path contains a large number of coordinates which could be optimized for better maintainability and performance.

Consider using an SVG optimization tool to simplify the path while maintaining visual fidelity.

packages/extension/src/providers/ethereum/ui/styles/common-popup.less (1)

7-9: Document the use of !important.

While the !important declaration effectively fixes the text wrapping issue, it's worth documenting why it's necessary to help future maintainers understand the override.

Consider adding a comment explaining why !important is needed:

 h2 {
+  /* Override needed to prevent unwanted word breaks in popup headers */
   word-break: normal !important;
 }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aa64ffc and 931c6a7.

📒 Files selected for processing (9)
  • packages/extension/src/providers/ethereum/ui/styles/common-popup.less (1 hunks)
  • packages/extension/src/ui/action/components/network-menu/index.vue (4 hunks)
  • packages/extension/src/ui/action/icons/tabs/activity.vue (1 hunks)
  • packages/extension/src/ui/action/icons/tabs/assets.vue (1 hunks)
  • packages/extension/src/ui/action/icons/tabs/dapps.vue (1 hunks)
  • packages/extension/src/ui/action/icons/tabs/nfts.vue (1 hunks)
  • packages/extension/src/ui/action/views/network-activity/components/network-activity-action.vue (4 hunks)
  • packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue (2 hunks)
  • packages/extension/src/ui/onboard/App.vue (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: buildAll
🔇 Additional comments (14)
packages/extension/src/ui/action/views/network-activity/components/network-activity-action.vue (2)

4-15: Great improvement in semantic HTML!

Converting action elements from <a> to <button> improves accessibility and follows HTML semantics best practices, as buttons are more appropriate for triggering actions while links are for navigation.


97-99: LGTM - Spacing fixes align with PR objectives.

The flex layout adjustments (flex: 1 and max-width: 100%) effectively address the Safari spacing issues mentioned in the PR objectives.

packages/extension/src/ui/action/components/network-menu/index.vue (2)

6-6: LGTM! Consistent active state handling.

The addition of exact-active-class to all router links ensures consistent active state behavior.

Also applies to: 15-15, 22-22, 32-32


8-8: LGTM! Improved active state feedback.

The :is-active prop now correctly reflects the current route state for all tab icons.

Also applies to: 17-17, 24-24, 34-34

packages/extension/src/ui/action/icons/tabs/assets.vue (2)

2-36: LGTM! Well-structured conditional SVG rendering.

The conditional rendering of SVGs based on active state improves visual feedback.


39-46: LGTM! Proper prop type definition.

The isActive prop is correctly defined with appropriate type and default value.

packages/extension/src/ui/onboard/App.vue (2)

75-75: LGTM! Fixed content overflow issue.

Adding overflow-y: auto ensures content remains accessible when it exceeds viewport height.


108-108: LGTM! Consistent container sizing.

Setting min-height: 700px prevents layout shifts and ensures the logo remains visible.

packages/extension/src/ui/action/icons/tabs/nfts.vue (1)

2-42: LGTM! Consistent implementation with other icon components.

The component follows the same pattern as other tab icons, maintaining consistency across the UI.

Also applies to: 45-52

packages/extension/src/ui/action/icons/tabs/dapps.vue (2)

39-45: LGTM! Well-structured prop definition using Vue 3 composition API.

The prop definition follows Vue.js best practices with proper type checking and default value.


2-36: LGTM! Clean SVG implementation with proper state handling.

The conditional rendering of SVGs based on the isActive prop provides clear visual feedback, with appropriate opacity values (0.9 for active, 0.6 for inactive).

packages/extension/src/ui/action/views/network-assets/components/network-assets-item.vue (1)

7-7: LGTM! Fixed dimensions ensure consistent token icon display.

Setting explicit width and height attributes ensures consistent token icon sizing across different contexts.

packages/extension/src/ui/action/icons/tabs/activity.vue (1)

38-45: LGTM! Consistent implementation with other tab icons.

The component follows the same pattern as other tab icons, maintaining consistency across the UI.

packages/extension/src/providers/ethereum/ui/styles/common-popup.less (1)

56-65: Verify the interaction between word-break rules.

The new word-break: normal !important rule overrides the existing word-break: break-all property. Ensure this doesn't cause unintended text overflow in narrow viewports.

@NickKelly1 NickKelly1 self-requested a review February 4, 2025 22:01
@olgakup olgakup changed the base branch from develop to devop/release-2.2.2 February 10, 2025 19:02
Copy link

@SemajaM8 SemajaM8 left a comment

Choose a reason for hiding this comment

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

Nice

@olgakup olgakup merged commit 61aa5ef into devop/release-2.2.2 Feb 10, 2025
3 of 4 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments