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

Bad mobile formatting with TouchKit 5 #17

Open
steinarb opened this issue May 23, 2018 · 5 comments
Open

Bad mobile formatting with TouchKit 5 #17

steinarb opened this issue May 23, 2018 · 5 comments

Comments

@steinarb
Copy link

I'm in the process of porting a Vaadin7/TouchKit4 application to Vaadin8/TouchKit5.

I'm at the stage where the application looks similar to the Vaadin7/TouchKit4 version when displaying in a regular web browser on a PC.

However, on a mobile device, the formatting is all squashed up (the font is way too small, for one thing).

The Vaadin7/TouchKit4 version looks like this (this is what it's supposed to look like):
Ukelonn application on Vaadin 7 with TouchKit 4

The Vaadin8/TouchKit5 version looks like this:
Ukelonn application on Vaadin 8 with TouchKit 5

What might cause this layout difference? And why do I see it only on mobile devices?

The Vaadin7/TouchKit4 version of the code:
https://github.com/steinarb/ukelonn/blob/master/ukelonn.bundle/src/main/java/no/priv/bang/ukelonn/impl/UkelonnUI.java#L30
https://github.com/steinarb/ukelonn/blob/master/ukelonn.bundle/src/main/java/no/priv/bang/ukelonn/impl/UserView.java#L43

The Vaadin8/TouchKit5 version of the code:
https://github.com/steinarb/ukelonn/blob/work/using-vaadin-with-vaadin8/ukelonn.bundle/src/main/java/no/priv/bang/ukelonn/impl/UkelonnUI.java#L29
https://github.com/steinarb/ukelonn/blob/work/using-vaadin-with-vaadin8/ukelonn.bundle/src/main/java/no/priv/bang/ukelonn/impl/UserView.java#L46

I've used chrome development tools simulating an iPhone 5 to make the screen captures, but it is similar to what I see on real mobile devices.

@steinarb
Copy link
Author

TouchKit 5 has a base.css that says "This file contains essential stuff from base theme.", and that contains a lot of commented out stuff.

Is any of the comment out stuff related to formatting on mobile devices?

@mstahv
Copy link

mstahv commented Jun 7, 2018

Related to #15 ?

@steinarb
Copy link
Author

steinarb commented Jun 7, 2018

I actually figured out a way to fix this last night: go back to where I started with my servlet extending the TouchKitServlet
https://github.com/steinarb/ukelonn/blob/56f292623b741b89f17abf4a10eabd1dd0d106c3/ukelonn.bundle/src/main/java/no/priv/bang/ukelonn/impl/UkelonnServlet.java#L48
instead of the VaadinServlet
https://github.com/steinarb/ukelonn/blob/0d20b044650ba487c42b9864ea46cab493851af6/ukelonn.bundle/src/main/java/no/priv/bang/ukelonn/impl/UkelonnServlet.java#L46

Early on in the Vaadin 8 conversion I couldn't see any difference between extending the VaadinServlet versus extending the TouchKitServlet, so I just extended the VaadinServlet with the theory of keeping things as simple as possible.

But extending the TouchKitServlet is necessary to get mobile formatting, and even makes mobile formatting work (more or less) for the valo theme.

So I guess this issue can be resolved as not a bug.

@mstahv
Copy link

mstahv commented Jun 8, 2018

And related #15 and #16 as well?

@steinarb
Copy link
Author

steinarb commented Jun 8, 2018

Yes, I'm guessing it's probably related to #15 and #16.

But I don't have any evidence to back this guess.

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

2 participants