-
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
[Hold for payment 2021-07-13] Emojis - Emojis are cut on the sides in emoji picker #2662
Comments
Triggered auto assignment to @sophiepintoraetz ( |
Triggered auto assignment to @chiragsalian ( |
Issue reproducible during today's KI retests |
1 similar comment
Issue reproducible during today's KI retests |
Triggered auto assignment to @arielgreen ( |
@arielgreen can you post the issue on upwork for someone to suggest a proposal to tackle the problem. |
Proposal 📄Emojis are inappropriately cropped on the left-hand side
Investigation 🕵🏻♂️
Voila 🤟🏼 Approach 👨🏼💻File of concern :
emojiItem: {
width: '12.5%',
height: 40,
textAlign: 'center',
borderRadius: 8,
},
Best Practices 💃🏼
Testing Strategy 🧪
Expected Delivery Time 📦Approx 2-6 days. Previous Experience 🙅🏼♂️ |
Issue reproducible during today's KI retests |
cc @chiragsalian please review proposal above |
Hi @pranshuchittora, thank you for the analysis. You did suggest multiple solutions so I was wondering what solution were you going to go ahead with. For the solution you are going ahead with, can you explain your approach in a little more detail before I can approve it. I personally think the media queries route is fine since it looks like quite a rare device case. |
Also @isagoico can you share what android device you are testing on? It would be nice if @pranshuchittora can test against the same device on his emulator as well. |
The best approach would be to show 7 columns for small devices, again using the media query. |
Hi, @chiragsalian I am thinking of implementing an approach that consists of media queries to dynamically generate the I will start by figuring out some reasonable threshold like
Then the width will be calculated by Open Questions
|
@pranshuchittora Please apply on Upwork so I can send over the offer. |
Applied :) |
Excellent! Thanks for the quick turnaround. Just sent over an offer, @pranshuchittora. |
Issue reproducible today during KI retests |
@pranshuchittora any update on the PR to resolve this GH issue? |
Hi @chiragsalian
A workaround is to re-render the component which is expensive.
Another blocker is that there is a new API for listening for dimensions https://reactnative.dev/docs/usewindowdimensions. This is a react hook and can't be used in class components. Need your thoughts on all these 🤔 |
Hmm is it not possible to use |
@chiragsalian there's some bug in the implementation of flat list. What I did This is probably due to the headers being used in flatlist. We should use Setcion List instead .https://reactnative.dev/docs/sectionlist I am able to make this responsive thing work but this numColumns is breaking UI like this. IMO, Section List is the right component for this implementation. And we can even get rid of iffy code in renderItem. |
Issue reproducible today during KI retests |
Hmm so i believe @stitesExpensify originally wrote the emoji flatList. Stites could you share your thoughts on how we can dynamically change the number of columns depending on the width of the mobile device? Are you aware of a simple way to make this change using flatList or do you feel like we should change this to sectionList? I do think that sectionList than flatList sounds like a good change since it makes sense that the emoji's are pretty much sections. But that change also sounds like a slightly more involved change. I could be wrong but I feel like if we were to change this to sectionList then the data in our emoji.js would change quite a bit as well. |
We can't, at least not easily. I think that just changing the size of the emojis would be a better idea personally.
I don't think we need to dynamically change the width of each emoji, we can probably just make all emojis smaller right?
I had initially attempted to use sectionList because it does seem to fit our use case well, but there are features missing in the RN implementation that cause it to not work. Specifically that it doesn't have column support (you can only have one item per row), and the only things I could find online to fix it were hacks. |
What I use to do is render flat list inside section. Something like this
Will try with the width |
@chiragsalian making emojis smaller worked. But they look very small on the bigger viewport (like the browser). Should I implement the change in size proportional to the change in width? |
Sure but lets just keep two sizes i.e., the normal one we use now, and for a smaller width screen we change the emoji size to something smaller. Would that work? |
Issue reproducible today during KI retests |
Issue reproducible today during KI retests |
Issue reproducible during KI retests. |
Issue reproducible during KI retests. |
Reopening, will close again upon payment. |
Paid. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Expected Result:
Emojis are displayed without cropping
Actual Result:
Emojis are inappropriately cropped on the left-hand side
Action Performed:
Workaround:
No need, visual issue.
Platform:
Where is this issue occurring?
Web
iOS
Android ✔️
Desktop App
Mobile Web
Version Number:
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Expensify/Expensify Issue URL:
View all open jobs on Upwork
Job posting on Upwork: https://www.upwork.com/jobs/~015b529edefb069ef8
The text was updated successfully, but these errors were encountered: