-
Notifications
You must be signed in to change notification settings - Fork 3k
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 2024-04-15] [$500] iOS - Chat - Strikethrough not applied for multiline hyperlinks deleted offline #38680
Comments
Triggered auto assignment to @puneetlath ( |
@puneetlath FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
We think that this bug might be related to #vip-vsp |
ProposalPlease re-state the problem that we are trying to solve in this issue.The strikethrough/deleted styles aren't applied to multi-line links when deleting it while offline. What is the root cause of that problem?When we have a single line link, the anchor renderer will have 1 text as the child that contains the link text. It gets the style from the parent.
There are 2 styles that affect it, But for multi-line links, there are multiple children (MemoizedTNodeRenderer) of the component. If we have a multi-line link like this:
then the children will be 3: The parent text contains the strikethrough style that I explained above, but each child here also contains the anchor tag style. Based on this upstream issue, it's not possible to have both line-through and underline styles, that's why for multi-line links, we see the underline styles. What changes do you think we should make in order to solve the problem?We can render the children for a multi-line link by ourselves by using
and to have both underline and strikethrough, we can use const hasStrikethroughStyle = 'textDecorationLine' in parentStyle && parentStyle.textDecorationLine === 'line-through';
const textDecorationLineStyle = hasStrikethroughStyle ? {textDecorationLine: 'underline line-through'} : {};
return (
<AnchorForCommentsOnly ...
// add textDecorationLineStyle here
style={[style, parentStyle, textDecorationLineStyle, styles.textUnderlinePositionUnder, styles.textDecorationSkipInkNone]}
>
<TNodeChildrenRenderer
tnode={tnode}
// renderChild is only called for multi-line link
renderChild={(props) => {
if (props.childTnode.tagName === 'br') {
return <Text>{'\n'}</Text>
}
if (props.childTnode.type === 'text') {
// and here
return <Text style={[props.childTnode.getNativeStyles(), parentStyle, textDecorationLineStyle, styles.textUnderlinePositionUnder, styles.textDecorationSkipInkNone]}>{props.childTnode.data}</Text>
}
return props.childElement;
}}
/>
</AnchorForCommentsOnly>
); we can further improve this if there is any missing style |
Job added to Upwork: https://www.upwork.com/jobs/~01ef21d15df0bfd5a6 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr ( |
@bernhardoj The result on Android is missing the underline, is this expected? |
Oh, you're right, that's because the
|
As mentioned in my proposal, it's an upstream issue for iOS, that's why I propose it to customize the children renderer so we prioritize the strikethrough style. It also happens for a single line without my solution. |
There is an option to use both though based on React native docs. I will play around and see whether it works for react-native-render-html. |
The proposal from @bernhardoj looks good to me! 🎀 👀 🎀 C+ reviewed! |
Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
Sounds good to me. |
📣 @mollfpr 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @bernhardoj 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR is ready cc: @mollfpr |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-04-15. 🎊 For reference, here are some details about the assignees on this 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:
|
@mollfpr bump on the checklist. And on accepting the Upwork offer. @bernhardoj has been paid. |
@puneetlath I'll do manual request in NewDot, could you create the payment summary? Thank you!
No offending PR.
The regression step should be enough.
|
Regression test issue here: https://github.com/Expensify/Expensify/issues/388565 Payment summary:
Thanks everyone! |
$500 approved for @mollfpr |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.55-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4441552
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
The message should be grayed out with strikethrough formatting applied to indicate that the deletion is pending
Actual Result:
The message is grayed out but the strikethrough is not applied
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6420587_1710946305742.SUGF1463.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: