turbolinks-compatibility icon indicating copy to clipboard operation
turbolinks-compatibility copied to clipboard

Turbolinks 5 compatibility

Open sdhull opened this issue 8 years ago • 8 comments

First off, thanks for building this excellent resource! It has saved me some time.

Second, as you probably know, the new version of Turbolinks uses completely different events. So none of the solutions you have here are applicable for Turbolinks 5.

I've reworked the Twitter & FB solutions to work with Turbolinks 5. Maybe start a turbolinks-5 branch or something that I could submit PRs to? Or a separate repo for turbolinks 5?

sdhull avatar Aug 13 '16 22:08 sdhull

I would vote for starting a new repo so that people using the old version of turbolinks still have this as a resources.

Do you have your twitter & FB solutions up so I can look at them?

andyrsmith avatar Aug 17 '16 19:08 andyrsmith

@andyrsmith Uhh yeah here you go: facebook twitter

sdhull avatar Aug 22 '16 18:08 sdhull

@sdhull Would you have an example with loading a timeline widget? Also does it work with the back button. For the only I manage to make it work is to disable turbolinks cache for these pages

borisrorsvort avatar Mar 07 '17 13:03 borisrorsvort

@borisrorsvort not sure what you mean by "a timeline widget"? Is there something specific you're trying to make work?

It's been on my to-do list to do something about this, either open a PR on this repo or start a new repo. I'm inclined to open a PR here as long as @reed is still interested in reviewing & accepting PRs here.

sdhull avatar Mar 07 '17 18:03 sdhull

I'll review anything you submit.

reed avatar Mar 07 '17 19:03 reed

@reed @andyrsmith can we have another branch for T5 and at some point make the switch when T5 will be mainstream. Second option would be to create another turbolinks-classic-compatibility with this content to follow the official Turbolinks convention.

@sdhull Main problems I have now with twitter timelines (https://dev.twitter.com/web/javascript/creating-widgets#create-timeline) are with the back button behaviour, as it leaves an empty iframe.

borisrorsvort avatar Mar 07 '17 19:03 borisrorsvort

@borisrorsvort ok when I get home from work today I'll check out the timelines widget.

As for a T5 branch, I'm thinking instead that since this is a gh pages project, we should instead perhaps just add a section for turbolinks 5, or something like that. Add it 5/4 to the navigation.

sdhull avatar Mar 07 '17 19:03 sdhull

@sdhull I added your solutions in the pr https://github.com/reed/turbolinks-compatibility/issues/75

borisrorsvort avatar Mar 08 '17 10:03 borisrorsvort