-
Notifications
You must be signed in to change notification settings - Fork 3.2k
refactor: Make AttachmentModal
actual screens on native platforms
#56219
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
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 i'll merge main again today. Could you take a look at this in the next days? The PR is ready from my side :) |
Sure. All important tasks are done I can start running test runs now. ETA is Thursday as I will be travelling tomorrow. |
some checks are failing, how is this looking? |
fixed all checks. Ready for final review 🙌🏼 |
@mountiny There's one remaining Changed ESLint check issue around a deprecated type from |
Hey team! Just checking to see where we're at with this — thanks! |
Still waiting for review by @parasharrajat 🙌🏼 |
I will start posting feedback in 2 hours. Thanks for the ping. |
Testing... |
@parasharrajat updated the PR again with main. Could you please give this a look next week? Thanks 🙌🏼 |
@parasharrajat i'll merge |
Testing... |
🚧 @mountiny has triggered a test 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! 🧪🧪 |
@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