-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Magic code blur #28711
Merged
+145
−59
Merged
Magic code blur #28711
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
d1a7800
Fix stuff
wojtus7 f2a47aa
Merge remote-tracking branch 'origin/main' into magic-code-blur
wojtus7 d50aae2
Prettier
wojtus7 e96e1dd
Merge remote-tracking branch 'origin/main' into magic-code-blur
wojtus7 690d22a
Merge remote-tracking branch 'origin/main' into magic-code-blur
wojtus7 2618870
Refocus input in basevalidatecodeform and remove wasSubmitted flag
wojtus7 4d8bc1e
Use InteractionManager instead of delay
wojtus7 c2987ca
Prettier
wojtus7 3b6beeb
Merge remote-tracking branch 'origin/main' into magic-code-blur
wojtus7 b703947
Merge remote-tracking branch 'origin/main' into magic-code-blur
wojtus7 008400e
Use @ imports
wojtus7 3ad8872
Improve import
wojtus7 b757c0c
Prettier
wojtus7 a10e186
Merge remote-tracking branch 'origin/main' into magic-code-blur
wojtus7 6d5b229
Merge remote-tracking branch 'origin/main' into magic-code-blur
wojtus7 d1285a0
Use role instead of accessibilityRole
wojtus7 cc2f797
Resurrect wasSubmitted flag
wojtus7 527b9e0
Add additional checks for code input paste and fast typing
wojtus7 f1628fc
Fix lint
wojtus7 9bd3d59
add shouldDelayFocus
kosmydel 92f5be1
fix android keyboard
kosmydel 09358c8
Merge branch 'main' into @kosmydel/magic-code-blur
kosmydel 98c04ab
Refactor focusTimeoutRef.current in
kosmydel 5c2a666
add helper function
kosmydel de8fee6
add comments
kosmydel 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 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 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 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 |
---|---|---|
|
@@ -89,13 +89,25 @@ function BaseValidateCodeForm(props) { | |
} | ||
inputValidateCodeRef.current.focus(); | ||
}, | ||
focusLastSelected() { | ||
if (!inputValidateCodeRef.current) { | ||
return; | ||
} | ||
if (focusTimeoutRef.current) { | ||
clearTimeout(focusTimeoutRef.current); | ||
} | ||
focusTimeoutRef.current = setTimeout(inputValidateCodeRef.current.focusLastSelected, CONST.ANIMATED_TRANSITION); | ||
}, | ||
})); | ||
|
||
useFocusEffect( | ||
useCallback(() => { | ||
if (!inputValidateCodeRef.current) { | ||
return; | ||
} | ||
if (focusTimeoutRef.current) { | ||
clearTimeout(focusTimeoutRef.current); | ||
} | ||
focusTimeoutRef.current = setTimeout(inputValidateCodeRef.current.focus, CONST.ANIMATED_TRANSITION); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This caused issue - #33170 |
||
return () => { | ||
if (!focusTimeoutRef.current) { | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This caused crash. Now deploy blocker - #32181
@wojtus7 are you able to raise quick PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can handle the fix if need be but if you're around @wojtus7 that would be great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, @wojtus7 is not here. I can help with this one in an hour or two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can help too )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working on the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for jumping in @kosmydel! We'll be ready to review whenever
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR
I'm recording videos, however, I have a rate limit for adding new contact methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR is ready :)
cc @situchan @dangrous