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

Better support for saving to iOS home screen #393

Merged
merged 8 commits into from
Jan 24, 2018

Conversation

iamthechad
Copy link
Contributor

Make the site behave more like an app when saved to home screen
Refs #392

Make the site behave more like an app when saved to home screen
Refs MLTSHP#392
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 72.138% when pulling f8ad0b4 on iamthechad:apple-mobile-enhancement into b6fb6cd on MLTSHP:master.

static/50x.html Outdated
@@ -9,6 +9,9 @@
<link type="text/css" rel="stylesheet" href="/static/css/main.css">
<link type="text/css" rel="stylesheet" href="/static/css/account.css">
<link rel="apple-touch-icon" href="/static/images/apple-touch-icon.png">
<!-- Behave more like an app when saved to home screen in iOS -->
Copy link
Member

Choose a reason for hiding this comment

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

Does this actually accomplish anything on 500 pages? Seems like we only need this change for base.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It may only be needed for base.html, but I added it here for completeness. I suppose there's a possibility that you've saved the app to the home screen and you get a 500 next time you open it. In that case, it seems like these additions would apply.

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding this to any page that can potentially load instead of base.html makes sense to me.

Add space to try triggering the the CI
Revert previous change. Trying to trigger CI.
Hopefully this triggers CI
@iamthechad
Copy link
Contributor Author

Is there any interest in this? It's a pain for me when browsing on mobile, but maybe I'm the only one.

@spaceninja
Copy link
Member

Whoops! Sorry for letting this sit idle for so long!

@bradchoate: I don't have an easy way to test a pull request anymore, but what this commit does is tell iOS devices to treat the site like an app — it'll run in full-screen and have a black status bar. It'll also stop mobile safari from opening a new tab when launching from a shortcut, as outlined in #392.

@iamthechad said:

I checked some other sites I've saved this way. The apple-mobile-web-app-capable flag only seems to affect apps saved to the home screen - loading within Safari itself behaves as expected.

This seems like an innocuous change to me. What do you think?

Details here: https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html

@bradchoate bradchoate merged commit 06f2190 into MLTSHP:master Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants