-
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
[$250] iOS - Composer - "Write something..." is not in the middle of the composer #46443
Comments
Triggered auto assignment to @marcochavezf ( |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
We think that this bug might be related to #vip-vsp |
not a back-end deploy blocker, but I think since this negatively affects a very core component of the app it should be treated as a blocker |
Job added to Upwork: https://www.upwork.com/jobs/~013fd28700fc476d2f |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mkhutornyi ( |
Triggered auto assignment to @stephanieelliott ( |
#40692 might be the culprit |
agree, was just coming to post the same thing. Would love to see this fixed rather than just reverting that PR which took a long time to land |
Cool, so @roryabraham are you thinking we treat this as if it's a regular bug and get proposals on it? |
ProposalPlease re-state the problem that we are trying to solve in this issue.iOS - Composer - "Write something..." is not in the middle of the composer. What is the root cause of that problem?The value of Line 1714 in 2ff7775
The
App/src/components/Composer/index.native.tsx Lines 76 to 79 in ba25cb3
What changes do you think we should make in order to solve the problem?Check if message contains text and emoji both: function containsTextWithEmojis(message: string): boolean {
const trimmedMessage = message.replace(/\s+/g, '');
const emojisRegex = new RegExp(CONST.REGEX.EMOJIS, CONST.REGEX.EMOJIS.flags.concat('g'));
const emojiMatches = trimmedMessage.match(emojisRegex);
if (!emojiMatches) {
return false;
}
const emojiCodes = [];
emojiMatches.forEach((emoji) => {
getEmojiUnicode(emoji).split(' ').forEach((code) => {
if (!(CONST.INVISIBLE_CODEPOINTS as readonly string[]).includes(code)) {
emojiCodes.push(code);
}
});
});
const messageChars = [...trimmedMessage];
const containsText = messageChars.some((char) => {
const unicode = getEmojiUnicode(char);
return !emojiCodes.includes(unicode) && unicode.length > 0 && !(CONST.INVISIBLE_CODEPOINTS as readonly string[]).includes(unicode);
});
return containsText;
} Add const containsTextWithEmojis = useMemo(() => EmojiUtils.containsTextWithEmojis(value ?? ''), [value]); Update composerStyle in const composerStyle = useMemo(
() => StyleSheet.flatten([style, doesTextContainOnlyEmojis ? styles.onlyEmojisTextLineHeight : (containsTextWithEmojis ? styles.emojisWithTextLineHeight : styles.lineHeightMarkdownEnabledInput)]),
[style, doesTextContainOnlyEmojis, styles, containsTextWithEmojis],
); |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
@roryabraham @francoisl My proposal above should fix this as well. |
Screen.Recording.2024-07-30.at.2.18.15.AM.mov |
Hi @mkhutornyi can you look at @ShridharGoel's proposal? |
Testing. @ShridharGoel can you make sure that your change doesn't cause any other regression in different text display scenarios (with/without emojis)? |
I still dont understand how does the proposal above fixes this issue ... the issue doesn't happen when you type an emoji and two characters .. so what is the problem with typing an emoji and one character ? |
📣 @hayes65! 📣
|
@mkhutornyi I couldn't find any issue yet with the solution. I've tested:
|
@ShridharGoel Looks like you updated proposal without notifying "Proposal updated". Btw your solution isn't safe enough to CP. |
@mkhutornyi I had updated it soon after posting, before the review started. And there was no other proposal, so I thought that the "Proposal Updated" comment can be skipped. May I know what issues can be caused by the mentioned changes? |
yeah but still treat is as an hourly for now. That would be my inclination |
I had started reviewing & testing as soon as you posted ^ 😄 Meanwhile, there was slack comment that @VickyStash would be working on fix tomorrow morning. |
@ShridharGoel's proposal looks promising but let's see if QA team can find another bug related to emoji / composer in addition to 2 known bugs so far, so the fix can cover all of them together (as deploy won't happen today). |
Do you know why this happens only on iOS? Although iOS and Android share the same styling logic of the composer @mkhutornyi @roryabraham ? |
QA reported another bugs: #46451 #46453 I think we should revert offending PR since it's causing too many blockers. |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
Personally I agree with a revert since there are now 3 deploy blockers / regressions linked |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
I created a revert here to unblock the deploy today |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
We CP'd the revert, so this should be fixed now. Will retest on TF... |
confirmed this is fixed ✅ |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.14-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
"Write something..." will be in the middle of the composer
Actual Result:
"Write something..." is not in the middle of the composer
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6556576_1722281092738.ScreenRecording_07-30-2024_03-14-46_1.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @marcochavezfThe text was updated successfully, but these errors were encountered: