Skip to content
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

[Main Tracking] App Navigation Reboot #11768

Closed
7 tasks done
puneetlath opened this issue Oct 12, 2022 · 180 comments
Closed
7 tasks done

[Main Tracking] App Navigation Reboot #11768

puneetlath opened this issue Oct 12, 2022 · 180 comments
Assignees
Labels
Planning Changes still in the thought process Weekly KSv2

Comments

@puneetlath
Copy link
Contributor

puneetlath commented Oct 12, 2022

Design doc link - https://docs.google.com/document/d/1cQ87HcDA9RrmBM4ch7PmlNi9N9ZP8abQuPF0gKYrxDE/edit

Problem:

We initially implemented react-navigation in App without a proper design doc as part of the NewDot MVP. While this library came with some awesome benefits - we’ve realized over time that some of our early decisions in how we use the library have impacted performance and usability (i.e. bugs and lots of em). Our current design also deviates from our ideal design and needs to be reworked.

Solution:

Let’s establish a ruleset of navigational actions a user can take and define which gestures or interactions relate to those navigational actions. Then we’ll re-implement React Navigation with those rules in mind. We will kill the drawer navigator favoring a simpler stack navigator approach. And finally, unblock the bugs and make our app navigation competitive and bug free.

Timeline: WhatsApp Quality Level Urgency 🔥

Plan of Action:

  • #whatsnext link
  • Send Strategy@ email
  • Predesign links 1, 2, 3
  • HL Design Doc link
  • Detailed Design Doc
  • Implement New Navigation
  • Unblock bugs by fixing or closing them

Implementation PRs

Overview

This GH will serve as the tracking issue for improving our React Navigation implementation. A bunch of issues with navigation have been found and are referenced in this project.

List of related issues

Currently fall into two major categories

Drawer Navigation / State

Browser History

Performance

Misc.

@puneetlath puneetlath added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 and removed AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Oct 12, 2022
@melvin-bot

This comment was marked as outdated.

@melvin-bot melvin-bot bot added the Daily KSv2 label Oct 12, 2022
@puneetlath puneetlath added the Planning Changes still in the thought process label Oct 12, 2022
@parasharrajat
Copy link
Member

Get Control of React-Navigation

🔥 🔥

@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2022

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@puneetlath
Copy link
Contributor Author

Suggestion from @roryabraham: move src/libs/Navigation to src/Navigation to highlight its importance to someone coming to the repo for the first time.

@puneetlath puneetlath changed the title [Tracking] Get Control of React-Navigation [Tracking] Get Control of Navigation Oct 12, 2022
@puneetlath
Copy link
Contributor Author

Another interesting note from @roryabraham: we don't use React Navigation's link component.

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2022

@puneetlath Eep! 4 days overdue now. Issues have feelings too...

@puneetlath
Copy link
Contributor Author

Reached out to React Navigation library owner, but haven't heard back. Will follow up again this week as well as with perhaps some others.

@melvin-bot melvin-bot bot removed the Overdue label Oct 19, 2022
@JmillsExpensify JmillsExpensify changed the title [Tracking] Get Control of Navigation [Tracking] [Polish] Get Control of Navigation Oct 19, 2022
@puneetlath puneetlath added the Bug Something is broken. Auto assigns a BugZero manager. label Oct 19, 2022
@melvin-bot melvin-bot bot added the Overdue label Oct 21, 2022
@puneetlath
Copy link
Contributor Author

Jason will be the BZ person tag teaming this with me, so assigning to him to the issue as well.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 21, 2022
@JmillsExpensify
Copy link

This is on staging. Let the real-world testing begin!

@melvin-bot melvin-bot bot removed the Overdue label Jun 7, 2023
@mountiny
Copy link
Contributor

mountiny commented Jun 7, 2023

The main PR just got merged and stack navigation is available in Staging. I have compiled a list of some clean up and follow up tasks in this issue, working on adding a documentation to the main about the navigation.

@roryabraham
Copy link
Contributor

Seeking guidance on whether this is now expected behavior: #20370

It seems like the answer is probably "yes" given the new stack navigator?

@mountiny
Copy link
Contributor

mountiny commented Jun 8, 2023

Answered in the issue

@hayata-suenaga
Copy link
Contributor

I have read and reviewed this Design Doc!

@mountiny
Copy link
Contributor

The migration has been done at the end of the last week and it went surprisingly smooth. I am not tracking issues related to the new navigation in this public project https://github.com/orgs/Expensify/projects/37 and trying to iron them out with SWM.

With Jason, once we get a bit of time we will go through all the issues on hold and see which are fixed and which need to be addressed still

@mallenexpensify
Copy link
Contributor

mallenexpensify commented Jun 22, 2023

I put the below on hold, pending the navigation reboot. If anyone disagrees, please comment on the issue

@mountiny
Copy link
Contributor

I will check it out, the refactor is deployed now and we are going through some follow up issues and we will go though all the issues on hold to test them and close issues we cannot repro

@mountiny
Copy link
Contributor

Added all the relevant issues to the https://github.com/orgs/Expensify/projects/39 and to those we need to go through and confirm if they are fixed are added to the TODO column.

@mountiny
Copy link
Contributor

mountiny commented Jul 3, 2023

I will try to close this out this week and send a wrap up!

@melvin-bot melvin-bot bot removed the Overdue label Jul 3, 2023
@melvin-bot melvin-bot bot added the Overdue label Jul 11, 2023
@JmillsExpensify
Copy link

And I am still working on testing the linked issue. Should be able to finish it up this week.

@melvin-bot melvin-bot bot removed the Overdue label Jul 12, 2023
@melvin-bot melvin-bot bot added the Overdue label Jul 20, 2023
@mountiny
Copy link
Contributor

Going to send out project wrap up

@melvin-bot melvin-bot bot removed the Overdue label Jul 20, 2023
@mountiny
Copy link
Contributor

🗺️🧭 It’s time for the Navigation Reboot wrap-up 🎉

Its been almost 9 months since we embarked on the journey to update out navigation concepts in newDot to have more reliable and predictable navigation pattern across all our supported platforms. And today, this issue can be finally closed 🎯

This was one of the first projects where we have fully outsourced to an external agency, Software Mansion. I am also tagging @adamgrzybowski and @WoLewicki who have done amazing job navigating unknown codebase, learning our design doc process and delivering this solution with care and urgency. Thank you guys 👏

What went well

  • We have closed over 28 bugs (more to be closed but we haven't got through them yet) which were on hold for this project. You can see them in this Github issue 💪

  • We now have way more predictable navigation system which is easier to use and has less custom actions (which had steep learning curve for anyone new to the the codebase)

  • This project has shown we can effectively expand our teams through the expert agencies if we can work using the “buddy” system and find a project that suits them. In this case, basically 100% of the implementation has been done in the App which was ideal.

  • It has been a great learning experience on how to work with the expert agencies, I haven’t got to this yet, but I would love to start some SO where we can share best practices on how to work as a “buddy” and other engineers can share their experiences there too.

  • The detailed section of the design doc has been very much written by the external agency and I have only helped with minor things and resolving the threads. The doc has got great feedback, hopefully we can do more docs like this with SWM 🎀. This quality has helped to save internal engineering time.

  • The implementation has went quite smooth, it was a major change in the codebase, but there were no major regressions or blockers and we managed to address any issues after the “switch" in timely manner.

What we learned

  • Lots about how to work with the external agencies. This is probably not surprising, but to allow them to work as efficiently as possible, the buddy should be proactive and be available as much as possible whenever they get stuck/ have questions. Given they usually have this single project as their main focus, if they are stuck on something, they will be wasting their time until we help them to get unstuck.

  • It can take a lot of time to manage such project due to the above and being in similar timezone helps a lot to keep it going faster (move to Europe) but I certainly believe these projects can unlock so much productivity and high quality front-end code that we would hardly achieve in the same timeframe without the experts.

  • Using Github Projects is quite handy for managing the open source projects. It would be even better if we could let the expert contributors move the card within the projects on their own, but we would most likely have to make them all part of our Organization.

What we could have done better

  • This one could be in the previous category but: whenever the project is discussing a bit more abstract or ambivalent terms and concepts, its crucial to keep the conversation grounded in written down and well defined terminology. Always make sure to come back to the terminology section whenever the conversation deviates or you have a feeling someone is using some term with different meaning than was agreed on. We have had lots of discussions on what should the Up, Back, Push, etc actions do within the App and often people got confused about what they actually mean and wasted a lot of time as people were not on the same page with these terms important for the project.

    • Let’s make sure that whenever there are some non-trival terms in some discussions you are having in public rooms, assume people know nothing and take your time explaining the terms to get everyone on the same page to get the most out of the conversation.
  • The project could have been completed faster especially if we would have repeatedly not run into confusing situations when discussing the design because of the above mentioned problem.

What’s next

We have ironed out most of the follow up bugs we have faced, but we are not ending here. I am tracking all of the follow up issues in this github project. There are 2 bigger issues addressed:

- Resizing the browser window from wide to narrow layout or viceversa make the components to loose their state - Adam already has [an active PR](https://github.com/Expensify/App/pull/22437) to address this by changing the layout to style based layout so we dont have to remount the navigators and state of components is not lost 🎉

- Trying to fix the browser back button behaviour. Browsers intentionally make it hard to mess with its internal history/ state. This makes it hard for us in many situations, but for example [here](https://github.com/Expensify/App/issues/22101), when user clicks to leave a room or a thread, they are navigated to some other page, but when they click browser back, this naturally takes them to the previous URL, which is the thread they have just left. Its not a huge problem but[ SWM is working](https://expensify.slack.com/archives/C04878MDF34/p1689872643785089?thread_ts=1689871481.652229&cid=C04878MDF34) on potential update to react-navigation which would allow us to handle this better.

Thanks everyone! Onwards and upwards! 🚀

Vit, Adam and Wojti from SWM, and also Marc and Vivek from the high level stages

@adeel0202
Copy link
Contributor

Hi @mountiny, there was this issue that was initially held because of the navigation reboot but later it was closed without the reporting bonus. Can you please check?

@mallenexpensify
Copy link
Contributor

Addressing @adeel0202's above comment here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Planning Changes still in the thought process Weekly KSv2
Projects
None yet
Development

No branches or pull requests