Skip to content

Comments

Added hover opacity on nav-user for better visibility#753

Closed
Adarsh9977 wants to merge 47 commits intoMail-0:mainfrom
Adarsh9977:zero/hover-effect
Closed

Added hover opacity on nav-user for better visibility#753
Adarsh9977 wants to merge 47 commits intoMail-0:mainfrom
Adarsh9977:zero/hover-effect

Conversation

@Adarsh9977
Copy link
Contributor

@Adarsh9977 Adarsh9977 commented Apr 22, 2025

Added hover for better visibility

  • Before
Screen.Recording.2025-04-23.at.3.43.31.AM.mov
  • After
Screen.Recording.2025-04-23.at.3.43.05.AM.mov

By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.

Summary by CodeRabbit

  • Style
    • Updated button and menu item opacity styling for improved visual consistency and hover effects in connection and user navigation components.
    • Unified opacity control at the container level, removing individual opacity styles from icons and text.
  • New Features
    • Added dynamic Open Graph image generation for emails with customizable recipient and subject.
    • Introduced a new API endpoint to fetch email aliases for the active user connection.
    • Added dynamic metadata generation for the email creation page based on URL parameters.
    • Added a new home page component rendering the main home content.
    • Introduced a consolidated home content component with responsive layout and feature flag support.
  • Bug Fixes
    • Improved authorization error handling by standardizing error responses and removing silent logouts across multiple API routes and actions.
  • Chores
    • Removed deprecated functions and unused imports related to early access and email alias fetching.
    • Disabled the "shortcuts" settings navigation item.
    • Simplified page and component implementations by removing obsolete UI and feature flag logic.
    • Refined TypeScript control flow with explicit type assertions for unauthorized error handling.

ahmetskilinc and others added 30 commits April 19, 2025 01:28
- added cc and bcc when saving drafts
- save drafts less aggresively
* Create prompts with XML formatting

* Include XML formatted prompts in generate func

* remove unused regex and add helper functions/warnings

* error handling

* Update apps/mail/lib/prompts.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* lint issues

* Update prompts.ts

* Mail-0#706 (comment)

Coderabbit fix 1

* erabbitai bot 3 days ago ⚠️ Potential issue  errorOccurred state is stale inside finally  React state setters (setErrorOccurred) are asynchronous; the errorOccurred value captured at render time will not yet reflect changes made earlier in the same event loop. Consequently, the logic deciding whether to collapse/expand may run with an outdated flag.  -  } finally { -      setIsLoading(false); -      if (!errorOccurred || isAskingQuestion) { -        setIsExpanded(true); -      } else { -        setIsExpanded(false); // Collapse on errors -      } -  } +  } finally { +      setIsLoading(false); +      // Use a local flag to track errors deterministically +      const hadError = isAskingQuestion ? false : !!errorFlagRef.current; +      setIsExpanded(!hadError); +  } You can create const errorFlagRef = useRef(false); and update errorFlagRef.current = true every time an error is detected, ensuring reliable behaviour irrespective of React batching.  Committable suggestion skipped: line range outside the PR's diff.

* Mail-0#706 (comment)

* Mail-0#706 (comment)

* Mail-0#706 (comment)

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…users (Mail-0#726)

* feat(i18n): add Vietnamese language support

Add Vietnamese ('vi') to the list of supported languages in the
i18n configuration and JSON file to expand language options.

* Add a new Vietnamese translation file to support Vietnamese language users.

* Clear Vietnamese translation strings
Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>
* Updated lockfile

* Updated home page session validation

---------

Co-authored-by: Adam <x_1337@outlook.com>
* Create route og image

* resolve coderabbit nitpicks

---------

Co-authored-by: Adam <x_1337@outlook.com>
@vercel
Copy link

vercel bot commented Apr 22, 2025

@Adarsh9977 is attempting to deploy a commit to the Zero Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 22, 2025

Caution

Review failed

The pull request is closed.

## Walkthrough

This update standardizes the opacity styling for interactive UI elements in the mail application's connection and navigation user components. Opacity and hover effects are now applied at the container or button level, rather than on individual icons or text within those elements. No changes have been made to the logic, exported entities, or control flow; the modifications are purely visual and focused on CSS class management for a more consistent appearance and hover behavior.

## Changes

| File(s)                                             | Change Summary                                                                                                    |
|-----------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| apps/mail/components/connection/add.tsx             | Moved opacity and hover opacity classes to the button element; removed individual opacity styling from icon/text. |
| apps/mail/components/ui/nav-user.tsx                | Applied opacity and hover opacity classes to menu item containers; removed opacity styling from icons/text.       |

## Possibly related PRs

- Mail-0/Zero#424: Adjusts button class names and structure in `apps/mail/components/connection/add.tsx`, directly relating to the opacity styling changes made in this PR.

## Suggested reviewers

- nizzyabi

## Poem

> A rabbit hopped through fields of code,  
> Adjusting shades where menus glowed.  
> Now buttons shimmer, soft and bright,  
> With hover magic, just so right.  
> The icons gleam, the text stands tall—  
> Unified style delights us all!  
> 🐇✨

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 68775ab and 9415153.

📒 Files selected for processing (29)
  • apps/mail/actions/ai-reply.ts (1 hunks)
  • apps/mail/actions/brain.ts (1 hunks)
  • apps/mail/actions/connections.ts (2 hunks)
  • apps/mail/actions/drafts.ts (1 hunks)
  • apps/mail/actions/email-aliases.ts (0 hunks)
  • apps/mail/actions/getSummary.ts (2 hunks)
  • apps/mail/actions/mail.ts (6 hunks)
  • apps/mail/actions/send.ts (1 hunks)
  • apps/mail/actions/settings.ts (1 hunks)
  • apps/mail/actions/utils.ts (3 hunks)
  • apps/mail/app/(routes)/mail/create/page.tsx (2 hunks)
  • apps/mail/app/api/driver/connections/route.ts (2 hunks)
  • apps/mail/app/api/driver/count/route.ts (2 hunks)
  • apps/mail/app/api/driver/notes/route.ts (2 hunks)
  • apps/mail/app/api/driver/route.ts (2 hunks)
  • apps/mail/app/api/notes/index.ts (1 hunks)
  • apps/mail/app/api/og/create/route.tsx (1 hunks)
  • apps/mail/app/api/og/home/route.tsx (1 hunks)
  • apps/mail/app/api/utils.ts (2 hunks)
  • apps/mail/app/api/v1/email-aliases/route.ts (1 hunks)
  • apps/mail/app/home/page.tsx (1 hunks)
  • apps/mail/app/page.tsx (1 hunks)
  • apps/mail/components/golden.tsx (3 hunks)
  • apps/mail/components/home/HomeContent.tsx (1 hunks)
  • apps/mail/components/home/hero.tsx (5 hunks)
  • apps/mail/config/navigation.ts (1 hunks)
  • apps/mail/hooks/use-email-aliases.ts (1 hunks)
  • apps/mail/hooks/use-stats.ts (0 hunks)
  • apps/mail/lib/auth.ts (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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 generate sequence diagram to generate a sequence diagram of the changes in 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
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)
apps/mail/components/ui/nav-user.tsx (1)

273-276: Consider updating the sign-in menu item for consistency

While most menu items have been updated to use container-level opacity styling, the sign-in menu item still has opacity applied to individual elements. Consider updating this item to match the styling pattern used elsewhere for complete consistency.

-<DropdownMenuItem className="cursor-pointer" onClick={() => router.push('/login')}>
-  <LogIn size={16} className="mr-2 opacity-60" />
-  <p className="text-[13px] opacity-60">{t('common.navUser.signIn')}</p>
+<DropdownMenuItem className="cursor-pointer opacity-60 hover:opacity-90" onClick={() => router.push('/login')}>
+  <LogIn size={16} className="mr-2" />
+  <p className="text-[13px]">{t('common.navUser.signIn')}</p>
</DropdownMenuItem>
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cc0ffd5 and 68775ab.

📒 Files selected for processing (2)
  • apps/mail/components/connection/add.tsx (1 hunks)
  • apps/mail/components/ui/nav-user.tsx (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/mail/components/connection/add.tsx (1)
apps/mail/lib/utils.ts (1)
  • cn (52-52)
🔇 Additional comments (5)
apps/mail/components/connection/add.tsx (1)

35-39: Positive styling refactor for consistent hover behavior

Moving the opacity styling from individual elements to the container level provides a more consistent hover experience for users. This approach ensures that the entire button and all its contents transition together, improving usability and visual consistency.

apps/mail/components/ui/nav-user.tsx (4)

237-246: Clean implementation of opacity at container level

Good implementation of opacity and hover effect at the container level for consistent visual behavior.


247-254: Good refactoring of className placement

Moving the cursor-pointer class from the Link to the DropdownMenuItem and adding opacity styling at the container level improves consistency with other menu items.


255-268: Consistent styling across menu items

The opacity and hover styling has been consistently applied to the customer support and logout menu items, maintaining visual harmony.


297-302: Consistent styling for debug menu item

The debug section menu item now follows the same styling pattern as other menu items.

@Adarsh9977 Adarsh9977 closed this Apr 22, 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.

10 participants