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

mobile styling for iOS #179

Closed
JoeGermuska opened this issue Jul 25, 2015 · 19 comments
Closed

mobile styling for iOS #179

JoeGermuska opened this issue Jul 25, 2015 · 19 comments
Assignees

Comments

@JoeGermuska
Copy link
Member

using this URL http://cdn.knightlab.com/libs/timeline3/latest/embed/index.html?source=1cWqQBZCkX9GpzFtxCWHoqFXCHg-ylTVUWlnrdYMzKUI&font=Default&lang=en&height=650

gets this in the iOS simulator on initial load
image

image

@JoeGermuska JoeGermuska added this to the cutover milestone Jul 25, 2015
@zachwise
Copy link
Member

This is the byproduct of the change we made yesterday to fix the font issue.

@luokebi
Copy link

luokebi commented Jul 27, 2015

I wonder wether it is because IOS safari doesn't support flex-direction, should use -webkit-flex-direction.

@zachwise
Copy link
Member

Seems to be fine:
iOS Chrome:
img_7369

iOS Safari:
img_7370

@espressodaily
Copy link

still having problem with embed code.
I created a timeline and tried it out using the link preview and it works fine. It also works fine on iPhone and iPad.
I then used the embed code on my page but the result is no longer responsive on mobile devices. I gather I need supporting code in the hosting page

sdo-demo-main-14e989d9b88_force_com_ignite_kufnerignites
timelinejs_embed2
Google Spreadsheet
https://docs.google.com/spreadsheets/d/1YPZU7RylFPvky0k2KXOEaBILWyxjPmKJXBeAL3EeN2k/edit#gid=0

Attached screenshots. I used google chrome developer tools to show you as it works the same on actual device.

LINK PREVIEW FROM YOUR SITE
http://cdn.knightlab.com/libs/timeline3/latest/embed/index.html?source=1YPZU7RylFPvky0k2KXOEaBILWyxjPmKJXBeAL3EeN2k&font=Default&lang=en&height=650

LINK TO MY SITE
http://sdo-demo-main-14e989d9b88.force.com/ignite/kufnerignites

@zachwise
Copy link
Member

@espressodaily you need to set the embed to 100% and adjust your own css appropriately.

@zachwise
Copy link
Member

@espressodaily you should probably set the viewport also:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

@espressodaily
Copy link

Thanks.
Can you provide proper style code so I can insert?

@zachwise
Copy link
Member

@espressodaily just take a look at any of our example pages https://github.com/NUKnightLab/TimelineJS3/tree/master/compiled/examples

html, body {
        height:100%;
        width:100%;
        padding: 0px;
        margin: 0px;
      }

@espressodaily
Copy link

Thanks. I have that. Is there other code I should be using to properly handle iOS devices? Sorry, not really much experience with responsive sites.

@espressodaily
Copy link

that styling alone doesn't make a difference.

@luokebi
Copy link

luokebi commented Jul 29, 2015

@zachwise I think the mobile style doesn't look good. The portrait style on mobile seems to be better.
image

@hbillings
Copy link
Contributor

On my 5S and my iOS simulator, this is how the mobile styles look:
screen shot 2015-07-31 at 11 21 14 am

Not sure if that layout is supposed to be that way, or if the arrows are supposed to disappear. Either way, the headlines definitely need help. (Related: #78)

@zachwise
Copy link
Member

The side by side layout is the result of flex styles on mobile safari not being obeyed. It will be fixed soon

@hbillings
Copy link
Contributor

Awesome, thanks. (Also rendering that way on mobile Chrome, though I'm using an old version. I'll try updating and see what happens.)

@zachwise
Copy link
Member

Chrome uses safari rendering.

@hbillings
Copy link
Contributor

Ah, it's a mobile webkit issue. Gotcha.

@espressodaily
Copy link

So the embed code won't work properly on it's own on a mobile device?
Can you guys give me the styling I should use on the embedding site for this to work?
I tried zachwise suggestion and it did nothing.

html, body {
height:100%;
width:100%;
padding: 0px;
margin: 0px;
}

@espressodaily
Copy link

@zachwise just to be clear. it looks fine on your linkpreview with URL to http://cdn.knightlab.com/....
but still not when I embed on my site. I understand that I may need to add more style to support - just want to make sure you know what I see.

@hbillings
Copy link
Contributor

@espressodaily Make sure your iframe uses width="100%". If that doesn't do it, please post to our help forum at https://knightlab.zendesk.com/ instead of here on GitHub (which we use mostly for bug tracking). Thanks!

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

No branches or pull requests

5 participants