Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.17k stars 2.66k forks source link

[$500] Android/iOS - Code blocks are overflowing the app border #27913

Open zanyrenney opened 10 months ago

zanyrenney commented 10 months ago

Issue is failing https://github.com/Expensify/App/pull/4624 (CC @parasharrajat)

Action Performed:

  1. Navigate to a conversation in iOS or Android
  2. Send a long message in a code block

Expected Result:

Code block should be displayed in the area of the conversation.

Actual Result:

Code block is partially visible because is overflowing the app border.

Platform:

Where is this issue occurring?

Version Number: 1.0.86-2

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ecab5a591272dd78
  • Upwork Job ID: 1602379910299570176
  • Last Price Increase: 2023-10-19
Issue OwnerCurrent Issue Owner: @puneetlath
melvin-bot[bot] commented 10 months ago

Current assignees @puneetlath and @zanyrenney are eligible for the Bug assigner, not assigning anyone new.

melvin-bot[bot] commented 10 months ago

Bug0 Triage Checklist (Main S/O)

zanyrenney commented 10 months ago

for @puneetlath @cubuspl42 - we discussed this in DM on Slack. Still going over some of the details and write up of payment details but creating this as a holding/tracking issue.

parasharrajat commented 10 months ago

@zanyrenney Shouldn't I be C+ here?

zanyrenney commented 10 months ago

Yep, i was going to assign you when we had all the details but happy to assign you now @parasharrajat

cubuspl42 commented 10 months ago

@puneetlath @zanyrenney Is there any way we could use the status that Expensify is an Incubating partner and Software Mansion is a Partner to get me added to as the Core Contributor, possibly bending the formal requirements?

I'll need to apply changes in low-lever parts of the framework (including ReactCommon, the C++ layer), so it would be awesome to be able to get some feedback and hints on the Core Contributor Discord server.

AndrewGable commented 10 months ago

Hey @cubuspl42 - I think you got great initial feedback by the discussions and proposals process which means you should proceed on creating a pull request and getting feedback there 👍

puneetlath commented 10 months ago

Going to make this a weekly as I think that's a more realistic cadence for us to expect updates on this.

puneetlath commented 10 months ago

At least until Melvin changes it to Daily again 😅

zanyrenney commented 10 months ago

That sounds good to me, thanks @puneetlath

parasharrajat commented 10 months ago

@cubuspl42 Please keep us posted here about new milestones.

cubuspl42 commented 10 months ago

The first PR is being reviewed, or at least is supposed to be. The part that I need to modify has been copy-pasted over 3 places for years, and I'm trying to clean that up before adding new features there.

cubuspl42 commented 9 months ago

There was some minor initial movement in the mentioned PR, but otherwise nothing for a week.

A cat picture from my private gallery didn't work.

This project will need several PRs, and this one was just moving things around to make the next steps possible.

@AndrewGable

melvin-bot[bot] commented 9 months ago

@puneetlath @cubuspl42 @parasharrajat @zanyrenney this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

zanyrenney commented 9 months ago

Thanks for the update @cubuspl42 - is there something specific you need from @AndrewGable? If it would help to take this issue to slack for a conversation, please feel free to do so and link in the relevant assignees.

cubuspl42 commented 9 months ago

We've GOT A RESPONSE

Party

melvin-bot[bot] commented 9 months ago

@puneetlath @cubuspl42 @parasharrajat @zanyrenney this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

zanyrenney commented 9 months ago

great work @cubuspl42 !!

melvin-bot[bot] commented 9 months ago

@puneetlath, @cubuspl42, @parasharrajat, @zanyrenney Whoops! This issue is 2 days overdue. Let's get this updated quick!

zanyrenney commented 9 months ago

Latest is in the issue linked above by @cubuspl42 but they got feedback from @mdvacca on the proposal and responded with more details.

Looks like that was today, and we're still waiting for further feedback / next steps from @mdvacca

thanks for pushing this forward @cubuspl42 !

melvin-bot[bot] commented 9 months ago

@puneetlath @cubuspl42 @parasharrajat @zanyrenney this issue is now 4 weeks old and preventing us from maintaining WAQ. This should now be your highest priority. Please post below what your plan is to get a PR in review ASAP. Thanks!

melvin-bot[bot] commented 9 months ago

Current assignees @cubuspl42 and @parasharrajat are eligible for the Internal assigner, not assigning anyone new.

zanyrenney commented 9 months ago

any further update here @cubuspl42 ?

cubuspl42 commented 9 months ago

I made a whole list of changes based on the feedback. I asked two questions and I'm waiting for a response. I'll bump.

zanyrenney commented 9 months ago

Thank you!

zanyrenney commented 9 months ago

Waiting on feedback on the changes from @cubuspl42

cubuspl42 commented 9 months ago

@zanyrenney This isn't reasonable to be daily

zanyrenney commented 9 months ago

I'll update the labels, thanks for this @cubuspl42 !

zanyrenney commented 9 months ago

any further updates now on this one @cubuspl42 ?

cubuspl42 commented 9 months ago

The last update from Meta was yesterday, promising a review of the latest changes.

I also started planning the next steps here.

zanyrenney commented 9 months ago

Awesome, thanks so much for the links to those conversations!

zanyrenney commented 8 months ago

how are we doing here team?

cubuspl42 commented 8 months ago
parasharrajat commented 8 months ago

That's great to hear. Normally, the response rate is very slow on RN repo.

@cubuspl42 can you please share a roadmap here so that we understand the timeline?

E.g

  1. We need to do ......... to achieve......... PR .... (🟢 Done| 🟡 In progress| ⚫ Pending)
parasharrajat commented 8 months ago

Our requirement is:

  1. Inline code block should wrap.
  2. There should be a border around the inline code block.
  3. There should be a border-radius on the inline code block. Border radius will only apply at the start and end of inlinecodeblock and not at the line-break when wrapped in multiple lines.
  4. There should be equal gap between the lines in paragragh which contains a inline code block which wraps multiple lines.
  5. Wrapping should work fine even with a non-breaking word e.g asadsadasdasdasdasdsadsadasdasdasdasdasdasdasdasdasdsadasdsadasdasdasdsadasdasd or https://www.google.com/search?q=gool&oq=gool&gs_lcrp=EgZjaHJvbWUqBggAEEUYOzIGCAAQRRg7MgcIARAAGI8CMgcIAhAAGI8CMgcIAxAAGI8CMgYIBBBFGDzSAQc4MzBqMGoxqAIAsAIA&sourceid=chrome&ie=UTF-8
cubuspl42 commented 8 months ago

Sure.

In PR 2, which builds a ReactCore structure for the "spanned" AttributedString (an intermediate C++ structure between JS Text and native rendering components), I asked for feedback on the way these new capabilities can be exposed in RN API. I suggested two alternatives, but I think in the presence of the radio silence I'll just pick one of these two options and proceed.

Later, the deserialization code on two platforms (Android and iOS) must be adjusted. I think I'll just start with Android first. I'll build on top of the de-duplicated logic from PR 1.

Once this new "spanned" structure is available for the platform-specific rendering code, I'll start porting my rendering bits from the proof-of-concept implementation into RN codebase, feature by feature, starting with "non-filled line gaps" (fillLineGap={false}).

Then we'll proceed with the other features, like the inline borders and inline padding.

The first big challenge here is to make RN at all reason about "spans" instead of a tree of text nodes that affect inherited character-level styles.

This is a rough "timeline" (or probably more like a plan, as it didn't contain time points).

I think I'll try to achieve a working Android implementation even without any further feedback from Meta. Maybe seeing a working thing will motivate them to participate more.

zanyrenney commented 8 months ago

@puneetlath are you able to take a look at the comment above and see what you think of the plan / timeline? I'm not as familiar so it would be great to get your view! Thanks!

cubuspl42 commented 8 months ago

So far, I hoped to enter a feedback loop with Meta, but maybe that's unrealistic... Previously, it wasn't that bad, but my last feedback request got ignored, although bumped twice.

Two optimistic notes:

puneetlath commented 8 months ago

The plan seems good to me! I don't think we really have any other choice. Thanks for your persistence @cubuspl42

zanyrenney commented 7 months ago

Has there been any more progress since the last update for feedback @cubuspl42 ?

cubuspl42 commented 7 months ago

I have pinged guys in the first PR in the context of "some internal changes" they have to make before it's merged: https://github.com/facebook/react-native/pull/39630#issuecomment-1806597899

In the second PR (https://github.com/facebook/react-native/pull/41283) I pinged @cortinico, as he's back from vacations.

Having said that, I have some new ideas for moving forward in a relatively "safe" way, without Meta's intermediate feedback (which of course would be extremely valuable). I haven't done much of it yet because of the day-to-day C+ work, but I'll hopefully share some progress next week 🙂

zanyrenney commented 7 months ago

Nice work, so still in a holding pattern before their feedback?

cubuspl42 commented 7 months ago

In PR 1, I was given conflicting requirements. I tried to find a way to meet them both, but I don't think it's possible. I asked to drop one of them (the one that's not enforced by tools...).

PR 2 is still without feedback, but I'm moving forward without it. It's hard not to loose hope here, but I still have some.

parasharrajat commented 7 months ago

That's why RN is still not v1 and flutter reached v3

puneetlath commented 6 months ago

Any luck @cubuspl42?

cubuspl42 commented 6 months ago

@puneetlath Not much luck, but...

In the "PR 1", the one with necessary Android refactorings...

As Nick hasn't replied to my questions, I decided to revert some of the changes earlier suggested in the PR, which caused static code analysis failures in the "internal Meta systems". I also tweaked some other minor details. I bumped Nick.

In the "PR 2", the one with the C++ layer structure...

I'm making some progress offline. My C++ code itself seems to work fine.

Porting my PoC to React Native on Android is tricky, because they have some hacky workarounds for an archaic Android bug, which break the Spannable layout lines. I'm trying to work this around.

puneetlath commented 6 months ago

Got it, thanks for the update!

puneetlath commented 6 months ago

Looks like there is some semi-active conversation happening in the PR, so that's a positive sign.

cubuspl42 commented 6 months ago

Yes, there were some replies!

As soon as this one is merged, I have some other PRs ready to submit; I'm careful not to overwhelm them. I think we'll get there, just... not very soon.

cubuspl42 commented 6 months ago

The PR with Android refactorings is approved and is planned to be merged next week!

This is excellent news, as this code provides the crucial interfaces that can be extended to add the new functionality related to inline code blocks. I have most of the Android and common C++ code ready to split up to PRs and submit for review after it is rebased on top of the "exported" form of the above PR.