-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
feat(breakout-rooms/native): separate breakout rooms from participants #13920
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
c6b3c52
feat(toolbox/native): created breakout rooms button
Calinteodor f908dad
feat(toolbox/native): updated menu to use breakout rooms button
Calinteodor be2f18b
feat(mobile/navigation): alpha sort and added breakout rooms route
Calinteodor 606fdc8
feat(breakout-rooms/native): updated visibility and navigation for me…
Calinteodor e636fc9
feat(toolbox/native): fixed button translation
Calinteodor 44c4e22
feat(mobile/navigation): updated route
Calinteodor 8f61668
feat(mobile/navigation): alpha sort and created breakout rooms screen…
Calinteodor eac37a3
feat(mobile/navigation): added BreakoutRooms to the nav container
Calinteodor c999a7b
feat(participants-pane/native): moved breakout rooms content to screen
Calinteodor 1101fc3
feat(participants-pane/native): fixed scroll inside scroll and update…
Calinteodor 4d31e78
feat(participants-pane/native): fixed/updated translations
Calinteodor e951526
feat(participants-pane/native): fixed long lobby part name case
Calinteodor 7686810
feat(participants-pane/native): syntax rework
Calinteodor c8b158b
feat(participants-pane/native): converted MeetingParticipantList to f…
Calinteodor a534771
feat(participants-pane/native): syntax rework and removed some empty …
Calinteodor 42eb20e
feat(participants-pane/native): participants footer style fix
Calinteodor 8036b5b
feat(participants-pane/native): fixed ts errors
Calinteodor 8855c53
feat(participants-pane/native): some ts types and comments
Calinteodor 977b336
feat(breakout-rooms/native): moved all related components to feature
Calinteodor 9980d0c
feat(breakout-rooms): alpha sort translations
Calinteodor ce755ec
feat(breakout-rooms): fixed linter
Calinteodor 82c7ba6
feat(breakout-rooms): fixed linter pt. 2
Calinteodor 0e3320c
feat(breakout-rooms): fixed linter pt. 3
Calinteodor 3b61d89
feat(breakout-rooms): fixed linter pt. 4
Calinteodor 7c8ed6f
feat(breakout-rooms): removed search from breakout rooms
Calinteodor 7bdd7c7
feat(breakout-rooms): removed unused hook
Calinteodor bf027e1
feat(breakout-rooms): updated translations
Calinteodor a09ec19
feat(breakout-rooms): fixed and removed unused styles for screen
Calinteodor a145456
feat(participants-pane/native): fixed styles for meeting and lobby pa…
Calinteodor 584dcb7
feat(participants-pane): fixed linter
Calinteodor 6e7bacd
ios: reverted podfile.lock change
Calinteodor 3baff80
feat(participants-pane): removed breakout rooms related onLongPress e…
Calinteodor 665c776
feat(breakout-rooms): fixed linter
Calinteodor f94cc68
feat(breakout-rooms): fixed styles
Calinteodor 7401a7c
feat(participants-pane): fixed background color
Calinteodor 293003b
feat(participants-pane): fixed linter
Calinteodor 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 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 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
6 changes: 3 additions & 3 deletions
6
...mponents/native/AddBreakoutRoomButton.tsx → ...mponents/native/AddBreakoutRoomButton.tsx
This file contains 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
6 changes: 3 additions & 3 deletions
6
...ms/components/native/AutoAssignButton.tsx → ...ms/components/native/AutoAssignButton.tsx
This file contains 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 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
7 changes: 4 additions & 3 deletions
7
...ponents/native/BreakoutRoomNamePrompt.tsx → ...ponents/native/BreakoutRoomNamePrompt.tsx
This file contains 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
10 changes: 5 additions & 5 deletions
10
...ts/native/BreakoutRoomParticipantItem.tsx → ...ts/native/BreakoutRoomParticipantItem.tsx
This file contains 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
68 changes: 68 additions & 0 deletions
68
react/features/breakout-rooms/components/native/BreakoutRooms.tsx
This file contains 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,68 @@ | ||
import React, { useCallback } from 'react'; | ||
import { FlatList } from 'react-native'; | ||
import { useSelector } from 'react-redux'; | ||
|
||
import { IReduxState } from '../../../app/types'; | ||
import JitsiScreen from '../../../base/modal/components/JitsiScreen'; | ||
import { isLocalParticipantModerator } from '../../../base/participants/functions'; | ||
import { equals } from '../../../base/redux/functions'; | ||
import { | ||
getBreakoutRooms, | ||
getCurrentRoomId, | ||
isAddBreakoutRoomButtonVisible, | ||
isAutoAssignParticipantsVisible, | ||
isInBreakoutRoom | ||
} from '../../functions'; | ||
|
||
import AddBreakoutRoomButton from './AddBreakoutRoomButton'; | ||
import AutoAssignButton from './AutoAssignButton'; | ||
import { CollapsibleRoom } from './CollapsibleRoom'; | ||
import LeaveBreakoutRoomButton from './LeaveBreakoutRoomButton'; | ||
import styles from './styles'; | ||
|
||
|
||
const BreakoutRooms = () => { | ||
const currentRoomId = useSelector(getCurrentRoomId); | ||
const inBreakoutRoom = useSelector(isInBreakoutRoom); | ||
const isBreakoutRoomsSupported = useSelector((state: IReduxState) => | ||
state['features/base/conference'].conference?.getBreakoutRooms()?.isSupported()); | ||
const isLocalModerator = useSelector(isLocalParticipantModerator); | ||
const keyExtractor = useCallback((e: undefined, i: number) => i.toString(), []); | ||
const rooms = Object.values(useSelector(getBreakoutRooms, equals)) | ||
.filter(room => room.id !== currentRoomId) | ||
.sort((p1, p2) => (p1?.name || '').localeCompare(p2?.name || '')); | ||
const showAddBreakoutRoom = useSelector(isAddBreakoutRoomButtonVisible); | ||
const showAutoAssign = useSelector(isAutoAssignParticipantsVisible); | ||
|
||
return ( | ||
<JitsiScreen | ||
footerComponent = { isLocalModerator && showAddBreakoutRoom | ||
? AddBreakoutRoomButton : undefined } | ||
style = { styles.breakoutRoomsContainer }> | ||
|
||
{ /* Fixes warning regarding nested lists */ } | ||
<FlatList | ||
|
||
/* eslint-disable react/jsx-no-bind */ | ||
ListHeaderComponent = { () => ( | ||
<> | ||
{ showAutoAssign && <AutoAssignButton /> } | ||
{ inBreakoutRoom && <LeaveBreakoutRoomButton /> } | ||
{ | ||
isBreakoutRoomsSupported | ||
&& rooms.map(room => (<CollapsibleRoom | ||
key = { room.id } | ||
room = { room } | ||
roomId = { room.id } />)) | ||
} | ||
</> | ||
) } | ||
data = { [] as ReadonlyArray<undefined> } | ||
keyExtractor = { keyExtractor } | ||
renderItem = { null } | ||
windowSize = { 2 } /> | ||
</JitsiScreen> | ||
); | ||
}; | ||
|
||
export default BreakoutRooms; |
53 changes: 53 additions & 0 deletions
53
react/features/breakout-rooms/components/native/BreakoutRoomsButton.tsx
This file contains 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,53 @@ | ||
import { connect } from 'react-redux'; | ||
|
||
import { IReduxState } from '../../../app/types'; | ||
import { | ||
BREAKOUT_ROOMS_BUTTON_ENABLED | ||
} from '../../../base/flags/constants'; | ||
import { getFeatureFlag } from '../../../base/flags/functions'; | ||
import { translate } from '../../../base/i18n/functions'; | ||
import { IconRingGroup } from '../../../base/icons/svg'; | ||
import AbstractButton, | ||
{ | ||
IProps as AbstractButtonProps | ||
} from '../../../base/toolbox/components/AbstractButton'; | ||
import { | ||
navigate | ||
} from '../../../mobile/navigation/components/conference/ConferenceNavigationContainerRef'; | ||
import { screen } from '../../../mobile/navigation/routes'; | ||
|
||
|
||
/** | ||
* Implements an {@link AbstractButton} to open the breakout room screen. | ||
*/ | ||
class BreakoutRoomsButton extends AbstractButton<AbstractButtonProps> { | ||
accessibilityLabel = 'toolbar.accessibilityLabel.breakoutRooms'; | ||
icon = IconRingGroup; | ||
label = 'breakoutRooms.buttonLabel'; | ||
|
||
/** | ||
* Handles clicking / pressing the button and opens the breakout rooms screen. | ||
* | ||
* @private | ||
* @returns {void} | ||
*/ | ||
_handleClick() { | ||
return navigate(screen.conference.breakoutRooms); | ||
} | ||
} | ||
|
||
/** | ||
* Maps part of the redux state to the component's props. | ||
* | ||
* @param {IReduxState} state - The Redux state. | ||
* @returns {Object} | ||
*/ | ||
function _mapStateToProps(state: IReduxState) { | ||
const enabled = getFeatureFlag(state, BREAKOUT_ROOMS_BUTTON_ENABLED, true); | ||
|
||
return { | ||
visible: enabled | ||
}; | ||
} | ||
|
||
export default translate(connect(_mapStateToProps)(BreakoutRoomsButton)); |
This file contains 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
10 changes: 5 additions & 5 deletions
10
...onents/native/LeaveBreakoutRoomButton.tsx → ...onents/native/LeaveBreakoutRoomButton.tsx
This file contains 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.
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.
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.
Neat!