Skip to content

Commit

Permalink
Removed custom styles for scroll bar for ChatComposite and Captions c…
Browse files Browse the repository at this point in the history
…omponents (#5470)
  • Loading branch information
vhuseinova-msft authored Dec 6, 2024
1 parent 075b95f commit c5aaf2d
Show file tree
Hide file tree
Showing 91 changed files with 27 additions and 40 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "A11y",
"comment": "Removed custom styles for scroll bar for ChatComposite and Captions components",
"packageName": "@azure/communication-react",
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "patch",
"area": "fix",
"workstream": "A11y",
"comment": "Removed custom styles for scroll bar for ChatComposite and Captions components",
"packageName": "@azure/communication-react",
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import { IStackStyles, ITheme, mergeStyles } from '@fluentui/react';
import { _pxToRem } from '@internal/acs-ui-common';
import { scrollbarStyles } from './Common.style';

/**
* @private
Expand Down Expand Up @@ -93,8 +92,7 @@ export const captionsBannerClassName = (formFactor: 'default' | 'compact'): stri
...resetUlStyling,
overflowX: 'hidden',
height: formFactor === 'compact' ? '4.5rem' : '8.75rem',
overflowY: 'auto',
...scrollbarStyles
overflowY: 'auto'
});
};

Expand All @@ -110,8 +108,7 @@ export const captionsBannerFullHeightClassName = (theme: ITheme): string => {
width: '100%',
position: 'absolute',
backgroundColor: theme.palette.white,
left: 0,
...scrollbarStyles
left: 0
});
};

Expand Down Expand Up @@ -145,7 +142,8 @@ export const loadingBannerFullHeightStyles = (theme: ITheme): IStackStyles => {
* @private
*/
export const captionsContentContainerClassName = mergeStyles({
width: '100%'
width: '100%',
paddingInlineEnd: _pxToRem(4)
});

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import { IButtonStyles, IDropdownStyles, IModalStyles, mergeStyles, Theme } from '@fluentui/react';
import { _pxToRem } from '@internal/acs-ui-common';
import { scrollbarStyles } from './Common.style';

/**
* @private
Expand Down Expand Up @@ -93,8 +92,7 @@ export const buttonStyles = (theme: Theme): IButtonStyles => {
export const dropdownStyles: Partial<IDropdownStyles> = {
callout: {
height: _pxToRem(300),
overflow: 'auto',
...scrollbarStyles
overflow: 'auto'
},
dropdownOptionText: {
textWrap: 'auto',
Expand Down
14 changes: 0 additions & 14 deletions packages/react-components/src/components/styles/Common.style.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

/**
* @private
*/
export const scrollbarStyles = {
'::-webkit-scrollbar, *::-webkit-scrollbar': {
width: '0.3rem',
height: '0.3rem'
},
'::-webkit-scrollbar-thumb, *::-webkit-scrollbar-thumb': {
borderRadius: '10px',
background: 'rgba(150, 150, 150)'
}
};

const ERROR_IMAGE_SVG_PATH =
'M2.85 2.15a.5.5 0 1 0-.7.7l1.4 1.41A2.99 2.99 0 0 0 3 6v8a3 3 0 0 0 3 3h8c.65 0 1.25-.2 1.74-.55l1.4 1.4a.5.5 0 0 0 .71-.7l-15-15Zm6.56 7.97a1.5 1.5 0 0 0-.46.31l-4.67 4.59A2 2 0 0 1 4 14V6a2 2 0 0 1 .28-1.02l5.13 5.14ZM6 16a2 2 0 0 1-1.01-.27l4.66-4.58c.2-.2.5-.2.7 0l4.66 4.58A2 2 0 0 1 14 16H6ZM16 6v7.88l.9.9A3 3 0 0 0 17 14V6a3 3 0 0 0-3-3H6a3 3 0 0 0-.78.1l.9.9H14a2 2 0 0 1 2 2Zm-2 1.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0Zm-1 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export const richTextEditorStyle = (props: { minHeight: string; maxHeight: strin
minHeight: props.minHeight,
maxHeight: props.maxHeight,
maxWidth: '100%',
paddingTop: '0.5rem'
paddingTop: '0.5rem',
paddingInlineStart: `0.75rem`,
paddingInlineEnd: `0.75rem`
});
};

Expand All @@ -24,8 +26,6 @@ export const richTextEditorStyle = (props: { minHeight: string; maxHeight: strin
*/
export const richTextEditorWrapperStyle = (theme: Theme): string => {
return mergeStyles({
paddingInlineStart: `0.75rem`,
paddingInlineEnd: `0.75rem`,
maxWidth: '100%',
color: theme.palette.neutralPrimary,
'& img': {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,7 @@ export const chatScreenContainerStyle = mergeStyles({
export const chatContainer = mergeStyles({
height: '100%',
width: '100%',
overflow: 'hidden',

'*::-webkit-scrollbar': {
width: '0.3rem',
height: '0.3rem'
},
'.scroll::-webkit-scrollbar-track': {
background: 'rgba(150, 150, 150)',
borderRadius: '0.3rem'
},
'*::-webkit-scrollbar-thumb': {
borderRadius: '10px',
background: 'rgba(150, 150, 150)'
}
overflow: 'hidden'
});

/**
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c5aaf2d

Please sign in to comment.