schizanon,
jaffathecake,
@jaffathecake@mastodon.social avatar

@schizanon the two things seem really different to me, but maybe I lack imagination

schizanon,

@jaffathecake well imagine you had a normal paginated list view; there's a "next page" link to another URL. What if the page just automatically navigates when you get to the bottom? Couldn't you like transition the next page into the bottom of the first page? (^ has not used the ViewTransitions API yet)

I am building a Mastodon client and I am loathe to implement an infinite scroller. I feel like pagination is nice because you'd have a url to link to particular places in the timeline.

jaffathecake,
@jaffathecake@mastodon.social avatar

@schizanon I'm not sure what it means to "transition the next page into the bottom of the first page", but give it a try! The view transitions API is pretty flexible, so maybe there's something there that I can't imagine

schizanon,

@jaffathecake

does some research

Oh, MPA View Transitions still aren't a thing huh? I was thinking they were a thing...

jaffathecake,
@jaffathecake@mastodon.social avatar

@schizanon they're behind a flag, but still lots of API design to do

schizanon,

@jaffathecake oh good! I'll take that flag for a spin today! Got a good how-to?

jaffathecake,
@jaffathecake@mastodon.social avatar
schizanon,

@jaffathecake thanks, and thanks @davatron5000

schizanon,

@jaffathecake @davatron5000 I did it!!

https://diode.zone/w/22AEqESiKdHRwMCF3S1kE6

It kinda works, but there's some jank.

It transitions from the column view to the detail view pretty well, but it doesn't respect my animation-duration (which is set to 10s). Also, there's a flash of... differently styled content.

The transition back to the column view takes an extra long time, partially because I have disabled the cache so it's reloading a lot of content I imagine.

schizanon,

@jaffathecake @davatron5000 I'm sure it's my styles; the column view uses column-count to achieve a "masonry" effect, which causes a lot of weird reflows. I'm using block-size: max-content to set the width of the .h-entrys but I'm not totally clear on how ::view-transition-new/old work, or when they get applied.

Any tips on debugging this; is there some way to slow it down with devtools and step through the style changes?

jaffathecake,
@jaffathecake@mastodon.social avatar
schizanon,
  • All
  • Subscribed
  • Moderated
  • Favorites
  • webdev
  • DreamBathrooms
  • ngwrru68w68
  • modclub
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • GTA5RPClips
  • JUstTest
  • tacticalgear
  • normalnudes
  • tester
  • osvaldo12
  • everett
  • cubers
  • ethstaker
  • anitta
  • provamag3
  • Leos
  • cisconetworking
  • megavids
  • lostlight
  • All magazines