Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

PLT-8231: Add landing page when deep linking to native app #208

Conversation

dmeza
Copy link
Contributor

@dmeza dmeza commented Oct 27, 2017

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

Ticket Link

mattermost/desktop#628

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Added or updated unit tests (required for all new features)
  • Has server changes (please link)
  • Has redux changes (please link)
  • Has UI changes
  • Includes text changes and localization file
  • Touches critical sections of the codebase (auth, posting, etc.)

@jasonblais jasonblais added 1: PM Review Requires review by a product manager Setup Old Test Server Triggers the creation of a test server labels Oct 27, 2017
@jasonblais jasonblais self-assigned this Oct 27, 2017
@jasonblais jasonblais removed the Setup Old Test Server Triggers the creation of a test server label Oct 27, 2017
@mattermost mattermost deleted a comment from mattermod Oct 27, 2017
@mattermost mattermost deleted a comment from mattermod Oct 27, 2017
@jasonblais
Copy link
Contributor

@dmeza Can you help rebase your branch and resolve the build failures?

@dmeza dmeza force-pushed the landing_page_for_deep_linking_to_native_app branch 2 times, most recently from 7e75a0e to 60a776d Compare October 30, 2017 15:34
@dmeza
Copy link
Contributor Author

dmeza commented Oct 30, 2017

@jasonblais rebased and fixed build failures.

@jasonblais jasonblais added Setup Old Test Server Triggers the creation of a test server and removed Awaiting Submitter Action Blocked on the author Setup Old Test Server Triggers the creation of a test server labels Oct 30, 2017
@mattermost mattermost deleted a comment from mattermod Oct 30, 2017
@mattermost mattermost deleted a comment from mattermod Oct 30, 2017
@mattermost mattermost deleted a comment from mattermod Oct 30, 2017
@jasonblais jasonblais added Setup Old Test Server Triggers the creation of a test server and removed Setup Old Test Server Triggers the creation of a test server labels Oct 30, 2017
@mattermost mattermost deleted a comment from mattermod Oct 30, 2017
@mattermost mattermost deleted a comment from mattermod Oct 30, 2017
@mattermost mattermost deleted a comment from mattermod Oct 30, 2017
@jasonblais jasonblais added the Setup Old Test Server Triggers the creation of a test server label Oct 30, 2017
@dmeza dmeza force-pushed the landing_page_for_deep_linking_to_native_app branch from 60a776d to 0aa0c8e Compare November 8, 2017 19:55
@dmeza
Copy link
Contributor Author

dmeza commented Nov 8, 2017

@jasonblais rebase to the latest.

@jasonblais
Copy link
Contributor

Sorry @dmeza for the delay in reviewing this PR. Have asked one of our team members to help take a look

@dmeza
Copy link
Contributor Author

dmeza commented Jun 25, 2018

@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.

@enahum enahum self-requested a review June 26, 2018 15:25
@dmeza dmeza force-pushed the landing_page_for_deep_linking_to_native_app branch from c2d5f87 to fcaa325 Compare June 30, 2018 16:45
@dmeza dmeza force-pushed the landing_page_for_deep_linking_to_native_app branch from fcaa325 to 738049d Compare July 8, 2018 21:25
@dmeza
Copy link
Contributor Author

dmeza commented Jul 8, 2018

@esethna rebased to latest from master and fixed the order or regexp for protocol to account correctly for https.

@esethna
Copy link
Contributor

esethna commented Jul 9, 2018

@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#', '');
Copy link
Contributor

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');
Copy link
Contributor

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.
Copy link
Contributor

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?

Copy link
Contributor Author

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'
Copy link
Contributor

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",
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@esethna
Copy link
Contributor

esethna commented Jul 11, 2018

Thanks @enahum. @dmeza let us know if you'd like to jump on a call to discuss further

@dmeza
Copy link
Contributor Author

dmeza commented Jul 12, 2018

@esethna @enahum yes, let's have a call tomorrow morning. Then I can show you how it works and answer any questions or concerns.

@dmeza dmeza force-pushed the landing_page_for_deep_linking_to_native_app branch from 738049d to 52b3019 Compare July 13, 2018 15:11
@esethna
Copy link
Contributor

esethna commented Jul 13, 2018

@dmeza thanks for the call today. Action items we discussed would be:

  1. Updating the links in email notifications to the vault route
  2. Admin setting
  3. Potential redesign of the landing page
  4. Ability to save choice for opening webapp

I will follow up on the above, do some more testing and spec out the proposed changes after consulting with the design team.

@crspeller crspeller removed their request for review July 16, 2018 15:48
@dmeza dmeza force-pushed the landing_page_for_deep_linking_to_native_app branch from 52b3019 to ee8fb8a Compare July 19, 2018 16:29
@esethna
Copy link
Contributor

esethna commented Jul 25, 2018

Just an update, design team is working on an updated version of the landing page currently ^

@dmeza dmeza force-pushed the landing_page_for_deep_linking_to_native_app branch from ee8fb8a to 7ba74e4 Compare July 26, 2018 15:34
@dmeza dmeza force-pushed the landing_page_for_deep_linking_to_native_app branch from 7ba74e4 to 9f264ea Compare August 17, 2018 23:05
@dmeza
Copy link
Contributor Author

dmeza commented Aug 18, 2018

@esethna rebased to the laster from master.

David Meza and others added 4 commits September 3, 2018 16:05
- 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.
@dmeza dmeza force-pushed the landing_page_for_deep_linking_to_native_app branch from 9f264ea to 9fc7a24 Compare September 3, 2018 21:05
@dmeza dmeza closed this Dec 7, 2018
@dmeza dmeza deleted the landing_page_for_deep_linking_to_native_app branch December 7, 2018 18:26
@dmeza dmeza restored the landing_page_for_deep_linking_to_native_app branch December 7, 2018 18:26
@lindalumitchell lindalumitchell added the Tests/Not Needed Does not require new release tests label Dec 15, 2018
hmhealey pushed a commit that referenced this pull request Aug 28, 2020
* Make get posts actions retry if failed

* Add tests for post withRetry methods

* Reset attempts when request happens

* Change retries check
hmhealey pushed a commit that referenced this pull request Mar 17, 2021
* Make get posts actions retry if failed

* Add tests for post withRetry methods

* Reset attempts when request happens

* Change retries check
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1: PM Review Requires review by a product manager Tests/Not Needed Does not require new release tests
Projects
None yet
10 participants