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

mobile: use single webview & handle native/webview navigation ipc #3284

Merged
merged 30 commits into from
Mar 1, 2024

Conversation

latter-bolden
Copy link
Member

@latter-bolden latter-bolden commented Feb 26, 2024

This moves from a webview per-tab architecture to a singleton webview overlay simplifying state & navigation required for moving between the two runtimes. Back buttons, internal tab navigations, etc. should work correctly now.

There are a few remaining items related to this work, but I'd like to get it merged so we can try it against the test build. I logged issues in Linear for tracking the following remaining items:

  • manage account & branch wer functionality still need to be refactored
  • theres an added dev:ios:local script that simplifies running against the local dev server. Needs to be fixed, hardcoded right now
  • the webview context got a bit complicated and should probably have its state management simplified

Fixes LAND-1504

@latter-bolden latter-bolden changed the title Lb/mobile webview navigation mobile: use single webview & handle native/webview navigation ipc Feb 26, 2024
Copy link

linear bot commented Feb 27, 2024

@latter-bolden latter-bolden marked this pull request as ready for review February 27, 2024 20:45
Copy link
Collaborator

@alecananian alecananian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting approach! Looks to be working well - nice to not see loading spinners as I navigate around 🙂 I'm concerned about the fragility of all the state management and webview context, and it's hard to follow as a newcomer to the code. I think adopting a reducer pattern for that context could help a lot. I'd also like to see what the dev local mode is doing on your end - will schedule some time to walk through it with you.

apps/tlon-mobile/app.config.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
apps/tlon-mobile/src/components/SingletonWebview.tsx Outdated Show resolved Hide resolved
apps/tlon-mobile/src/App.tsx Outdated Show resolved Hide resolved
apps/tlon-mobile/src/screens/WebViewScreen.tsx Outdated Show resolved Hide resolved
apps/tlon-mobile/src/lib/landscapeApi.ts Outdated Show resolved Hide resolved
@latter-bolden
Copy link
Member Author

@alecananian addressed the points we spoke about this afternoon 👍

Copy link
Collaborator

@alecananian alecananian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks great

@latter-bolden latter-bolden merged commit c975a52 into develop Mar 1, 2024
1 check passed
@latter-bolden latter-bolden deleted the lb/mobile-webview-navigation branch March 1, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants