Closed kavimuru closed 1 year ago
Triggered auto assignment to @muttmuure (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)Emoji is not in center of reaction button
if the fontSize is 15, the actual lineHeight of emoji is 20. But we're setting the lineHeight is 24 if the fontSize is 17, the actual lineHeight of emoji is 24. But we're setting the lineHeight is 28
=> That makes the emoji is not in center
update the lineHeight of emoji accordingly:
if the fontSize is 15, set the lineHeight of emoji is 20. if the fontSize is 17, set the lineHeight of emoji is 24.
we also add paddingVertical: 2 to keep the size is the same as before
function getEmojiReactionBubbleTextStyle(isContextMenu = false) {
if (isContextMenu) {
return {
fontSize: 17,
lineHeight: 24,
paddingVertical: 2,
};
}
return {
fontSize: 15,
lineHeight: 20,
paddingVertical: 2,
};
}
IOS:
https://github.com/Expensify/App/assets/113963320/46aac979-1511-4db4-9c73-602d7d7a4079
Web:
Job added to Upwork: https://www.upwork.com/jobs/~01d57ef93d5d7af14e
Current assignee @muttmuure is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External
)
Triggered auto assignment to @grgia (External
), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@tienifr, your solution didn't work for me. After changing the line height -
Emojis inside the reaction buttons appear far down
textAlignVertical
is only for android. We are trying to vertically center the emoticon by using lineHeight, but its behavior is not working as expected. There is slightly far down.
We can add height to the emoji container.
I've experimented with some numbers and found that to keep the current height we can add:
height
height
and change line height to:lineHeight
lineHeight
We change this code https://github.com/Expensify/App/blob/dd5fbb6d12e5daa66458b3db07f0ea88dbc4d449/src/styles/StyleUtils.js#L1004-L1042
To:
function getEmojiReactionBubbleStyle(isHovered, hasUserReacted, isContextMenu = false) {
let backgroundColor = themeColors.border;
if (isHovered) {
backgroundColor = themeColors.buttonHoveredBG;
}
if (hasUserReacted) {
backgroundColor = themeColors.reactionActiveBackground;
}
if (isContextMenu) {
return {
paddingVertical: 3,
paddingHorizontal: 12,
backgroundColor,
height: 32,
};
}
return {
paddingVertical: 2,
paddingHorizontal: 8,
backgroundColor,
height: 28,
};
}
function getEmojiReactionBubbleTextStyle(isContextMenu = false) {
if (isContextMenu) {
return {
fontSize: 17,
lineHeight: 25,
};
}
return {
fontSize: 15,
lineHeight: 23,
};
}
I can see significant differences only on iOS, so we can make iOS-specific styling to adjust the slight difference.
Since the iOS-specific code is minor, I'd prefer not to make another wrapper.
We change this code https://github.com/Expensify/App/blob/dd5fbb6d12e5daa66458b3db07f0ea88dbc4d449/src/styles/StyleUtils.js#L1030-L1042
To
function getEmojiReactionBubbleTextStyle(isContextMenu = false, isIos = false) {
if (isContextMenu) {
return {
fontSize: 17,
lineHeight: 28,
marginTop: isIos ? -2 : null,
};
}
return {
fontSize: 15,
lineHeight: 24,
marginTop: isIos ? -2 : null,
};
}
We can use iOS specific wrapper if required or use padding-bottom instead of marginTop, but it will make the bubble a little bit bigger
@wildan-m, it's not an iOS specific bug and the solution doesn't look good to me.
Maybe it's just my eyes, but I'm having trouble seeing the misalignment - the emojis look fairly properly aligned, at least on desktop and web.
Are you guys just eyeballing it or using the inspector?
Furthermore, the emojis come in different shapes, so I feel some are bound to look misaligned because the center used is not the visual center.
Here's an image to demonstrate.
The triangle on the left is perfectly aligned on both the vertical and horizontal axis, but it doesn't appear that way because its aligned about the blue dotted square's center. This is how software usually centrally positions elements.
The triangle on the right is positioned about the triangle's center, so it looks optically aligned.
@Victor-Nyagudi it seems to be a vertical misalignment rather than horizontal
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
still waiting for proposals
@grgia @muttmuure @thesahindia this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Still waiting on proposals, I'm going to check on the spacing on native/ios myself
I'm currently investigating this issue, and I'm only seeing the emojis being misaligned vertically on iOS native, particularly the round emotion faces i.e. 😃, 🤓, ☹️.
Take a look at these screenshots I took.
I tried to pick an emoji from each category i.e. smileys & people, animals & nature, food & drink, etc. with varying shapes and sizes for as much variation as possible.
If you don't mind me asking, @thesahindia, how did you measure the alignment or misalignment on the other non-iOS platforms? Those look fine to me.
For anyone who's nit-picky, you'll notice the French flag emoji 🇫🇷 is about 2-3 pixels above the 1
on iOS Web and Mac Chrome.
The red triangle 🔻doesn't appear perfectly aligned on some platforms, which could be explained by what I said in an earlier comment (the triangle is just flipped this time, but the same principle applies).
I think we should confirm first if this is an iOS-native-only bug before proceeding, lest we end up trying to fix places that were never broken in the first place.
We could always start a conversation in Slack to get some more eyes and feedback on this, @grgia.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@shawnborton need your 👀 on this one- could you take a look at the screenshots in this comment? https://github.com/Expensify/App/issues/18751#issuecomment-1562990170 is this a noticeable bug to you?
Hmm interesting, maybe this is okay now? Those screenshots look way better than what I originally reported (first comment).
But I just checked my physical device on the latest TestFlight on iOS and yeah, some emojis still feel way too far down than others. Thoughts?
I think the problem is only at native app. Here's screenshot -
But I just checked my physical device on the latest TestFlight on iOS and yeah, some emojis still feel way too far down than others. Thoughts?
Yes, the problem is still there.
@grgia @muttmuure @thesahindia this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
FWIW I honestly don't notice this at all now
@muttmuure try to use square emoji in the native iOS app. I can still reproduce it with the recent commit.
@thesahindia do you have any thoughts on @wildan-m's updated proposal?
The solution will work but I don't think it's a good solution. Also we don't have a good explanation about the root cause.
textAlignVertical is only for android. We are trying to vertically center the emoticon by using lineHeight, but its behavior is not working as expected. There is slightly far down.
@wildan-m, I removed textAlignVertical
and didn't see any difference on android. Can you please explain why there's a major difference in the alignment only at ios? Also instead of using lineHeight
can we use some other styles to keep it in the center?
@thesahindia great question, I agree the root cause might not be related to textAlignVertical
. I don't have the answer yet.
instead of using lineHeight can we use some other styles to keep it in the center?
Actually, we also use alignItems: 'center'
on the container to vertically center the text, but it also works for non-iOS platforms.
I'll let you know when I've found a better explanation for the root cause.
@grgia @muttmuure @thesahindia this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:
Thanks!
Current assignee @thesahindia is eligible for the Internal assigner, not assigning anyone new.
@thesahindia based on the current proposals, is there one we should move forward with or shall I take this internal myself?
is there one we should move forward with or shall I take this internal myself?
No don't have an acceptable proposal yet so yes you can take this.
@grgia I think you should go for it with this one.
Taking internal
Will try to knock this one out by next week
Did you get chance to work on this yet @grgia?
Bumping to daily to knock out this week
Is this issue still Open? Because if no one is working I can submit a proposal and start working (if assigned) asap.
@Vishrut19 @thesahindia I'm fairly swamped right now, I'm open to taking more proposals
@grgia, @muttmuure, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
I've hit my hours for this week, so I'm going to prioritize getting a PR up for this one on Monday.
@grgia, @muttmuure, @thesahindia Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
working on this
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.44-2 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-08-01. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
FWIW, I've seen that the current solution is to only adjust lineHeight.
Actually, reducing the line height will also narrow down the bubble height, especially in safari (macos). Is that expected?
https://github.com/Expensify/App/assets/11847279/ee80da3d-23e0-4d19-8e99-4b4c4ec9d00b
Not overdue, Bump on BZ checklist @thesahindia
It was an edge case and doesn't need a test case so we can skip the checklist
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Should be properly aligned in the center
Actual Result:
Appears closer to bottom of the bottom
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.12 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL: Issue reported by: @shawnborton Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1683717352716409
View all open jobs on GitHub
Upwork Automation - Do Not Edit