-
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
refactor: Make AttachmentModal
actual screens on native platforms
#56219
base: main
Are you sure you want to change the base?
refactor: Make AttachmentModal
actual screens on native platforms
#56219
Conversation
@parasharrajat the PR is not quite ready yet. I will let you know once it's done. Actively working on it. Updating all usages of |
@parasharrajat just resolved recent merge conflicts. 🙌 |
I don't think the failing test is related to this PR... |
Amazing, thanks. I will start posting testing results in sometime. |
🚧 @mountiny has triggered a test build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
🚧 @mountiny has triggered a test hybrid app build. You can view the workflow run here. |
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
BUG: While adding an attachment, reloading the preview modal before the attachment is send shows Steps:
|
BUG: Reloading a attachment preview has laggy behaviour during load. Notice that modal fade animation is not smooth. 24.02.2025_18.42.33_REC.mp4 |
@chrispader You can start looking at the bugs above while I add more. |
@parasharrajat @chrispader how is this one looking |
There are bugs above. Waiting for resolution. |
still working on it. haven't fixed any of the bugs yet, but i'm certain that all of them can be fixed relatively easily |
@mountiny
Explanation of Change
In this issue i pointed out that we want to migrate the
AttachmentModal
to a (modal) screen. After some more research, this actually wasn't accurate, because we'd rather want to change this into an actual screen on native platforms, while keeping the "modal-like" appearance on web.This is what i did in this PR. This is not the foundational PR for the modal screen migration yet.
This PR migrates all usages of the
AttachmentModal
component to use a centralAttachmentModalScreen
instead. The screen handles the different appearance on web vs. native. For each of the different modal types ("report attachment", "profile avatar", "workspace avatar", ...) there is a specific content component.All common code is handled in the
BaseContent
component, while all platform-specific code is in the relevantAttachmentModalWrapper
, e.g. modal code on web vs.ScreenWrapper
on native.Fixed Issues
$ #53493
PROPOSAL:
Tests
Go to all flows that show attachments and and check if
Following flows to test:
Offline tests
Not needed.
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as in Tests.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen_Recording_20250207_004027_New.Expensify.Dev.mp4
Screen_Recording_20250207_004044_New.Expensify.Dev.mp4
Screen_Recording_20250207_003937_New.Expensify.Dev.mp4
Screen_Recording_20250207_004006_New.Expensify.Dev.2.mp4
Android: mWeb Chrome
iOS: Native
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-02-06.at.16.32.44.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-02-06.at.16.32.30.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-02-03.at.11.26.24.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-02-06.at.16.32.17.mp4
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-02-06.at.16.33.13.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2025-02-06.at.16.38.14.mov
Screen.Recording.2025-02-06.at.16.37.58.mov
Screen.Recording.2025-02-06.at.16.37.32.mov
Screen.Recording.2025-02-06.at.16.37.47.mov
Screen.Recording.2025-02-06.at.16.36.50.mov
MacOS: Desktop