App
App copied to clipboard
[$2000] Android - Composer input overlaps with attachment separator
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
- Launch the app -> Login in account
- Navigate any chat conversation
- Notice composer input (from left side it overlaps)
Expected Result:
Composer input should not be overlaps with attachment separator
Actual Result:
Composer input overlaps with attachment separator
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [x] Android / native
- [ ] Android / Chrome
- [ ] iOS / native
- [ ] iOS / Safari
- [ ] MacOS / Chrome / Safari
- [ ] MacOS / Desktop
Version Number: 1.2.93-4 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: @dhairyasenjaliya Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1680359256103449
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~0160683cfa6e9f3593
- Upwork Job ID: 1643312444077060096
- Last Price Increase: 2023-04-11
Triggered auto assignment to @puneetlath (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Bug0 Triage Checklist (Main S/O)
- [ ] This "bug" occurs on a supported platform (ensure
Platformsin OP are ✅) - [ ] This bug is not a duplicate report (check E/App issues and #expensify-bugs)
- If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
- [ ] This bug is reproducible using the reproduction steps in the OP. S/O
- If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
- If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
- [ ] This issue is filled out as thoroughly and clearly as possible
- Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
- [ ] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
Wow @dhairyasenjaliya you've got some good eyes.
Job added to Upwork: https://www.upwork.com/jobs/~0160683cfa6e9f3593
Current assignee @puneetlath is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External)
Current assignee @puneetlath is eligible for the External assigner, not assigning anyone new.
Proposal
Please re-state the problem that we are trying to solve in this issue.
composer input overlaps with attachment separator in android
What is the root cause of that problem?
the root case is ButtonAttachment borderRightWidth: 1 shown blurry on some screen density.
react native use dp for dimensions and round it to px, so if value 1dp = 2.5 pixels, some devices show it blurely because physical screens have only a fixed number of pixels.
to know how many pixels in 1dp in any device use PixelRatio.get().
in my emulator 1dp = 2.5px so the last .5px show blurely.
and in the app the current style for footer is :

<ButtonAttachment style={{borderRightWidth: 1}} />
// view paddingVertical: 5, and no backgroundColor let border to show blurely
<View>
// Composer has backgroundColor: themeColors.componentBG
<Composer />
</View>
What changes do you think we should make in order to solve the problem?
apply the same background color for <Composer /> and <View> wrap it, or clear it from both, or set it in the wraper.
my sugguest is to add backgroundColor: themeColors.componentBG for the wraper <View> here.
and also if we found the ButtonAttachment borderRightWidth: 1 is very thin, we may increase it.
textInputComposeSpacing: {
paddingVertical: 5,
...flex.flexRow,
flex: 1,
backgroundColor: themeColors.componentBG,
},
What alternative solutions did you explore? (Optional)
Proposal
Please re-state the problem that we are trying to solve in this issue.
composer input overlaps with attachment separator in android
What is the root cause of that problem?
The root case may be the fixed width provided in the styling.
What changes do you think we should make in order to solve the problem?
the issue can be solved by not providing fixed width of composer and add a bit margin to it so it could have a safe space from separator and send button
Proposal
Please re-state the problem that we are trying to solve in this issue.
composer input overlaps with attachment separator in android
What is the root cause of that problem?
The root cause of this problem is styling.
What changes do you think we should make in order to solve the problem?
This issue can be fixed by adding min-width and max-width in the massage dialog div.
@ahmedGaber93 Thanks for the proposal. I'm not sure this is blur related. If you zoom the following screenshot https://user-images.githubusercontent.com/43996225/229310637-cf6becf7-ebc5-433f-9c6d-d73181242e12.png you will see that the separator is shown correctly on top and bottom parts and only the middle part where the input is rendered it's cut (overlapped).

@Mabroorkhan Thanks for the proposal. Your RCA is not clear, you need to pinpoint the exact root cause and not guess potential causes.
@UzairHKhan Thanks for the proposal. Your RCA is not clear, can you elaborate? And why this happens on Android only?
@s77rt some time it only happens in a single platform or in similar screen size phones and works fine in all others the main cause of these types of issues is the width of the boxes if it is taking the width more than it requires it will overlap or can displace another box the possible way to fix this is by adding
width: -webkit-fit-content;
width: -moz-fit-content;
width: fit-content;
This similar issue occurred in my previous work history and was happening only in iOS.
@UzairHKhan If that's the case then we need to figure out why the input is taking more space than it requires.
@s77rt I find the issue is due to flex: 4 1 0% in textArea styling which can be fixed byflex: 1 and margin: 0px 2px
@Mabroorkhan Thanks for checking. Can you elaborate why this happen only on Android?
@s77rt Yes I need to dive into the code to get more context on this possibly textarea has some width.
@s77rt Another possible way to fix the border issue is to make the textarea background transparent it won't affect the UI as div also have same bg color and if the text overlaps the border it will still be visible
@s77rt i think this overlaps not related with width of any View in the component, because i trying simple example in expo snack and the overlaps is exist.
simple example code.
import * as React from 'react';
import { View } from 'react-native';
export default function App() {
return (
<View style={{flex: 1, justifyContent: 'center', backgroundColor: "black"}}>
<View style={{
borderWidth : 1,
borderColor : "green",
borderRadius : 15,
overflow : 'hidden',
flexDirection: "row",
alignItems: "center",
}}>
<View style={{
height: 30,
width: 30,
backgroundColor: "black",
borderRightWidth: 1,
borderRightColor: "green"
}} />
<View style={{backgroundColor: "black", flex:1, height: 20, borderWidth: 0}} />
</View>
</View>
);
}
result.

you can try snack here but test it in a real device because i think emulators don't have the a real number of pixels. and also result may be diffrent depond on sceen density.
@UzairHKhan Thanks for the proposed fix but I think we are not looking for solutions at this point. It's important to understand the root cause first.
@ahmedGaber93 Thanks for checking that. So looks like the bug is in RN. Let's fix it on RN then.
@s77rt thanks for the feed back
@s77rt I think the bug is in android itself not react native, and setting the wrapper view background is the simple way to fix the UI issue.
@ahmedGaber93 Were you able to replicate the bug on Android (native code)?
@s77rt no i couldn't replicate the bug on android (native code).
Not overdue. Still waiting for proposals, so far the bug seems to exist on RN too and we are aiming to fix it on that level (assuming the bug is not originating from native Android SDK).
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Upwork job price has been updated to $2000
Still waiting on more proposals.