-
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
fix: offline deleted heading styles and link padding #19545
Changes from 4 commits
f1b3f25
0519582
43ae959
79a9cd5
69dc50a
8df3eea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
import styles from '../../../styles/styles'; | ||
|
||
export default { | ||
// For web platform default to block display. Using flex on root view will force all | ||
// child elements to be block elements even when they have display inline added to them. | ||
// This will affect elements like <a> which are inline by default. | ||
style: [styles.dBlock, styles.userSelectText], | ||
style: [styles.userSelectText], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see we are reverting to this change. But where are we fixing the original issue the change was fixing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By passing the |
||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why we added this? Removing this it fixes this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is caused by this line but reverting it is not the solution because we were adding the pointer cursor not to the link but to its parent which showed the pointer at places around the link -
Screen.Recording.2023-06-13.at.9.46.29.PM.mov
The root cause for this issue is that for some reasons links like
https://staging.new.expensify.com/random_text_here
are rendered indiv
rather thana
which is wrong.Screen.Recording.2023-06-13.at.9.48.01.PM.mov
So, we need to figure out why links are rendered in
div
and change it toa
to fix it the right way.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Internal links need special handling before opening them then they are opened via
onPress
handlers. We don't want them to open immediately so a tag is disabled on them. Only whenhref
is passed AnchorRenderer are rendered asa
. THis was the issue I was mentioning #19545 (comment) when I said that this will not work for the #16526. For the same reason, I didn't select a cursor-based solution on that solution. You can see that it is presented as a proposal on that.Unfortunately, this didn't come to my mind before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for weighing in @parasharrajat. I think helps us further to figure out a fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mollfpr @cristipaval This PR was reverted because of the special handling of internal links explained by @parasharrajat above.
I found a solution -
basically for internal links since they are rendered as
div
we can explicitly setcursor
topointer
on line 71. For normal links it is added by default so the only behaviour we are changing is for internal links by adding pointer cursor -(Text below uses
div
for internal links anda
for other/normal links)App/src/components/AnchorForCommentsOnly/BaseAnchorForCommentsOnly.js
Lines 68 to 71 in 6e8435e
Need to change line 71 to -
This would solve all the related issues without regression. I tested on local all issues that were related to my issue like #18658, #17488, #16526, are fixed.
Result -
Screen.Recording.2023-06-13.at.11.01.48.PM.mov