-
Notifications
You must be signed in to change notification settings - Fork 13.5k
refactor: Media Call client data structure and rendering #38778
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
Merged
Changes from 30 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
d1654c3
chore: Remove "getPeerInfo" from "MediaCallContext"
gabriellsh 229a314
refactor: Split `useMediaSession` into `useMediaSession` and `useMedi…
gabriellsh 10e2553
refactor: Extract the `useMediaSessionControls` hook into it's own file.
gabriellsh d6e558e
chore: Rename `useMediaSession` return from `state` to `sessionState`
gabriellsh 8c942f5
refactor: Provide all state information in a single object `sessionSt…
gabriellsh bfb16f9
refactor: Update user status through reducer dispatch
gabriellsh bee0936
fix: MediaCallContext external usage
gabriellsh 45d311c
refactor: Split `MediaCallContext` into `MediaCallWidgetContext` and …
gabriellsh b42506a
chore: Update widget components to use new structure
gabriellsh be8b615
chore: update History components to use new structure
gabriellsh 0ab2d15
chore: update usePeerAutocomplete tests
gabriellsh b3606fe
chore: use new structure inside MediaCall Providers
gabriellsh d10c927
chore: Update core components to use new structure
gabriellsh be20ca0
fix: useUserMediaCallAction.spec.tsx
gabriellsh 4a04583
refactor: Extract `getAutocompleteOptions` from `MediaCallProvider` t…
gabriellsh 4521add
refactor: Stricter types for `useMediaSession` reducer
gabriellsh 2e47def
fix: useMediaStream hook stream state type
gabriellsh b73210e
refactor: Rename `MediaCallWidget(Context | Provder)`to `MediaCallVie…
gabriellsh 6a91555
refactor: Reorganize contexts, providers, hooks and shared functions
gabriellsh 3353139
refactor: replace `useState` with `useSyncExternalStore` on `usePeek…
gabriellsh f31265d
test: Unit tests for `deriveWidgetStateFromCallState` and `derivePeer…
gabriellsh 4db22e7
test: Implement unit tests for `usePeekMediaSession(PeerInfo | State)`
gabriellsh 6faee99
fix: `usePeekMediaSessionPeerInfo` getSnapshot function return lackin…
gabriellsh affb12c
test: Implement unit tests for `useMediaCallAction.spec.tsx`
gabriellsh 8854ea7
fix: `useMediaCallOpenRoomTracker` remove unnecessary early return
gabriellsh b9e7596
test: Implement unit tests for `useMediaCallOpenRoomTracker`
gabriellsh 4098810
test: Add snapshot and a11y tests for missing stories
gabriellsh ad651df
chore: Remove unused `useDevicePermissionPrompt` hook and update tests
gabriellsh 899c22f
test: Add snapshot testing for `MediaCallHistoryTable`
gabriellsh 0663c6e
Merge branch 'develop' into refactor/mediaCallClient
gabriellsh 1ef5ee4
Apply suggestion from @coderabbitai[bot]
tassoevan 642d3a2
fix: Small reviews
gabriellsh aa19a84
chore: Rename `useMediaCallViewContext` to `useMediaCallView`
gabriellsh d6766e3
Rename `useMediaCallInstanceContext` to `useMediaCallInstance`
gabriellsh 03e23a5
Merge branch 'develop' into refactor/mediaCallClient
gabriellsh 316683d
Merge branch 'develop' into refactor/mediaCallClient
gabriellsh 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
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
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,21 @@ | ||
| import { composeStories } from '@storybook/react'; | ||
| import { render } from '@testing-library/react'; | ||
| import { axe } from 'jest-axe'; | ||
|
|
||
| import * as stories from './Keypad.stories'; | ||
|
|
||
| const testCases = Object.values(composeStories(stories)) | ||
| .filter((Story) => !Story.tags?.includes('skip')) | ||
| .map((Story) => [Story.storyName || 'Story', Story]); | ||
|
|
||
| test.each(testCases)(`renders %s without crashing`, async (_storyname, Story) => { | ||
| const view = render(<Story />); | ||
| expect(view.baseElement).toMatchSnapshot(); | ||
| }); | ||
|
|
||
| test.each(testCases)('%s should have no a11y violations', async (_storyname, Story) => { | ||
| const { container } = render(<Story />); | ||
|
|
||
| const results = await axe(container); | ||
| expect(results).toHaveNoViolations(); | ||
| }); |
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.