Closed kavimuru closed 1 year ago
Triggered auto assignment to @sakluger (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are ✅)Asked a few clarifying questions in the Slack thread
@sakluger Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Confirmed in Slack that this is only happening in the Android app for this specific download link, so it's a pretty specific but that likely won't occur often. But it's possible that it affects other scenarios, so I think we should fix it.
Job added to Upwork: https://www.upwork.com/jobs/~01e4f40b6933ecb982
Current assignee @sakluger is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (External
)
@sakluger, @abdulrahuman5196 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Huh, no proposals at all! Let's give it another week and see if we get any proposals at this price.
Still waiting for proposals.
Quoting macOS Download Link with text will result in unexpected behaviour
The issue seems specific to android and how react-native-render-html
renders html & this is caused by applying flex-start
to every View component used in custom renderer.
flex-start
is used.We can just remove styles.alignItemsStart
from here & it will solve the problem. We can check if it has any effect on other elements and safely remove if no side effect found.
Sometimes the clipping happens because of the difference between device font and font used in the code and this only happens in android so we can use device default font to solve this.
This solution essentially serves as a patch to handle a specific problem in a controlled manner. It's about ensuring that problematic devices use device default font that doesn't lead to clipping in React Native.
export default function enableAndroidFontFix() {
if (Platform.OS !== 'android') {
return;
}
const styles = StyleSheet.create({
androidFontFixFontFamily: {
fontFamily: fontFamily.SYSTEM,
},
});
const oldRender = Text.render;
Text.render = function (...args) {
const origin = oldRender.call(this, ...args);
return React.cloneElement(origin, {
style: [styles.androidFontFixFontFamily, origin.props.style],
});
};
}
https://github.com/Expensify/App/assets/85894871/c083b594-e424-4393-ab70-58f763421540
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
📣 @alex2bc! 📣 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 stored successfully. Thank you for contributing to Expensify!
@sakluger, this issue also occurs on other links and it also occurs without blockquote.
https://github.com/Expensify/App/assets/85894871/91b9ae1f-cafe-4f05-a313-9a6cb5d07689
@sakluger @abdulrahuman5196 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!
this issue also occurs on other links and it also occurs without blockquote.
@Krishna2323 thanks, that's helpful! Were you able to determine why it happens for some links but not others?
@abdulrahuman5196, mind taking a look at the two proposals we received?
@sakluger, the text clipping only happens in android native and the issue is related to custom renderers used in the code.
I observed this issue occurs when a link is broken into multiple line and the last link line has just enough space for the text.
Updated proposal to include fix of 2 found issues
@alex2bc, the margin on the right isn't causing the bug.
@Krishna2323, it is an issue and causing inconsistent rendering of html blockquote
element compared to other messages. Due to that blockquote
link is shrank.
@alex2bc, I mean it can be an issue but it's not related to clipping of text.
@Krishna2323 yeap, I agree
Quoting macOS Download Link with text will result in unexpected behaviour
dude to android textbreakstrategy its breaking ex: here and here
const defaultTextProps = useMemo(() => ({selectable: props.textSelectable, allowFontScaling: false, textBreakStrategy: "simple", }), [props.textSelectable]);
pass textBreakStrategy: "simple",
Result:
@abdulrahuman5196 can you take a look at the proposals we've received so far? If you already have a full plate, I'm happy to reassign.
I am reviewing all my pending items this weekend. Will close review on this as well
I am not sure what is the issue here, for me it seems to be working fine. Anything I am missing here. @sakluger
https://github.com/Expensify/App/assets/46707890/e6d786d6-24e5-4efa-b9fc-44483a8359a9
@abdulrahuman5196, your emulator screen width is enough for this specific link, try increasing the link like I did here.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Issue not reproducible during KI retests. (First week)
Looks like this is not longer reproduceable, I'm going to close the issue. Feel free to comment on the original thread if you're able to reproduce on the latest build.
@sakluger, can we reopen this, I'm still able to reproduce it on my physical device. Version: 1.3.55-8
Opening this back up because several contributors were able to reproduce on the latest build.
@sakluger can you review my proposal https://github.com/Expensify/App/issues/23672#issuecomment-1673491181 and here i am attaching the reference ticket https://github.com/meliorence/react-native-render-html/issues/360#issuecomment-761612982
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@sakluger, @abdulrahuman5196 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
I will try to repro the issue again and update here
@pradeepmdk I cannot review proposals as I am not an engineer. I'm mainly here to make sure the issue keeps moving forward :)
@abdulrahuman5196 any luck reproducing?
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@Krishna2323 can you write out the reproduction steps? Especially if they're different than the original steps, I want to make sure that @abdulrahuman5196 can also reproduce.
@sakluger, these Steps is enough to reproduce it, I can easily reproduce it on my physical device and pixel 3a simulator.
@abdulrahuman5196, we can update flex-start
to flex-stretch
because if we don't do it, we will face other issues as well.
Issue: If we set flex-start
to all containers, then we can't select all text by clicking on empty spaces.
https://github.com/Expensify/App/assets/85894871/6cc54745-e98a-4308-879c-e39a0f0a7a5b
Oh ok got it. I was able to reproduce by following this https://github.com/Expensify/App/issues/23672#issuecomment-1672307199.
It is a very strange issue. Could you kindly add this information to the OP description @sakluger
And @Krishna2323 Kindly add all the information in your original proposal https://github.com/Expensify/App/issues/23672#issuecomment-1668714244 and mentioning Updated proposal
in comment as per our guidelines should be enough. It will be easier to manage and to make sure we don't miss anything.
@abdulrahuman5196, I already have that in my proposal, I just wanted to tell that it also solves other issues as well.
@Krishna2323 's proposal (solution 1) here https://github.com/Expensify/App/issues/23672#issuecomment-1668714244 and @pradeepmdk 's proposal here https://github.com/Expensify/App/issues/23672#issuecomment-1673491181 is both working well.
But I not convinced on the root cause provided. @Krishna2323 , @pradeepmdk Could you kindly add more information or references on why this issue is coming? Is it due to bug in react-native-render-html
or some other bug? Do we have any open GH against the repo or the RN repo?
@abdulrahuman5196, this is a react-native bug, nothing to do with react-native-render-html .
@abdulrahuman5196, Setting textBreakStrategy to simple on the Text element seems to work for some devices like Samsung galaxy s10, Google Pixel but it will not work on all devices, many users still face text clip issue, specially on some devices like Oppo, OnePlus and more.
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:
> https://new.expensify.com/NewExpensify.dmg test
Expected Result:
All characters should be visible
Actual Result:
The end characters will not be visible
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.46-5 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/7330f977-7909-4029-be8c-4e1f14569fe1
Expensify/Expensify Issue URL: Issue reported by: @daraksha-dk Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690296200318199
View all open jobs on GitHub
Upwork Automation - Do Not Edit