Skip to content

Commit

Permalink
use the official android way of doing app install banners
Browse files Browse the repository at this point in the history
closes: CNVS-32934

see
https://developers.google.com/web/updates/2015/03/increasing-engagement-with-app-install-banners-in-chrome-for-android#native
for how these work.

test plan:
* you have to be serving canvas over https://
* on android, install Chrome, or another browser that
  supports Service Workers and manifest
* Visit the site over two separate days.
* Or, more usefully, enable chrome://flags/#bypass-app-banner-engagement-checks
* it should ask you to install the native canvas android app

Change-Id: I7c5cf8e9ecffd4dc52058bed865f82eaf3a7ea97
Reviewed-on: https://gerrit.instructure.com/93760
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
  • Loading branch information
Ryan Shaw committed Oct 28, 2016
1 parent aebf678 commit a444b5f
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 490 deletions.
20 changes: 0 additions & 20 deletions app/coffeescripts/bundles/smartbanner.coffee

This file was deleted.

13 changes: 9 additions & 4 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -964,12 +964,17 @@ def custom_dashboard_url
end

def include_custom_meta_tags
output = []
if @meta_tags.present?
@meta_tags.
map{ |meta_attrs| tag("meta", meta_attrs) }.
join("\n").
html_safe
output = @meta_tags.map{ |meta_attrs| tag("meta", meta_attrs) }
end

# set this if you want android users of your site to be prompted to install an android app
# you can see an example of the one that instructure uses in public/web-app-manifest/manifest.json
manifest_url = Setting.get('web_app_manifest_url', '')
output << tag("link", rel: 'manifest', href: manifest_url) if manifest_url.present?

output.join("\n").html_safe.presence
end

# Returns true if the current_path starts with the given value
Expand Down
9 changes: 0 additions & 9 deletions app/stylesheets/bundles/smartbanner.scss

This file was deleted.

5 changes: 0 additions & 5 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@

css_bundle(:instructure_eportfolio) if @eportfolio_view === true

if request.user_agent.to_s =~ /Android/i
js_bundle :smartbanner
css_bundle :smartbanner
end

content_for :head, include_common_stylesheets

-%>
Expand Down
1 change: 0 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"ic-modal": "0.1.1",
"ic-droppable": "~0.1.0",
"ic-sortable": "0.0.2",
"jquery.smartbanner": "https://github.com/jasny/jquery.smartbanner.git#8b3810210256ea2760012e18083c43792c2a4146",
"react": "0.14.8",
"react-modal": "1.3.0",
"tinymce": "4.1.9",
Expand Down
12 changes: 0 additions & 12 deletions public/javascripts/bower/jquery.smartbanner/.bower.json

This file was deleted.

19 changes: 0 additions & 19 deletions public/javascripts/bower/jquery.smartbanner/LICENSE

This file was deleted.

58 changes: 0 additions & 58 deletions public/javascripts/bower/jquery.smartbanner/README.md

This file was deleted.

Binary file not shown.
28 changes: 0 additions & 28 deletions public/javascripts/bower/jquery.smartbanner/jquery.smartbanner.css

This file was deleted.

Loading

0 comments on commit a444b5f

Please sign in to comment.