-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Handle invisible characters in forms #27414
Handle invisible characters in forms #27414
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
095cfd8
to
a1a7dc3
Compare
@kosmydel please update QA step in more detail. |
Merged with the main & slightly updated the PR. |
To create room, enable beta in Permissions.js and then go to FAB > Send message > Room tab |
cc @situchan done, thanks! |
Server is down - https://expensify.slack.com/archives/C01GTK53T8Q/p1695314249132269 |
@kosmydel please fix conflict |
No problem. Thanks for the update |
Hey @situchan, there is a problem with implementing it in the new Form component. It doesn't implement full validation yet. Here is how the validation looks right now. I've talked with @kowczarz and he is preparing an update to the new component form. I think that we should wait for his changes to be merged. Alternatively, we can process with only the old Form component and create a new PR with changes to the new one. The problem is, that some of the components are already migrated to the new Form (e.g. |
I think we can still wait as this is not critical bug. |
@kosmydel is there any one GH issue or PR against which I can hold this PR? |
Hey @hayata-suenaga |
Hey @situchan, I've resolved conflicts. Sorry for the delay, I was OOO on Tuesday, and yesterday we had public holidays in Poland. |
@situchan please review this when you got a minute 🙇 |
reviewing in an hr |
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.
Overall looks good. Some minor code dry feedback
Performance Tests failing. I believe not caused by this PR but we should still wait until fixed in main and merge again |
Hey, sorry for the delay, I was OOO. I think it is ready for another review. @situchan |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-i.know.teacher.movAndroid: mWeb Chromemchrome-bank.step.moviOS: Nativeios-display.name.moviOS: mWeb Safarimsafari-legal.name.movMacOS: Chrome / Safariweb-workspace.settings.movweb-edit.iou.description.movMacOS: Desktopdesktop-new.room.mov |
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.
Great work!
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 PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.3.98-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.98-5 🚀
|
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.3.99-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.99-0 🚀
|
|
||
// Remove all characters from the 'Other' (C) category except for format characters (Cf) | ||
// because some of them are used for emojis | ||
result = result.replace(/[\p{Cc}\p{Cs}\p{Co}\p{Cn}]/gu, ''); |
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.
In safari this regex is removing emojis too. ref: #52071
Details
This PR handles invisible characters in the required fields, to prevent users from creating an i.g. workspace name with only invisible characters.
We:
Fixed Issues
$ #23297
PROPOSAL: #23297 (comment)
Tests
isEmptyString
function,removeInvisibleCharacters
function.
Offline tests
N/A
QA Steps
Name
fieldMy workspace 123
)\u200D
), you can use this tool to copy it (paste the character in the JS/Java/C section, click Convert, and then Copy in Characters section)\u200D
) (should be able to save, but the name will be treated as empty)PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
web.mov
Mobile Web - Chrome
mWeb-android.mov
Mobile Web - Safari
mWeb-ios.mp4
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov