Closed kavimuru closed 5 months ago
Triggered auto assignment to @mallenexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)The emoji header does not fully extend to the right.
Some emojis are wider than the 12.5% width that is allocated to them, causing an overflow. The header has a padding-right applied to it, causing a gap that allows these extra wide emojis to get in-between.
There are two options:
View
component that contains the emojis.Fixed result:
https://github.com/Expensify/App/assets/137707942/70682fdb-dcd7-49ac-ab03-9a3178c01646
Alternative 1: Hiding the overflow (or specifically overflow on x-axis) of the emojis to ensure that extra wide emojis are contained. Alternative 2: Allocate the appropriate width for each emoji, however this will cause misalignment problems (the emojis are displayed in a fixed cell-width grid for neat alignment).
📣 @samh-nl! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: h.sam.lw@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~016c982fe69f86aff8
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
@mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@mallenexpensify Eep! 4 days overdue now. Issues have feelings too...
@aman-atg unable to reproduce in Chrome or Safari, should I be doing something differently?
Safari
https://github.com/Expensify/App/assets/22508304/ed7cfe12-80bb-4c68-bf87-85a8001a819c
Chrome
https://github.com/Expensify/App/assets/22508304/253f73b2-c846-44ef-aa09-4d0b7313454f
@aman-atg unable to reproduce in Chrome or Safari, should I be doing something differently?
Same situation for me in mac, but I can reproduce it on Linux (Chrome).
Kicking the can a bit here as it's not high value, will attempt to test again via browserstack later this week. Thanks for the update/reply @aman-atg
This issue is reproducible on Windows too, just wanted to point out as it might aid in testing.
Having issues access windows web via browserstack, asked internally about it here
@mallenexpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Job added to Upwork: https://www.upwork.com/jobs/~013bc36e1574b8dee0
Current assignee @mallenexpensify is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (External
)
Was able to reproduce via Windows on Browserstack. Low value but reckon we should fix.
The emoji header is not taking full width in Emoji picker
This issue looks like happens only on Windows. The first reason for this issue is the windows scrollbar. On Mac, scrollbar doesn't affect the element size, but this is not the case on Windows. See below image.
Emoji picker modal has 320px width and 16px padding, so the content width is 288px, but it is really 271px because of the scrollbar(width 17px) on Windows.
The 2nd reason is that the emoji width is different. Each emoji box is 12.5% wide of the parent element, but emoji can overflow this width as you can see below.
That's why, emoji row can exceed the width(100%) and overflow under the header bar. This is the root cause
This is a windows specific issue and I think we need to have a solution for windows platform(Windows specific code may be needed)
Set the emojiHeaderContainer
style here
width: 288;
Platforms other than Windows
has this value already, but Windows
has smaller value because of scrollbar. Setting this has no impact on other platforms
Update the EmojiPickerMenuItem component
Introduce a new state scale
and new member function onLayout
this.state = {
scale: getOperatingSystem() === CONST.OS.WINDOWS ? 0 : 1,
};
this.onLayout = this.onLayout.bind(this);
onLayout(event) {
const width = event.nativeEvent.layout.width;
if (width < 36) {
this.setState({scale: 1});
} else {
this.setState({scale: 36 / width});
}
}
{(this.state.scale) ? (
<View style={[styles.flexRow, styles.justifyContentCenter, styles.alignItemsCenter]}>
<Text style={[styles.emojiText, {transform: `scale(${this.state.scale}, 1)`}]}>{this.props.emoji}</Text>
</View>
) : (
<Text style={[styles.emojiText, styles.hiddenElementOutsideOfWindow]} onLayout={this.onLayout}>{this.props.emoji}</Text>
)}
Please check the screenshot
Current | Updated |
---|---|
![image](https://github.com/Expensify/App/assets/126839717/63d81009-3686-47c8-afc0-eba063b1fe1d) | ![image](https://github.com/Expensify/App/assets/126839717/67b67c3c-2686-4c2d-a822-63594f711646) |
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:
No space should be visible on the right side of the emoji header.
Actual Result:
Some space is visible on the right side.
Deliverable:
Update the emoji font library for Windows
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.34-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: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/43996225/e8d5a2d1-10c2-4519-be84-6194ac481ddb
https://github.com/Expensify/App/assets/43996225/b9bfe429-54fb-4121-a783-903772daf142
Expensify/Expensify Issue URL: Issue reported by: @aman-atg Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1687788512893349
View all open jobs on GitHub
Upwork Automation - Do Not Edit