Minor: rename a <CallingHeader> prop for clarity

This commit is contained in:
Evan Hahn 2020-11-25 12:16:51 -06:00 committed by Scott Nonnenberg
parent a5657473c3
commit b2087cb8a2
4 changed files with 12 additions and 14 deletions

View file

@ -232,7 +232,7 @@ export const CallScreen: React.FC<PropsType> = ({
i18n={i18n} i18n={i18n}
isGroupCall={call.callMode === CallMode.Group} isGroupCall={call.callMode === CallMode.Group}
message={headerMessage} message={headerMessage}
remoteParticipants={participantCount} participantCount={participantCount}
showParticipantsList={showParticipantsList} showParticipantsList={showParticipantsList}
title={headerTitle} title={headerTitle}
toggleParticipants={toggleParticipants} toggleParticipants={toggleParticipants}

View file

@ -17,9 +17,9 @@ const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
i18n, i18n,
isGroupCall: boolean('isGroupCall', Boolean(overrideProps.isGroupCall)), isGroupCall: boolean('isGroupCall', Boolean(overrideProps.isGroupCall)),
message: overrideProps.message, message: overrideProps.message,
remoteParticipants: number( participantCount: number(
'remoteParticipants', 'participantCount',
overrideProps.remoteParticipants || 0 overrideProps.participantCount || 0
), ),
showParticipantsList: boolean( showParticipantsList: boolean(
'showParticipantsList', 'showParticipantsList',
@ -44,7 +44,7 @@ story.add('With Participants', () => (
{...createProps({ {...createProps({
canPip: true, canPip: true,
isGroupCall: true, isGroupCall: true,
remoteParticipants: 10, participantCount: 10,
})} })}
/> />
)); ));
@ -54,7 +54,7 @@ story.add('With Participants (shown)', () => (
{...createProps({ {...createProps({
canPip: true, canPip: true,
isGroupCall: true, isGroupCall: true,
remoteParticipants: 10, participantCount: 10,
showParticipantsList: true, showParticipantsList: true,
})} })}
/> />

View file

@ -11,7 +11,7 @@ export type PropsType = {
i18n: LocalizerType; i18n: LocalizerType;
isGroupCall?: boolean; isGroupCall?: boolean;
message?: string; message?: string;
remoteParticipants?: number; participantCount: number;
showParticipantsList: boolean; showParticipantsList: boolean;
title?: string; title?: string;
toggleParticipants?: () => void; toggleParticipants?: () => void;
@ -24,7 +24,7 @@ export const CallingHeader = ({
i18n, i18n,
isGroupCall = false, isGroupCall = false,
message, message,
remoteParticipants, participantCount,
showParticipantsList, showParticipantsList,
title, title,
toggleParticipants, toggleParticipants,
@ -42,14 +42,12 @@ export const CallingHeader = ({
{isGroupCall ? ( {isGroupCall ? (
<div className="module-calling-tools__button"> <div className="module-calling-tools__button">
<Tooltip <Tooltip
content={i18n('calling__participants', [ content={i18n('calling__participants', [String(participantCount)])}
String(remoteParticipants),
])}
theme={TooltipTheme.Dark} theme={TooltipTheme.Dark}
> >
<button <button
aria-label={i18n('calling__participants', [ aria-label={i18n('calling__participants', [
String(remoteParticipants), String(participantCount),
])} ])}
className={classNames( className={classNames(
'module-calling-button__participants--container', 'module-calling-button__participants--container',
@ -62,7 +60,7 @@ export const CallingHeader = ({
> >
<i className="module-calling-button__participants" /> <i className="module-calling-button__participants" />
<span className="module-calling-button__participants--count"> <span className="module-calling-button__participants--count">
{remoteParticipants} {participantCount}
</span> </span>
</button> </button>
</Tooltip> </Tooltip>

View file

@ -159,7 +159,7 @@ export const CallingLobby = ({
title={conversation.title} title={conversation.title}
i18n={i18n} i18n={i18n}
isGroupCall={isGroupCall} isGroupCall={isGroupCall}
remoteParticipants={participantNames.length} participantCount={participantNames.length}
showParticipantsList={showParticipantsList} showParticipantsList={showParticipantsList}
toggleParticipants={toggleParticipants} toggleParticipants={toggleParticipants}
toggleSettings={toggleSettings} toggleSettings={toggleSettings}