-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(voip): tablet and landscape layout #7110
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
Merged
+9,653
−881
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
2f0492c
feat(voip): add wide layout mode for CallView and CallButtons
diegolmello 2879ae1
feat(voip): side-by-side dialpad layout for landscape orientation
diegolmello b6dd822
fix(test): add global TrueSheet mock to jest.setup.js
diegolmello 3bd309d
chore: format code and fix lint issues
diegolmello c32e3f5
chore: regenerate yarn.lock after merge
diegolmello 43deb06
chore: update snapshots after merge
diegolmello 14df681
fix: remove deprecated bottomSheet prop and add layoutMode to tests
diegolmello bab15a8
chore: update snapshots after develop merge
diegolmello 204305e
Add mock
diegolmello 92ff0d9
Add CallView to tablet stack
diegolmello eb1f951
Fix UI
diegolmello d46f24a
Stories and tests
diegolmello bd3f362
refactor(CallView): extract LayoutMode to types module
diegolmello 0425eb1
chore(CallView): regenerate snapshots after alignContent removal
diegolmello ca64d5b
refactor(CallView): collapse CallButtons into config array
diegolmello 14b37df
test(CallView): use within() for row-membership assertions
diegolmello d7852b6
refactor(CallView): centralize layout mode in useCallLayoutMode
diegolmello c50a477
fix(CallView): tighten CallButtons config-array types
diegolmello 13f532c
refactor(Dialpad): collapse portrait/landscape into single component
diegolmello 9f53e6f
chore: format code and fix lint issues
diegolmello fdd2229
Update: .gitignore CLAUDE.md
diegolmello 46bb7c7
chore: format code and fix lint issues
diegolmello 6daeebe
chore(voip): enable Message action in default mockCall
diegolmello dca8b5e
test(Dialpad): drive layout stories via ResponsiveLayoutContext
diegolmello fbea0eb
test(CallView): fix responsive layout mock for wide-layout assertions
diegolmello 00c16c4
test(CallActionButton): align stories responsive mock with prod clamp
diegolmello dde84b1
chore: remove CLAUDE.md from repo
diegolmello f8974e2
refactor(CallView): inline layout/theme hooks at component leaves
diegolmello 0864e40
chore(CallView): refresh stale CallerInfo and Dialpad snapshots
diegolmello File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| import type { CallState, IClientMediaCall } from '@rocket.chat/media-signaling'; | ||
|
|
||
| import Navigation from '../../navigation/appNavigation'; | ||
| import { useCallStore } from './useCallStore'; | ||
|
|
||
| export interface MockCallOverrides { | ||
| callState?: CallState; | ||
| isMuted?: boolean; | ||
| isOnHold?: boolean; | ||
| isSpeakerOn?: boolean; | ||
| callStartTime?: number | null; | ||
| roomId?: string | null; | ||
| contact?: { | ||
| id?: string; | ||
| displayName?: string; | ||
| username?: string; | ||
| sipExtension?: string; | ||
| }; | ||
| } | ||
|
|
||
| const DEFAULT_CONTACT = { | ||
| id: 'mock-contact-id', | ||
| displayName: 'Bob Burnquist', | ||
| username: 'bob.burnquist', | ||
| sipExtension: '' | ||
| }; | ||
|
|
||
| /** | ||
| * Build a fake `IClientMediaCall` good enough to render `CallView` without a real SIP/WebRTC stack. | ||
| * No-op `setMuted/setHeld/hangup/sendDTMF` and a no-op event emitter so store subscriptions are safe. | ||
| */ | ||
| export function createMockCall(overrides: MockCallOverrides = {}): IClientMediaCall { | ||
| const contact = { ...DEFAULT_CONTACT, ...overrides.contact }; | ||
| const callState: CallState = overrides.callState ?? 'active'; | ||
|
|
||
| const mock = { | ||
| callId: 'mock-call-id', | ||
| state: callState, | ||
| muted: overrides.isMuted ?? false, | ||
| held: overrides.isOnHold ?? false, | ||
| remoteMute: false, | ||
| remoteHeld: false, | ||
| contact, | ||
| setMuted: () => {}, | ||
| setHeld: () => {}, | ||
| hangup: () => {}, | ||
| reject: () => {}, | ||
| sendDTMF: () => {}, | ||
| emitter: { | ||
| on: () => {}, | ||
| off: () => {} | ||
| } | ||
| }; | ||
|
|
||
| return mock as unknown as IClientMediaCall; | ||
| } | ||
|
|
||
| /** | ||
| * Seed `useCallStore` with a mock call so `CallView` renders without going through `setCall` | ||
| * (which subscribes real listeners and starts `InCallManager`). | ||
| */ | ||
| export function seedMockCall(overrides: MockCallOverrides = {}): void { | ||
| const mockCall = createMockCall(overrides); | ||
| const callState: CallState = overrides.callState ?? 'active'; | ||
|
|
||
| useCallStore.setState({ | ||
| call: mockCall, | ||
| callId: mockCall.callId, | ||
| callState, | ||
| isMuted: overrides.isMuted ?? false, | ||
| isOnHold: overrides.isOnHold ?? false, | ||
| isSpeakerOn: overrides.isSpeakerOn ?? false, | ||
| callStartTime: overrides.callStartTime ?? (callState === 'active' ? Date.now() : null), | ||
| contact: { ...DEFAULT_CONTACT, ...overrides.contact }, | ||
| roomId: overrides.roomId ?? 'mock-room-id', | ||
| focused: true, | ||
| controlsVisible: true | ||
| }); | ||
| } | ||
|
|
||
| /** | ||
| * Dev helper: seed a mock call and navigate to `CallView`. Use from a debug button to exercise | ||
| * the call UI on the iOS simulator without a real call. | ||
| */ | ||
| export function launchMockCallView(overrides: MockCallOverrides = {}): void { | ||
| seedMockCall(overrides); | ||
| Navigation.navigate('CallView'); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.