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

Implement deep link functionality and enable it for android. #4775

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Commits on Jun 3, 2021

  1. deeplink [nfc]: Move type LinkingEvent to src/types.js.

    LinkingEvent is going to be used in multiple files in the following
    commits and hence it is better to export it from a common file.
    AkashDhiman committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    24e7629 View commit details
    Browse the repository at this point in the history
  2. auth [nfc]: Move global otp from AuthScreen to webAuth.

    This will help us in moving `webAuthBegin`, `webAuthEnd` from
    `AuthScreen` to `webAuth.js` which is a better place to put them
    from a reusability point of view.
    
    This commit also involves modifying the associated code in
    `AuthScreen`, `webAuth.js` and `webAuth-test.js`.
    
    Specifically, these changes are being made to implement deep link
    functionality in the following commits.
    AkashDhiman committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    80fb6cd View commit details
    Browse the repository at this point in the history
  3. auth [nfc]: Move beginWebAuth and endWebAuth to webAuth.js

    This change is done to centralise the handling of urls received by
    our app which will be required to implement deep linking.
    
    With this modification webAuth can be initiated from any component
    with appropriate parameters.
    
    Note that this commit also stops exporting some functions from
    `webAuth.js` as this is no longer needed, and updates the jsdocs of
    `beginWebAuth` and `endWebAuth`.
    AkashDhiman committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    7cd1211 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1051742 View commit details
    Browse the repository at this point in the history
  5. deeplink: Use urlListener to handle endWebAuth.

    This commit shifts the logic that handles auth urls; from
    `AuthScreen` to `AppEventHandlers`.
    AkashDhiman committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    ce6fc47 View commit details
    Browse the repository at this point in the history
  6. utils: Update internalLink.js to support deeplink urls.

    `internalLink.js` provides us many function that can also be
    utilised to process deep links. Doing this however required few
    simple modifications.
    
    This commit adds `isDeepLink` function, modifies getLinkType in
    order to be compatible with deep links and renames `internalLink.js`
    to `linkProcessors.js`.
    AkashDhiman committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    f4658f0 View commit details
    Browse the repository at this point in the history
  7. deeplink: implement navigateViaDeepLink action.

    This action will be responsible to generate a narrow from a valid
    navigation deep link url, and then navigate to it.
    
    Limitation of current Implementation:
    - if the link points to a different account, we only switch the
    account and don't actually navigate to it. (similar to zulip#4630)
    AkashDhiman committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    24a93b2 View commit details
    Browse the repository at this point in the history
  8. deeplink: Handle deep links that navigate to particular screens.

    This involves creating a `handleUrl` function that checks if deep
    link url is a login url or a navigation url and forwards
    the execution accordingly.
    AkashDhiman committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    def383f View commit details
    Browse the repository at this point in the history
  9. deeplink: Enable deeplink navigation in android.

    Caveats:
    - current navigation does not work across accounts.
    
    Fixes-part-of: zulip#4751
    AkashDhiman committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    e1df57d View commit details
    Browse the repository at this point in the history
  10. deeplink [nfc]: Add documentation to manually test deep link.

    - In this commit, instructions are only provided for android.
    AkashDhiman committed Jun 3, 2021
    Configuration menu
    Copy the full SHA
    dc71cfb View commit details
    Browse the repository at this point in the history