These are chat archives for mithriljs/mithril.js

24th
Apr 2016
James Forbes
@JAForbes
Apr 24 2016 01:56
@StephanHoyer that's amazing! I'm going to try it out
Bradley Stafford
@bradstaff
Apr 24 2016 08:51
@StephanHoyer Mad props! That's awesome!
mpfau
@mpfau
Apr 24 2016 08:52
@ArthurClemens Thanks for that hint (mithril-infinite)! Unfortunately, it has some clipping problems when scrolling becomes fast on mobile devices.
Arthur Clemens
@ArthurClemens
Apr 24 2016 08:53
@mpfau I haven’t seen that. Does it occurs with the examples?
mpfau
@mpfau
Apr 24 2016 09:57
@ArthurClemens Just had another look at it. I played with the grid example and the alternate coloring (black/white) together with late updates (diffing and updating the dom is too slow on mobiles during native scroll) make it look like there are clipping problems
@ArthurClemens I like how you implemented paging. One minor problem is currently that the "Pos1" and "End" keys do not work as expected. However, a perfect handling for that would probably require fixed element heights and the information about how many elements are in a list
Arthur Clemens
@ArthurClemens
Apr 24 2016 10:03
what is the problem that you see?
mpfau
@mpfau
Apr 24 2016 10:04
If I disable the alternate coloring, it is just that the list updates are too slow
Or do you mean "Pos1" and "End"? The problem there is, that the list does not jump to the end or first position but somewhere in the middle
Arthur Clemens
@ArthurClemens
Apr 24 2016 10:06
yes, Pos1 and End. I don’t understand what you mean: I don’t use those variables.
mpfau
@mpfau
Apr 24 2016 10:08
A sorry, the keys are called "Home" and "End" on english keyboards: http://content.gcflearnfree.org/topics/223/KeyboardRight_cropped_resiz.jpg
Arthur Clemens
@ArthurClemens
Apr 24 2016 10:08
aha. I don’t have those on my keyboard.
If you want those, you need to use “fixed height"
see the demo with that name
otherwise there is no end to an infinite list
mpfau
@mpfau
Apr 24 2016 10:17
Thanks, that looks better. But updates are still too slow...
That list does not feel "native" on mobiles :(
Arthur Clemens
@ArthurClemens
Apr 24 2016 10:18
do you have any examples where that is achieved on mobile?
mpfau
@mpfau
Apr 24 2016 10:20
I experimented with rendering a page as repeated svg background in order to make scrolling feel more smoothly. That helps a lot but there are still situations where the browser isn't even able to render the background-images fast enough. And there are some gotchas (e.g. safari doesn't render the svg used for the background-image if you use certain css styles like translate3d)
Another idea would be to limit the maximum scroll speed (like many native apps do). Unfortunately, that is not possible when using native scroll in the webview...
Arthur Clemens
@ArthurClemens
Apr 24 2016 10:30
I am getting pretty good performance on iOS Safari. For slow devices I might need to use explicit paging.
mpfau
@mpfau
Apr 24 2016 10:35
Just tested on iOS and it looks better than on android (nexus 4) :)
santi
@srlopez
Apr 24 2016 20:43
Hi @ArthurClemens i have been working with your polythene-setup. I'd like to made some thing similar to your polythene.js.org. Is available the code of the layout of your polythene.js.org?
Thanks
Arthur Clemens
@ArthurClemens
Apr 24 2016 20:45