-
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
fix: mWeb - Chat - Uploading an image while offline briefly shows an offline message in the preview. #43249
Merged
arosiclair
merged 3 commits into
Expensify:main
from
Krishna2323:krishna2323/issue/42657
Jun 19, 2024
Merged
fix: mWeb - Chat - Uploading an image while offline briefly shows an offline message in the preview. #43249
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do you think the above two cases cover every type?
For example, here's one example from
IOURequestStepConfirmation.tsx
, they have extra type check and/
check, is the same applicable here?App/src/pages/iou/request/step/IOURequestStepConfirmation.tsx
Line 206 in a67be2f
Note
I haven't reviewed the code from laptop cause i'm a little under the weather, so might take the day off, but if you address the above comments of whether those additional checks are necessary, i will try to review the PR over the weekend.
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.
I'm not completely sure about the other checks, with the current changes it works fine on all platforms but we can consider adding those checks also, WDYT?
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.
i think the
typeof
check would unnecessary here because it will always be true i checked the type ofurl
it's string so thenisLocalFile
would always be true so no need to be redundant.But
startsWith('/')
is something i'm not sure about, can you check and see if that is needed? if not then the current implementation is complete, and i will complete the checklist then, let me know :)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.
@Krishna2323 bump on the comments above :)
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.
will test for
/
again on all platforms todayThere 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.
bump @Krishna2323 , lets get this merged before the week closes 💪
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.
Can we move these checks to a shared helper function? @Krishna2323
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.
@arosiclair, I've updated the code to add a util function for determining local files. @allgandalf, could you please take a look at the updated code? Thanks.