Basic-Car-Maintenance
Basic-Car-Maintenance copied to clipboard
feature: Use NavigationSplitView rather than TabView for iPad #6
What it Does
- Closes #6
- I have added
NavigationSplitView
logic intoMainTabView
struct. This addition is mutating only iPad version right now (completely works) and should affect MacOS version as well in the future (MacOS isn't building as of now). iPhone proceeds withTabView
navigation. I have also refactored the code - added extension to hold@ViewBuilder
views for better reusability and more readable code - because at the end of the dayTabView
andNavigationSplitView
use the same content.
How I Tested
- I have tested this new feature on Previews first and later on Simulators.
- Tested on iPhone 15 Pro Max - 17.0.1
- Tested on iPad Pro 12.9 inch - 17.0.1
- iPad shows
NavigationSplitView
navigation - can be toggled to be shown/hidden. - iPhone shows
TabView
navigation.
Notes
- There is a comment I have left in the code that TabSelection enum can be changed to conform to String rather than Int. If needed can be easily swiped out, currently is left as is.
Screenshot
- Two screen recordings - iPad and iPhone.
https://github.com/mikaelacaron/Basic-Car-Maintenance/assets/18750749/7eda95ac-3913-426c-b3a7-eb210ba943b9
https://github.com/mikaelacaron/Basic-Car-Maintenance/assets/18750749/d78bad15-0f16-486e-bf8c-3a3612f3d982
@mikaelacaron hi, hope all is well 😄 did you have the chance to look at the PR?
@windrunner21 No I haven't, and it's the holidays so I'm not going to be looking at this today. You'll see my review when I have time
@mikaelacaron oh sorry, you are right, I totally forgot about it. Merry Christmas! Have a great holiday 🥳
hey @mikaelacaron, sorry for the late reply, still on holidays! I'll update PR with requested changes by Sunday latest.
@windrunner21 No worries at all! Take vacation! 👍
@windrunner21 After you address all the comments, please click the re-review button
Also if you fix something I mentioned and don't have any questions, go ahead and click the Resolve button, but if you have a question, you can comment on that question directly
@mikaelacaron I didn't click it yet because I still have to solve the bug with reopening the same tab after relaunching application. I wanted to solve everything and then request review 😄
Yup! You should resolve everything for sure! I just mentioned this cause I got notified you were working on it haha
And I saw that I didn't mention it in my first review
@mikaelacaron just finished with the bug fix, implemented it in such a way that TabView
/ NavigationSplitView
are having the same last opened tab.
@windrunner21 thanks for working on this! haha just now finally getting around to finishing up the final bits of this project to launch it