Skip to content

Commit 44946d7

Browse files
[DTMF Dialer] Dialpad back button overlap fix (#4079)
* update styling to include space for back button * Change files * Duplicate change files for beta release * fix styles
1 parent 817d7d6 commit 44946d7

4 files changed

Lines changed: 24 additions & 4 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "prerelease",
3+
"area": "fix",
4+
"workstream": "DTMF Dialer",
5+
"comment": "update styling to include space for back button",
6+
"packageName": "@azure/communication-react",
7+
"email": "94866715+dmceachernmsft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "prerelease",
3+
"area": "fix",
4+
"workstream": "DTMF Dialer",
5+
"comment": "update styling to include space for back button",
6+
"packageName": "@azure/communication-react",
7+
"email": "94866715+dmceachernmsft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}

packages/react-components/src/components/Dialpad/Dialpad.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ const DialpadContainer = (props: {
370370
>
371371
{dialpadMode === 'dialer' && (
372372
<TextField
373-
styles={concatStyleSets(textFieldStyles(theme), props.styles?.textField)}
373+
styles={concatStyleSets(textFieldStyles(theme, plainTextValue !== ''), props.styles?.textField)}
374374
value={textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue)}
375375
// eslint-disable-next-line @typescript-eslint/no-explicit-any
376376
onChange={(e: any) => {

packages/react-components/src/components/styles/Dialpad.styles.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,18 @@ export const digitStyles = (theme: Theme): IStyle => {
5151
/**
5252
* @private
5353
*/
54-
export const textFieldStyles = (theme: Theme): Partial<ITextFieldStyles> => ({
54+
export const textFieldStyles = (theme: Theme, buttonPresent: boolean): Partial<ITextFieldStyles> => ({
5555
field: {
5656
padding: 0,
5757
textAlign: 'center',
5858
fontSize: `${_pxToRem(18)}`,
5959
fontWeight: 400,
60-
width: `${_pxToRem(192)}`,
60+
width: `${buttonPresent ? '10rem' : '12rem'}`,
6161
height: '3rem',
6262
borderRadius: '0.5rem',
6363
position: 'relative',
64-
overflowX: 'auto'
64+
overflowX: 'hidden',
65+
textOverflow: 'clip'
6566
},
6667
root: {
6768
backgroundColor: `${theme.palette.neutralLighter}`,
@@ -72,6 +73,7 @@ export const textFieldStyles = (theme: Theme): Partial<ITextFieldStyles> => ({
7273
fieldGroup: {
7374
border: 'none',
7475
borderRadius: '0.5rem',
76+
width: '12rem',
7577
height: '3rem',
7678
backgroundColor: `${theme.palette.neutralLighter}`,
7779
':after': {

0 commit comments

Comments
 (0)