-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[$500] Android - Note - The page is broken with a long blockcode with one backtick #29387
Comments
Triggered auto assignment to @dylanexpensify ( |
Job added to Upwork: https://www.upwork.com/jobs/~01412f56d0ed1fc241 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
this one looks very similar to #29408 |
Agree @koko57! This was created first, so we'll keep this open (cc @greg-schroeder) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Inline Code blocks render beyond the page/parent boundaries in private notes. What is the root cause of that problem?There are a few separate issues happening here. The same message observed on an android device, gives: Now on the other hand, when dealing with Private Notes we observe that the following input: Produces the same output on web and android, where the spaces are trimmed: I should note there may also be a bug here: You can't have new lines in the code blocks, but maybe not since they are supposed to be "inline?" I used spaces to get the wrapping effect. However, a very Private note with a ton of characters breaks on android but not web: But what we do observe is that once again, in the Private Note, long whitespace sequences were truncated and replaced with a new line. So depending on what is the actual expected result then the root cause might slightly differ. Assuming the goal of the product wanted to leave all whitespace the user enters in a inline-codeblock as-is, regardless of if it is a Private Note or a Message in a Report; then these would be the problem areas I found: 1. Incorrect text splitting of Report Messages/Private Notes on native apps:App/src/components/InlineCodeBlock/WrappedText.js Lines 19 to 21 in 91e2120
the result of this method on native for our above example is:
2. Incorrect formatting of Report Messages on WebThe issue here is that the rendered span tag for inline code blocks is missing CSS styles to achieve the desired outcome. More on this below in the solutions section. 3. Private Notes New line in Inline code blocks bugThis happens due to the library used here: App/src/libs/actions/Report.js Lines 1168 to 1177 in be44c93
Which is called from:
What changes do you think we should make in order to solve the problem?1. Incorrect text splitting of Report Messages/Private Notes on native apps:Again under the assumption that we want to preserve user entered white space, I think the best approach here would be to replace the existing code here: App/src/components/InlineCodeBlock/WrappedText.js Lines 41 to 70 in bb22e06
and instead we could nest a text element within another one: <Text style={props.boxModelStyles}>
<Text style={props.textStyles}>{props.children}</Text>
</Text> NOTE: i styled these manually, that would be improved in a PR 2. Incorrect Formatting of Report Messages on WebUsing Alternatively I believe its better to switch from Which also fixed private notes on web: And if we wanted to truly preserve the user white-space as they entered it, both properties should be used, as if i'm not mistake inline-block alone does trim leading spaces on a new line 3. Private Notes Trimming Inline code blocksI believe this is a separate bug and it would require a lot more investigation to give a concrete answer as to why new lines prevent code blocks from being rendered. |
Unassigning due to low bandwidth! |
@dylanexpensify Please assign a new C+ here |
📣 @rushatgabhane Please request via NewDot manual requests for the Contributor role ($500) |
@rushatgabhane assigning you for takeover, lmk if that's ok! |
Hi @dylanexpensify, #29408 was closed as dupe of this issue but that issue was raised on 10th of October on slack and internal team has raised this issue on 12th October. Can you assign me issue reporter for this issue? |
@rushatgabhane, @dylanexpensify Eep! 4 days overdue now. Issues have feelings too... |
@rushatgabhane @dylanexpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@rushatgabhane, @dylanexpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
Hello @rlinoz @rushatgabhane @dylanexpensify , this would be my first contribution, and I have applied on UpWork, but it hasn't hired me for the job so i was just wondering how long this typically takes and/or have i missed anything in the process? (I have submitted all my details on another post previously) |
Oh ok I was following the description on the posting itself I was waiting for that confirmation but i will go ahead and finish up the implementation and open a PR then. |
makes sense. but to speed things up you can submit a PR |
+1 on submitting a PR! |
Hey folks, I opened a WIP PR so that you guys know I am working on it. There is an issue. I am currently investigating but it seems i cant get the styles to match properly between the platforms. It wont overflow the page but for example the borders on the inline block wont render on ios... Im working on a snack to present the proof of concept. Will keep you posted. |
@DaniloVlad thanks for the update! Would you mind converting it to a draft so we know when we can look at it? |
Hey guys, so unfortunately switching over the design to be a code-block seems to be more difficult than expected. Especially when it comes to mobile. I would like some input on the styling of these blocks. It seems previously there was a lot more padding and I'm curious if that is still preferred. |
There are still some things I'd want to try out to support the "block" code style but i worry it may result in a lot of regressions. If anyone can point me to some information regarding where the |
nice - @rlinoz thoughts:? |
@DaniloVlad I am not sure if I understand, the screenshots are for triple backticks or for single ones? If it is for single ones it is looking very similar to what we have today, and I think it would be fine. |
This would be for single back tick comments. If you take a look at my original proposal i had suggested a sort of Really all that i would want to know is that if we would want to add more space between lines or padding within the inline code itself. I was able to preserve most of the existing styles from the previous implementation other than padding i believe. |
I see, can you post a comment of how it is today and how it will be? Then I can add the design label to this issue and they can approve it. |
bump @DaniloVlad |
@DaniloVlad shall we reassign? Or can you get to it today? |
Although I'm not involved, I'll bump this as Melvin doesn't |
thank you! |
I believe we can reassign, how do we do that? |
We need to find a contributor with a new proposal. @rlinoz |
First, I'd suggest to clear up this issue. The actual scope of this issue is unclear. There's only one screenshot provided for one platform, while the proposal mentions issues on Native and web. The test steps render like this for me: ...while on the screenshot we can see that the text is very long and presumably consists of long words. It should be made clear how this issue relates to #27913. |
If the scope was clear, I could help sketching a solution (maybe even fix this myself), because I have experience with the code related to the inline code blocks. |
@rlinoz agree, closing |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Issue found when validating PR #29055
Version Number: v1.3.81-6
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: @
Action Performed:
Expected Result:
The code block does not go beyond the page (the page is broken)
Actual Result:
The block of code goes outside the page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Bug6233522_1697053941799.Record_2023-10-11-17-37-11.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: