Skip to content

Conversation

@war-in
Copy link
Collaborator

@war-in war-in commented Aug 13, 2025

Details

This PR adds support for borderRadius prop in mentions styles on iOS & Android

image

Related Issues

Expensify/App#19299

Manual Tests

iOS & Android:

  1. Verify if singleline mentions have rounded edges
  2. Verify if multiline mentions have rounded edges only at the beginning and the end
  3. Verify mentions work correctly in blockquotes

Linked PRs

@war-in war-in changed the title Add mention-user border radius [iOS] Add mention-user border radius Aug 13, 2025
@war-in war-in changed the title [iOS] Add mention-user border radius [iOS] Enable borderRadius in all mention types Aug 14, 2025
Comment on lines 114 to 120
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);
Copy link
Collaborator

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?

Copy link
Collaborator Author

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

@war-in war-in requested a review from tomekzaw August 19, 2025 14:49
@war-in war-in changed the title [iOS] Enable borderRadius in all mention types [iOS & Android] Enable borderRadius in all mention types Aug 20, 2025
@war-in war-in marked this pull request as ready for review August 20, 2025 14:48
@war-in war-in requested a review from jmusial August 21, 2025 10:24
@war-in
Copy link
Collaborator Author

war-in commented Aug 22, 2025

I fixed last known iOS issue in this commit - 28b6a13

Before
image

After
image

@war-in war-in requested a review from tomekzaw August 22, 2025 09:33
Copy link
Collaborator

@jmusial jmusial left a 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

  1. android, switching to single line breaks highlights :(
Screen.Recording.2025-08-22.at.13.04.20.mov
  1. android, Cursor not visible when within codeblock or mention
Screen.Recording.2025-08-22.at.13.08.38.mov

@jmusial
Copy link
Collaborator

jmusial commented Aug 22, 2025

Very much a nitpick, but when having a multiline mention starting bottom border radius and finish top, should not apply. Same issue for web

image

@jmusial
Copy link
Collaborator

jmusial commented Aug 22, 2025

Na ios dzieją się rzeczy niestworzone :( Ale to też single - line

to jest 17.5, nie wiem czy to ma znaczenie

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-08-22.at.14.34.03.mp4

@war-in
Copy link
Collaborator Author

war-in commented Aug 26, 2025

Very much a nitpick, but when having a multiline mention starting bottom border radius and finish top, should not apply. Same issue for web

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!

@war-in
Copy link
Collaborator Author

war-in commented Aug 26, 2025

  1. android, switching to single line breaks highlights :(

@jmusial should be fixed with the latest commit 🎉 98dafda

  1. android, Cursor not visible when within codeblock or mention

this is expected behaviour. We discussed it with the design team and there is no plan to support it in the near future

@war-in
Copy link
Collaborator Author

war-in commented Nov 14, 2025

@parasharrajat kind bump :)

mentionHere: {
color: 'green',
backgroundColor: 'lime',
borderRadius: 5,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be 4px as per design system.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're using different values here on purpose. For instance, we also have background color lime and foreground color green. That's because they need to be set on the E/App side.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense. I didn't notice that it is a different repo. 😄

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parasharrajat so are we ready for the ✅? 👀

@war-in
Copy link
Collaborator Author

war-in commented Nov 28, 2025

@parasharrajat can we get a final ✅? All comments have been answered!

@parasharrajat
Copy link
Member

BUG: Android: Cursor shows behind the background.

02.12.2025_19.26.11_REC.mp4

@parasharrajat
Copy link
Member

parasharrajat commented Dec 2, 2025

How do I build iOS build locally?

"@expensify/react-native-live-markdown": "git://github.com/Expensify/react-native-live-markdown#eb521b53582165d532918ca64b859210dc92bf09",

I installed the latest commit for this package on NewDot repo, and it worked for Android. But for iOS, the app is downloading the app from the remote cache.

@war-in
Copy link
Collaborator Author

war-in commented Dec 3, 2025

BUG: Android: Cursor shows behind the background

We know about the issue and already reported it. It was put on hold at the time but we could revisit this idea in another issue/thread.
Marking as unrelated for now!

@war-in
Copy link
Collaborator Author

war-in commented Dec 3, 2025

But for iOS, the app is downloading the app from the remote cache.

@parasharrajat I'd probably remove the GITHUB_TOKEN entry from my .env to achieve that. This should be the easiest way to disable remote builds

@parasharrajat
Copy link
Member

parasharrajat commented Dec 3, 2025

Nice idea. I will try that. Won't work

Now the builds are coming from S3.

@war-in
Copy link
Collaborator Author

war-in commented Dec 3, 2025

Ok, so another quick one - I'd add a dummy log to some android iOS file to change the fingerprint. That should work

@parasharrajat
Copy link
Member

iOS looks good.

@parasharrajat
Copy link
Member

parasharrajat commented Dec 3, 2025

@war-in So we are not targeting this #720 (comment) here in this PR. Do we have approval for this from internal team?

@puneetlath What do you say?

@parasharrajat
Copy link
Member

parasharrajat commented Dec 3, 2025

Screenshots

🔲 iOS / native

03.12.2025_16.07.26_REC.mp4

🔲 MacOS / Chrome

image

🔲 Android / native

03.12.2025_17.26.54_REC.mp4

@war-in
Copy link
Collaborator Author

war-in commented Dec 3, 2025

@war-in So we are not targeting this #720 (comment) here in this PR. Do we have approval for this from internal team?

Do we have approval for this

@parasharrajat which this are you referring to here? approval for not including the fix in this PR or approval for handling this in another issue?

@parasharrajat
Copy link
Member

approval for not including the fix in this PR or approval for handling this in another issue?

Both are the same. We will have to fix that. The question is where. This Pr or another issue.

So we need to clarify that first before moving forward.

@puneetlath
Copy link

Sorry, the Slack link above doesn't work for me. Is that a bug this PR introduces? Or it already exists?

@war-in
Copy link
Collaborator Author

war-in commented Dec 4, 2025

introduced by this.

@parasharrajat No, it's not. I downloaded the prod version from google play and this is how it behaves right now (see not-rounded corners)
So this behaviour is not introduced by this PR

Screen_Recording_20251204_111617_Expensify.mp4

cc @puneetlath (you can enter the slack link by copying it and pasting in a slack conversation e.g. self dm)

@parasharrajat
Copy link
Member

Ah, I see. Thanks for correcting me. Then we are fine with this PR.

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎀 👀 🎀 C+ reviewed

@puneetlath puneetlath merged commit 6e84c21 into Expensify:main Dec 4, 2025
10 checks passed
@os-botify
Copy link
Contributor

os-botify bot commented Dec 4, 2025

🚀 Published to npm in 0.1.317 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants