Add tooltips and i18n for editor MenuBar#604
Conversation
|
@yaraslau-klimuk is attempting to deploy a commit to the Zero Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThis pull request enhances the email editor by integrating tooltip functionality into the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant MenuBar
participant TooltipProvider
participant useTranslations
User->>MenuBar: Hover over a formatting button
MenuBar->>TooltipProvider: Trigger tooltip display
TooltipProvider->>useTranslations: Request localized text
useTranslations-->>TooltipProvider: Return translation
TooltipProvider-->>User: Display tooltip with localized content
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
apps/mail/components/create/editor.tsx(5 hunks)apps/mail/locales/en.json(3 hunks)
🔇 Additional comments (4)
apps/mail/components/create/editor.tsx (2)
36-36: Good job adding needed imports and translation hook.The addition of tooltip components and the
useTranslationshook properly sets up the internationalization foundation for the email editor.Also applies to: 52-52, 123-123
436-458: Dialog content properly internationalized.The link dialog components now properly use translation strings instead of hardcoded text, which aligns with good internationalization practices.
apps/mail/locales/en.json (2)
33-35: Common action strings added correctly.The addition of common action strings for "cancel" and "save" allows for consistent translation across the application.
257-259: Added units section for file size display.Good addition of a units section with MB formatting, which will be useful for displaying attachment sizes consistently.
|
Screenshot please. |
Added |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
apps/mail/components/create/editor.tsx (1)
195-195: Consider adding a small delay to tooltips.Setting
delayDuration={0}means tooltips appear immediately. While this provides instant feedback, a small delay (e.g., 100-200ms) might prevent tooltip flickering when users move their cursor across multiple buttons quickly.-<TooltipProvider delayDuration={0}> +<TooltipProvider delayDuration={150}>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/mail/components/create/editor.tsx(5 hunks)
🔇 Additional comments (11)
apps/mail/components/create/editor.tsx (11)
36-36: Good addition of tooltip components.Adding the tooltip components from shadcn/ui is a great choice for enhancing the accessibility and usability of the editor.
52-52: Well done adding internationalization support.Adding the
useTranslationshook is essential for the i18n implementation, which aligns perfectly with the PR objectives.
123-123: Good use of the translation hook.Properly setting up the translation hook to use throughout the component.
199-211: Excellent implementation of heading1 button with tooltip.The tooltip implementation for the heading1 button follows best practices by using
asChildto preserve button accessibility properties and providing meaningful translated content.
212-237: Good consistency in implementation for heading2 and heading3.The tooltip implementation for heading2 and heading3 follows the same pattern as heading1, maintaining a consistent UI/UX.
242-299: Well structured text formatting buttons with tooltips.The implementation of tooltips for bold, italic, strikethrough, and underline buttons follows a consistent pattern, improving accessibility by providing clear explanations of each button's function.
300-312: Good tooltip implementation for link button.The link button properly uses the tooltip component with translated content, maintaining consistency with other buttons.
318-343: Correctly implemented list button tooltips.Both bullet list and ordered list buttons have appropriate tooltips with distinct translation keys, which was a previously identified issue that has been fixed.
345-427: Well-executed attachment buttons with context-aware tooltips.The implementation cleverly shows different tooltips based on whether attachments exist, enhancing usability. The popover for attachment management is also well-integrated with the tooltip system.
436-437: Good internationalization for dialog elements.Dialog title and description now properly use translation keys instead of hardcoded text.
454-458: Proper internationalization for dialog buttons.Cancel and save buttons now use appropriate translation keys from the common actions namespace.
|
amazing! LGTM |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
* fix: show primary emails * (review) add "All Mail" section to inbox switcher * ph provider * perf: switch from open ai to groq api * chore: remove openai package * chore: remove duplicated function * chore: remove duplicated function * feat: use system prompt from env * perf: use base js fetch instead of better-fetch * homepage open fix * context * cleanup * cleanup * feat: update categories logic * cleanup * cleanup * feat: use nuqs * action buttons * feat: added mark as read functionality for mails * added try and catch for better error handling * better error than codeRabbit lmao * hold to scroll down emails * fix spacing on reply composer ; * spacing * tooltip to thread display bar for ux * fix to reply composer * forward emails button * cleanup * cleanup * reply ring * overflow * cleanup * un animate x * New translations en.json (French) * New translations en.json (Spanish) * New translations en.json (Arabic) * New translations en.json (Catalan) * New translations en.json (Czech) * New translations en.json (German) * New translations en.json (Japanese) * New translations en.json (Korean) * New translations en.json (Polish) * New translations en.json (Portuguese) * New translations en.json (Russian) * New translations en.json (Turkish) * New translations en.json (Latvian) * New translations en.json (Hindi) * New translations en.json (Russian) * New translations en.json (Latvian) * cleanup * loading state and padding to mail list to not overflow when scrolling * onMouseDown * fix: remove html from AI prompt (#598) * fix: remove html from AI prompt * refact: use cheerio util to remove html from email * feat: add regex to ai-search * chore: remove debug logs * refactor: migrate from groq embeddings to openai for and improve email formatting * fix: join waitlist button contrast (#603) * fix: join waitlist button contrast The old contrast was terrible in light mode, so now I just made it black so it is always readable. * Revert "regenerating bun file" This reverts parts of commit cef74f3. * Add tooltips and i18n for editor MenuBar (#604) * feat: add tooltips and i18n to editor MenuBar * fix: incorrect translation key --------- Co-authored-by: Sergio Vazquez <sergiovazag@gmail.com> Co-authored-by: plyght <plyght@peril.lol> Co-authored-by: Sergio <60497216+sergio-jva@users.noreply.github.com> Co-authored-by: Nizzy <nizabizaher@gmail.com> Co-authored-by: Vicentesan <vikom.sanchez@gmail.com> Co-authored-by: user12224 <122770437+user12224@users.noreply.github.com> Co-authored-by: Rajmeet <rajmeetchandok@gmail.com> Co-authored-by: [bot] <zero@ibra.rip> Co-authored-by: needle <122770437+needleXO@users.noreply.github.com> Co-authored-by: Dominik Koch <dominik@koch-bautechnik.de> Co-authored-by: YK <70700647+yaraslau-klimuk@users.noreply.github.com>
Description
Added tooltips and i18n for editor menu bar. Replaced custom buttons with shadcn/ui buttons for support consistency.
Type of Change
Areas Affected
Testing Done
Checklist
Screenshots/Recordings
By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.
Summary by CodeRabbit