-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Regression: Special characters on phone number #26241
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0724a42
remove mask, add focus, add submit event
tiagoevanp ac0b07f
long press buttons
tiagoevanp e6d5940
dial pad alignment
tiagoevanp cd176f9
Merge branch 'develop' into regression/dial-pad
ggazzo 0371b27
Merge branch 'regression/dial-pad' of github.com:RocketChat/Rocket.Ch…
tiagoevanp c00bea6
review adjustments
tiagoevanp c6f664d
fix
tiagoevanp 3870bea
second review
tiagoevanp 73c646e
Regression: AutoTranslate on new message template (#26049)
2044463
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into regr…
tiagoevanp a71d182
Merge branch 'develop' into regression/dial-pad
KevLehman 005b799
Fix improper name prop usage
KevLehman d6d3d8e
*
tiagoevanp 63bf0f1
Merge branch 'regression/dial-pad' of github.com:RocketChat/Rocket.Ch…
tiagoevanp 081fd46
Merge branch 'develop' of github.com:RocketChat/Rocket.Chat into regr…
tiagoevanp 398a49e
Merge branch 'develop' into regression/dial-pad
KevLehman 2d65470
Merge branch 'regression/dial-pad' of github.com:RocketChat/Rocket.Ch…
KevLehman 02fe4d4
[FIX] Adjusted device provider order to give the device settings moda…
aleksandernsilva 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,31 +1,43 @@ | ||
| import { Box, Button } from '@rocket.chat/fuselage'; | ||
| import React, { ReactElement } from 'react'; | ||
|
|
||
| const letters = ['+', '', 'ABC', 'DEF', 'GHI', 'JKL', 'MNO', 'PQRS', 'TUV', 'WXYZ']; | ||
| import type { PadDigit } from './Pad'; | ||
| import { useLongPress } from './hooks/useLongPress'; | ||
|
|
||
| const PadButton = ({ | ||
| children, | ||
| onClickPadButton, | ||
| onLongPressPadButton, | ||
| }: { | ||
| children: string | number; | ||
| onClickPadButton: (digit: string | number) => void; | ||
| }): ReactElement => ( | ||
| <Button | ||
| m='8px' | ||
| pb='8px' | ||
| minWidth='28%' | ||
| display='flex' | ||
| flexGrow={1} | ||
| flexShrink={0} | ||
| flexDirection='column' | ||
| alignItems='center' | ||
| onClick={(): void => onClickPadButton(children)} | ||
| > | ||
| <Box fontSize='h2'>{children}</Box> | ||
| <Box fontSize='c1' color='info'> | ||
| {typeof children === 'number' && letters[children]} | ||
| </Box> | ||
| </Button> | ||
| ); | ||
| children: PadDigit; | ||
| onClickPadButton: (digit: PadDigit[0]) => void; | ||
| onLongPressPadButton: (digit: PadDigit[1]) => void; | ||
| }): ReactElement => { | ||
| const [firstDigit, secondDigit] = children; | ||
| const { onClick, onMouseDown, onMouseUp, onTouchStart, onTouchEnd } = useLongPress(() => onLongPressPadButton(secondDigit), { | ||
| onClick: () => onClickPadButton(firstDigit), | ||
| }); | ||
|
|
||
| return ( | ||
| <Button | ||
| m='8px' | ||
| pb='8px' | ||
| minWidth='28%' | ||
| display='flex' | ||
| flexDirection='column' | ||
| alignItems='center' | ||
| onClick={onClick} | ||
| onMouseDown={onMouseDown} | ||
| onMouseUp={onMouseUp} | ||
| onTouchStart={onTouchStart} | ||
| onTouchEnd={onTouchEnd} | ||
| > | ||
| <Box fontSize='h2'>{firstDigit}</Box> | ||
| <Box fontSize='c1' color='info'> | ||
| {secondDigit} | ||
| </Box> | ||
| </Button> | ||
| ); | ||
| }; | ||
|
|
||
| export default PadButton; |
This file contains hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.