You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-08-07] [$1000] Chat - Word that follows after the multiline hyperlink is located between multiline hyperlink #22362
If we remove PressableWithSecondaryInteraction, the problem will be gone. Why? Let's take a look at an example
[Multi
link](google.com) test
This text will render this HTML:
The link itself is wrapped with 2 div, while the text test is the span at the bottom. The 2 div comes from PressableWithSecondaryInteraction. PressableWithSecondaryInteraction uses PressableWithFeedback which is composed of OpactiyView (1st div) and GenericPressable (2nd div).
The problem is, the style is only applied to GenericPressable, which is the 2nd div. The 1st div (OpacityView) somehow has an inline-flex style (if we remove the inline props, both div will have inline-flex display).
What changes do you think we should make in order to solve the problem?
To apply the inline style to the 1st div (OpacityView), we should also set the style to wrapperStyle.
changed the title [-]Chat - Word that follows after the multiline hyperlink is located between multiline hyperlink[/-][+][$1000] Chat - Word that follows after the multiline hyperlink is located between multiline hyperlink[/+]on Jul 10, 2023
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:
[@aimane-chnaif] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
[@aimane-chnaif] Determine if we should create a regression test for this bug.
[@aimane-chnaif] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
As this came from pressable migration refactor, I don't think regression test is needed
Activity
melvin-bot commentedon Jul 6, 2023
Triggered auto assignment to @MitchExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jul 6, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)bernhardoj commentedon Jul 7, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Currently, having a multiline link and text next to it will show the text at the first line of the link. This only happen in Web/Desktop.
What is the root cause of that problem?
The link rendered in the chat is a BaseAnchorForCommentsOnly component which wraps the anchor text with PressableWithSecondaryInteraction.
App/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js
Lines 56 to 91 in bf94b78
If we remove PressableWithSecondaryInteraction, the problem will be gone. Why? Let's take a look at an example
This text will render this HTML:

The link itself is wrapped with 2 div, while the text
testis thespanat the bottom. The 2 div comes from PressableWithSecondaryInteraction. PressableWithSecondaryInteraction uses PressableWithFeedback which is composed of OpactiyView (1st div) and GenericPressable (2nd div).App/src/components/Pressable/PressableWithFeedback.js
Lines 48 to 53 in bf94b78
div will have a block display by default, but actually, we already apply an
inlineprops to PressableWithSecondaryInteraction.App/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js
Lines 56 to 57 in bf94b78
inlineprops will set the display inline style to PressableWithFeedback.App/src/components/PressableWithSecondaryInteraction/index.js
Line 89 in bf94b78
The problem is, the style is only applied to GenericPressable, which is the 2nd div. The 1st div (OpacityView) somehow has an
inline-flexstyle (if we remove theinlineprops, both div will haveinline-flexdisplay).What changes do you think we should make in order to solve the problem?
To apply the inline style to the 1st div (OpacityView), we should also set the style to
wrapperStyle.App/src/components/PressableWithSecondaryInteraction/index.js
Lines 79 to 80 in bf94b78
MitchExpensify commentedon Jul 10, 2023
Reproduced and do not see a dupe of this
[-]Chat - Word that follows after the multiline hyperlink is located between multiline hyperlink[/-][+][$1000] Chat - Word that follows after the multiline hyperlink is located between multiline hyperlink[/+]melvin-bot commentedon Jul 10, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01ad0d167a3f25ee3b
melvin-bot commentedon Jul 10, 2023
Current assignee @MitchExpensify is eligible for the External assigner, not assigning anyone new.
41 remaining items
techievivek commentedon Aug 7, 2023
Not overdue, waiting for the payment. @aimane-chnaif can you please fill the BZ steps, thanks.
MitchExpensify commentedon Aug 7, 2023
Paid @aimane-chnaif
Just waiting on @bernhardoj to accept the offer to close this one out post payment
bernhardoj commentedon Aug 7, 2023
@MitchExpensify Accepted
MitchExpensify commentedon Aug 7, 2023
Thanks, Paid! Just waiting on Upwork to stop being buggy so I can end the contract.
Reminder on the BZ steps here @aimane-chnaif
MitchExpensify commentedon Aug 9, 2023
Contracts ended! Friendly bump on the BZ steps #22362 (comment) @aimane-chnaif - Thanks! Lets get this closed out
aimane-chnaif commentedon Aug 13, 2023
As this came from pressable migration refactor, I don't think regression test is needed
MitchExpensify commentedon Aug 13, 2023
Awesome, thanks @aimane-chnaif