-
Notifications
You must be signed in to change notification settings - Fork 2.7k
PLT-8231: Add landing page when deep linking to native app #208
PLT-8231: Add landing page when deep linking to native app #208
Conversation
@dmeza Can you help rebase your branch and resolve the build failures? |
7e75a0e
to
60a776d
Compare
@jasonblais rebased and fixed build failures. |
60a776d
to
0aa0c8e
Compare
@jasonblais rebase to the latest. |
Sorry @dmeza for the delay in reviewing this PR. Have asked one of our team members to help take a look |
@esethna they are related in that they add support to deeplinking into the mobile app, but it doesn't have anything to do with the landing page or any specific route. |
c2d5f87
to
fcaa325
Compare
fcaa325
to
738049d
Compare
@esethna rebased to latest from master and fixed the order or regexp for protocol to account correctly for https. |
@enahum have you had a chance to take a look at this PR and comment on the approach? |
render() { | ||
const {protocolUnsupported, browserUnsupported} = this.state; | ||
|
||
let nativeLocation = window.location.href.replace('/vault#', ''); |
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.
how do I get /vault#
in any link, is it have to be added manually when sharing a link?
Also I know the links are handled automatically by the mobile app but that is only true for self compiled apps, not for the mattermost app that is distributed through the app stores, I guess the idea would be to open this, but that keeps me thinking how is that going to be accomplished if the /vault#
part of the URL needs to be there.
nativeLocation = nativeLocation.replace(/^(https|http)/, 'mattermost'); | ||
|
||
//***** TESTING PURPOSE - REMOVE BEFORE MERGE **** | ||
nativeLocation = nativeLocation.replace(/\/\/[^/]+/, '//pre-release.mattermost.com'); |
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.
comment to not forget to remove this
); | ||
} | ||
|
||
// prompt user to download in case they don't have the mobile app. |
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.
I'm guessing this is true for mobile and desktop apps, right?
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.
Yes, in case the user doesn't have it installed it should work for mobile and desktop apsp.
/> | ||
</div> | ||
<a | ||
href='/downloads' |
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.
this URL here should be taken from the config, also it would be ideal if we can detect if the browser is on desktop use the AppDownloadLink
setting, for Android use AndroidAppDownloadLink
and iOS IosAppDownloadLink
Also this option should be shown only if the setting for EnableMobileDownload
is true
@@ -10,6 +10,7 @@ | |||
"bootstrap-colorpicker": "2.5.2", | |||
"chart.js": "2.7.2", | |||
"compass-mixins": "0.12.10", | |||
"custom-protocol-detection": "uber-uchat/custom-protocol-detection", |
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.
is this a fork? if so, what is different from the original library?
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.
Yes, it's a fork and it adds Safari support
:
https://github.com/uber-uchat/custom-protocol-detection/commits/master
738049d
to
52b3019
Compare
@dmeza thanks for the call today. Action items we discussed would be:
I will follow up on the above, do some more testing and spec out the proposed changes after consulting with the design team. |
52b3019
to
ee8fb8a
Compare
Just an update, design team is working on an updated version of the landing page currently ^ |
ee8fb8a
to
7ba74e4
Compare
7ba74e4
to
9f264ea
Compare
@esethna rebased to the laster from master. |
- Add protocol detection for desktop app - fixup to protocol - Moved logic to new router - Renamed folder to be more descriptive. Created proper PureComponent. Fix all issues related to string replacements. Fixed timeOut not working.
9f264ea
to
9fc7a24
Compare
* Make get posts actions retry if failed * Add tests for post withRetry methods * Reset attempts when request happens * Change retries check
* Make get posts actions retry if failed * Add tests for post withRetry methods * Reset attempts when request happens * Change retries check
Summary
These changes add a new route
vault
to a landing page that allows to fire the protocol to native client if installed or give the user the option to download the native app or redirects to the webapp after 5 seconds.This is an example if the native app is installed and the protocol is successfully registered:
![screen shot 2017-10-26 at 11 31 06 pm](https://user-images.githubusercontent.com/160621/32088231-0b73c2a6-bae2-11e7-9ecc-7ff87b3abfbf.png)
Ticket Link
mattermost/desktop#628
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]