-
Notifications
You must be signed in to change notification settings - Fork 94
[iOS & Android] Enable borderRadius in all mention types #720
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
base: main
Are you sure you want to change the base?
[iOS & Android] Enable borderRadius in all mention types #720
Conversation
…s to all mentions
apple/MarkdownTextLayoutFragment.mm
Outdated
CGFloat marginLeft = _markdownUtils.markdownStyle.blockquoteMarginLeft; | ||
CGFloat borderWidth = _markdownUtils.markdownStyle.blockquoteBorderWidth; | ||
CGFloat paddingLeft = _markdownUtils.markdownStyle.blockquotePaddingLeft; | ||
CGFloat shift = marginLeft + borderWidth + paddingLeft; | ||
|
||
fragmentTextBounds.origin.x -= (paddingLeft + borderWidth) + shift * ([_depth unsignedIntValue] - 1); | ||
fragmentTextBounds.size.width = borderWidth + shift * ([_depth unsignedIntValue] - 1); |
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.
Looks like the blockquote logic is now duplicated, can we somehow dedupe it?
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.
It was already :/
I could create a helper function to get the shift to make it look better but the logic would stay unchanged
I think we need it to be that way because boundingRect is also used in renderingSurfaceBounds
…e` to a separate file
android/src/main/java/com/expensify/livemarkdown/spans/MarkdownBackgroundSpan.java
Outdated
Show resolved
Hide resolved
I fixed last known iOS issue in this commit - 28b6a13 |
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.
Dunno if those are connected to this PR, or just existing bugs. In all cases, it's just on mobile devices
- android, switching to single line breaks highlights :(
Screen.Recording.2025-08-22.at.13.04.20.mov
- android, Cursor not visible when within
codeblock
ormention
Screen.Recording.2025-08-22.at.13.08.38.mov
mentionHere: { | ||
color: 'green', | ||
backgroundColor: 'lime', | ||
borderRadius: 5, |
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.
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.
Yeah, saw that too. Not sure why the same radius is smaller on Android 🤔
@tomekzaw any ideas?
Na ios dzieją się rzeczy niestworzone :( Ale to też single - line to jest Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-08-22.at.14.34.03.mp4 |
We can try to fix it in a separate PR but I think we need to consult with the design team. I'll leave it as an open idea because it's not in the scope of this PR Thanks for noticing! |
For the context, this was discussed on Slack: https://swmansion.slack.com/archives/C01GTK53T8Q/p1755699466781499 |
Details
This PR adds support for
borderRadius
prop in mentions styles on iOS & AndroidRelated Issues
Expensify/App#19299
Manual Tests
iOS & Android:
Linked PRs