Repository navigation
fix gray placeholder shown for markdown images with invalid URLs - #50918
MarioExpensify merged 4 commits into
Conversation
|
@dannymcclain , @Expensify/design, Could you please provide me with the correct icon color and background color for the placeholder and modal? Alternatively, could you share the design for that case so I can update it accordingly? Thank you! |
|
Ok hopefully this will be helpful: I think the placeholder background needs to be |
|
@dannymcclain , @Expensify/design, I have finished updating the icon and background colors for online and offline modes, following this comment. Could you please review it and let me know if you have any questions? |
|
@huult looks good from what I'm seeing in the updated screenshots in the original comment 👍 |
|
Looking good! Do we need the border around the placeholder box? Have we always had that or was that recently introduced? Also, ideally the text underneath But that might need to be changed elsewhere/globally so if that's the case we don't need to worry about it here. |
|
I'm guessing the border around the placeholder is just the same standard border we use for all image attachments? I could be wrong though. And we might not even need it as you are suggesting, maybe we kill it. No strong feelings from me really. |
|
@dannymcclain as @shawnborton answered, do we need to make any more changes? |
|
Ah if it's standard for all images then no I think we can keep it. I don't feel too strongly about it so I think it's fine if it's already part of the "normal" image styles. |
|
Thanks, @dannymcclain . I will not make any more changes to my pull request, so @suneox , could you please review it? If you have any questions, let me know. Thanks! |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-10-20.at.23.42.31.mp4Android: mWeb ChromeScreen.Recording.2024-10-20.at.23.41.06.mp4iOS: NativeScreen.Recording.2024-10-20.at.23.40.15.mp4iOS: mWeb SafariScreen.Recording.2024-10-20.at.23.39.13.mp4MacOS: Chrome / SafariScreen.Recording.2024-10-20.at.23.27.03.mp4MacOS: DesktopScreen.Recording.2024-10-20.at.23.36.20.mp4Warning: Warning: Warning: |
@huult Could you please also handle the case when opening from the attachment list? It still shows infinite loading instead of displaying a broken image. Screen.Recording.2024-10-19.at.14.24.19.mp4 |
| const fileType = FileUtils.getFileType(attachmentSourceAttribute); | ||
| const fallbackIcon = fileType === CONST.ATTACHMENT_FILE_TYPE.FILE ? Expensicons.Document : Expensicons.Gallery; | ||
| const fallbackIcon = fileType === CONST.ATTACHMENT_FILE_TYPE.FILE ? Expensicons.Document : Expensicons.GalleryNotFound; | ||
| const [hasLoadFailed, setHasLoadFailed] = useState(true); |
There was a problem hiding this comment.
Is there any specific reason why we are setting failed as the default?
| const [hasLoadFailed, setHasLoadFailed] = useState(true); | |
| const [hasLoadFailed, setHasLoadFailed] = useState(false); |
There was a problem hiding this comment.
@suneox I set the default value of hasLoadFailed to true to handle the bug that occurs if the user clicks on the image too quickly.
…der-displayed-markdown-image-wrong-url
@suneox The issue you mentioned has been addressed in another ticket. Here is the pull request that resolves it. Therefore, I believe we don't need to address this issue here |
|
Excellent! |
|
@MarioExpensify looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
Reviewer checklist WAS filled in, not sure what happened here @suneox. Dismissing Emergency label. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
I think it’s related to the pipeline rule not being triggered after approve the PR. |
|
🚀 Deployed to staging by https://github.com/MarioExpensify in version: 9.0.52-0 🚀
|
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.0.52-5 🚀
|







Details
Fixed Issues
$ #49992
PROPOSAL: #49992 (comment)
Tests
.Offline tests
QA Steps
.PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2024-10-17.at.12.33.19.mp4
Android: mWeb Chrome
Screen.Recording.2024-10-17.at.12.35.39.mp4
iOS: Native
Screen.Recording.2024-10-17.at.12.27.21.mp4
iOS: mWeb Safari
Screen.Recording.2024-10-17.at.12.28.42.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-10-17.at.12.19.37.mp4
MacOS: Desktop
Screen.Recording.2024-10-17.at.12.21.41.mp4