-
Notifications
You must be signed in to change notification settings - Fork 12.9k
fix: Missing call button with "Enhanced Navigation" enabled on small screens #37449
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
Conversation
🦋 Changeset detectedLatest commit: 5de10ff The changes in this PR will be included in the next version bump. This PR includes changesets to release 41 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Looks like this PR is ready to merge! 🎉 |
WalkthroughThe changes fix a missing voice call button in the navbar on mobile screens by introducing a Changes
Sequence DiagramsequenceDiagram
participant NavBarControlsWithData
participant useMediaCallAction as useMediaCallAction Hook
participant NavBarControlsMenu
participant NavbarControlsWithCall
NavBarControlsWithData->>useMediaCallAction: Get media call action
useMediaCallAction-->>NavBarControlsWithData: Return callAction (if available)
alt callAction exists
NavBarControlsWithData->>NavBarControlsWithData: Map callAction to callItem<br/>(id, icon, content, onClick)
else No callAction
NavBarControlsWithData->>NavBarControlsWithData: callItem = undefined
end
alt isCallEnabled = true
NavBarControlsWithData->>NavbarControlsWithCall: Pass callItem + omnichannel items
NavbarControlsWithCall-->>NavBarControlsWithData: Render with call button
else isCallEnabled = false
NavBarControlsWithData->>NavBarControlsMenu: Pass callItem + omnichannel items
NavBarControlsMenu->>NavBarControlsMenu: Create Voice_Call section with callItem
NavBarControlsMenu->>NavBarControlsMenu: Filter to remove empty sections
NavBarControlsMenu-->>NavBarControlsWithData: Render menu with call button
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
.changeset/tall-sloths-exercise.md(1 hunks)apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsMenu.tsx(1 hunks)apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithData.tsx(4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithData.tsx (1)
packages/ui-voip/src/index.ts (1)
useMediaCallAction(5-5)
🪛 LanguageTool
.changeset/tall-sloths-exercise.md
[style] ~6-~6: Consider a more concise word here.
Context: ...navigation experience` feature preview, in order to check it you need to enabled it
(IN_ORDER_TO_PREMIUM)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: 🚀 Notify external services - draft
- GitHub Check: CodeQL-Build
🔇 Additional comments (7)
apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsMenu.tsx (3)
12-12: LGTM!The optional
callItemprop is properly typed and aligns with the pattern used foromnichannelItems.
15-23: LGTM!The Voice_Call section is correctly implemented following the existing pattern used for the Omnichannel section. The conditional inclusion of
callItemensures the section only appears when the call action is available.
28-32: LGTM!The filtering logic correctly removes empty sections and the early return prevents rendering an empty menu, ensuring a clean UI when neither voice call nor omnichannel items are available.
apps/meteor/client/NavBarV2/NavBarControls/NavBarControlsWithData.tsx (3)
2-2: LGTM!The
useMediaCallActionhook is correctly imported and called at the top level, following React hooks best practices.Also applies to: 17-17
40-47: LGTM!The
callItemconstruction correctly maps thecallActionproperties to theGenericMenuItemPropsstructure, with proper conditional handling to returnundefinedwhen no call action is available.
73-76:callItemprop is correctly accepted and passed through the component chain.The verification confirms that
NavbarControlsWithCallaccepts thecallItemprop through itsNavBarControlsMenuPropstype definition (line 11 of NavBarControlsWithCall.tsx). The prop is forwarded via...propstoNavBarControlsMenu, which explicitly destructures and uses it to populate the Voice_Call menu section. The prop typing is consistent across all three components and properly handles the optional case..changeset/tall-sloths-exercise.md (1)
1-5: LGTM!The changeset header and description correctly document this patch-level bug fix for the missing voice call button on mobile screens.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #37449 +/- ##
===========================================
- Coverage 68.14% 68.11% -0.03%
===========================================
Files 3364 3364
Lines 115749 115755 +6
Branches 20907 20910 +3
===========================================
- Hits 78874 78846 -28
- Misses 34183 34216 +33
- Partials 2692 2693 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
Important
This change is under feature preview
Issue(s)
Steps to test or reproduce
Further comments
VGA-20
Summary by CodeRabbit
Bug Fixes