Skip to content

Commit

Permalink
[Bugfix] long name screenshare mobile fix (#5677)
Browse files Browse the repository at this point in the history
* change label overflow behavior

* update styling to cap the name length and ellipsis the overflow

* Change files

* move styles to file
  • Loading branch information
dmceachernmsft authored Feb 28, 2025
1 parent a19b51c commit 8fea7e8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "VideoGallery",
"comment": "Update styles for screenshare loading spinner to better handle long names on mobile and desktop",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "VideoGallery",
"comment": "Update styles for screenshare loading spinner to better handle long names on mobile and desktop",
"packageName": "@azure/communication-react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { StreamMedia } from '../StreamMedia';
import { VideoTile } from '../VideoTile';
import { CreateVideoStreamViewResult, VideoStreamOptions } from '../../types';
import { ReactionResources, VideoGalleryLocalParticipant, VideoGalleryRemoteParticipant } from '../../types';
import { loadingStyle } from './styles/RemoteScreenShare.styles';
import { loadingLabelStyles, loadingStyle } from './styles/RemoteScreenShare.styles';
import { _formatString } from '@internal/acs-ui-common';
import { MeetingReactionOverlay } from '../MeetingReactionOverlay';

Expand Down Expand Up @@ -110,7 +110,12 @@ export const RemoteScreenShare = React.memo(
export const LoadingSpinner = (props: { loadingMessage: string }): JSX.Element => {
return (
<Stack verticalAlign="center" className={loadingStyle}>
<Spinner label={props.loadingMessage} size={SpinnerSize.xSmall} aria-live={'assertive'} />
<Spinner
styles={loadingLabelStyles}
label={props.loadingMessage}
size={SpinnerSize.xSmall}
aria-live={'assertive'}
/>
</Stack>
);
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { mergeStyles } from '@fluentui/react';
import { ISpinnerStyles, mergeStyles } from '@fluentui/react';

/**
* @private
Expand All @@ -9,3 +9,10 @@ export const loadingStyle = mergeStyles({
height: '100%',
width: '100%'
});

/**
* @private
*/
export const loadingLabelStyles: ISpinnerStyles = {
label: { maxWidth: '10rem', overflow: 'hidden', textOverflow: 'ellipsis' }
};

0 comments on commit 8fea7e8

Please sign in to comment.