-
Notifications
You must be signed in to change notification settings - Fork 339
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
Migrate LocationHistoryList to SwiftUI #3468
base: master
Are you sure you want to change the base?
Migrate LocationHistoryList to SwiftUI #3468
Conversation
Present it from SettingsDetail and Debug screens; Add wrapper to LocationHistoryDetailViewController.
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.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Moving back to draft as the Move functionality was missed. |
…nHistoryDetail; Add syncing between navigation items; Remove unnecessary Eureka import and TypedRowControllerType conformance.
Move functionality has been restored. Works differently than before by reusing the same |
…screen to avoid moveDelegate from being released too early; Pass AppEnvironment so LocationHistoryDetail can observe changes to the data set.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3468 +/- ##
===========================================
+ Coverage 27.54% 45.33% +17.78%
===========================================
Files 311 221 -90
Lines 31699 13309 -18390
===========================================
- Hits 8733 6033 -2700
+ Misses 22966 7276 -15690 ☔ View full report in Codecov by Sentry. |
Thanks for your contribution, I'll run the app today to give it a try, but in general it looks good, are you going to migrate Also, sorry for the timin, but I am leaving on vacations until March 13th, so if you don't hear from me, thats the reason. |
For linting |
Yes, that's my plan. It's not clear how the map support is in SwiftUI for minimum supported version but will see when I get there. I don't think I'll be blocked. I ran it in the iOS and iPad simulators against my instance and looked good. Can you please validate if the current location annotation stays after moving between entries?
No worries. Enjoy your time off. |
- use Current directly - move clear() method below init
…ld not have any restrictions.
@bgoncal applied your requested changes plus improved the previews by introducing more mock data and names. |
Can you add a small test for the safe subscript extension you added? Also one snapshot test for the view, I started with snapshot tests very recently so probably the only place you will find example is Im running on my phone now and it all looks good, I will let you know in case I spot something |
Rearranged Utilities tests; Add missing super call in ClientEventTests
@bgoncal I'm going to push snapshots in light mode for now. How interesting would it be if I pushed a change in a new PR to always generate and assert in dark mode as well? |
That's would be nice! We should aim for that indeed |
Use Current.date() when creating a LocationHistory entry.
Heads up @bgoncal, the
|
- update OS to the current base version (18.2) - change assertion in ClientEventTests to address flakyness
Cool, once we merge this one I have two more lined up with improvements to the snapshot tests tooling. |
Summary
In this PR I set to migrate the LocationHistoryList to SwiftUI, to reduce the dependency in Eureka. This screen was picked at random.
As this screen is presented from two different places, SettingsDetail and Debug screens, also updated the code in the corresponding classes.
The LocationHistory list reacts to changes.
LocationHistoryDetail
LocationHistoryDetailViewController also gained a SwiftUI wrapper in order for it to be presented from the new LocationHistoryListView.
This wrapper syncs the navigation items between the wrapped View Controller and the parent.
Move functionality also got migrated.
Misc changes
Screenshots
LocationHistoryList item
Empty LocationHistoryList