The API at https://github.com/turbolinks/turbolinks-classic would not make sense to match (and . But since then, https://github.com/turbolinks/turbolinks was released, which provides a simpler API, with a smaller surface. This API should be totally feasible to support.

CommentFileSizeAuthor
#2 official-turbolinks-2692343-2.patch35.38 KBWim Leers
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers created an issue. See original summary.

Wim Leers’s picture

Title: Compatibility with official Turbolinks API » Use the official Turbolinks JS or rename the project
Status: Active » Reviewed & tested by the community
FileSize
35.38 KB

After I tweeted about this module (https://twitter.com/wimleers/status/712313338533912576), I got responses from Sam Stephenson (employee at Basecamp, one of the main authors of Turbolinks 5 — https://twitter.com/sstephenson/status/712318659897655296) and later even from DHH himself (founder of Basecamp & Rails — https://twitter.com/dhh/status/712614476072284160).

They aren't happy with this Drupal module being called Turbolinks. We didn't see any harm calling it that, because we interpreted "Turbolinks" as an idea (just like quick sort, A*, BigPipe etc are ideas), and this is just another implementation. BigPipe was coined by Facebook, and there are implementations for node.js, PHP and Scala (that last one at LinkedIn even). They are either called "BigPipe" directly, or at least use that term in their function names/class names/docs.

But, they consider it a product, not an idea:

Turbolinks is a specific product, not a generic concept. You’re not “advancing the idea,” you’re saying it’s something else.

— https://twitter.com/sstephenson/status/712619025331650561

All of this despite the clear attribution on the project page: https://www.drupal.org/project/turbolinks

I offered to rename it to Turbolinks for Drupal, match their API, but none of that mattered. The only way I'd be allowed to call it Turbolinks was:

You may use Turbolinks in the name if and only if your project provides a server-side interface to the official Turbolinks JS lib.

— https://twitter.com/sstephenson/status/712332970154000385

Despite clearly being collaborative (and simply renaming the project is impossible, drupal.org doesn't allow that), I was soon receveing threatening tweets:

Please rename your project immediately. This is the last time I’ll ask.

https://twitter.com/sstephenson/status/712410072551260160


I had two choices left:

  1. use the official turbolinks JS
  2. rename the project

So, I tried to make this use the JS library at https://github.com/turbolinks/turbolinks. And I can get it to work partially. But there's lots of problems:

  1. JS is not executed, not even after forcing all JS to be loaded from the header. This is a known bug: https://github.com/turbolinks/turbolinks/issues/9
  2. when clicking a link that causes the theme to change, we have to be able to inspect the response and then still trigger a full reload if necessary. Because turbolinks:request-end nor turbolinks:before-render are cancelable, this is impossible.

Finally, this means once again replacing the entire <body> and detaching/attaching Drupal behaviors (i.e. run all JS) on them. Which means it defeats a significant portion of the purpose: improve perceived speed by having the browser do less work. i.e. using the official Turbolinks JS significantly increases the amount of work the browser has to. This makes sense for that library because it wants to work on almost any HTML. But in the case of Drupal, we can take advantage of its cacheability metadata to automatically figure out which portions of the page change.

Therefore I will be renaming this Drupal module to something else. Name TBD.

Dave Reid’s picture

Turbollama?

jmolivas’s picture

turbulence?

darol100’s picture

If you current implementation works I do not think it makes sense to actually force to use the Turbolinks API just for the name. I think it makes more sense to actually rename the project. I do not think we should be concentring on the "Turbo" for the name instead we should concentrating on the links because what it does is makes links faster.

What about Fastlinks ?

Wim Leers’s picture

Status: Reviewed & tested by the community » Fixed

We decided to rename it to RefreshLess (refreshless).

This project (Turbolinks) had:

  1. its maintenance status set to Unsupported
  2. its development status set to Obsolete
  3. its project page updated to reflect this change/news: https://www.drupal.org/project/turbolinks with an announcement in bold red
  4. its development snapshot unpublished: https://www.drupal.org/node/2692263
  5. its alpha1 release unpublished: https://www.drupal.org/node/2692267

And instead, there now is https://www.drupal.org/project/refreshless, with a functionally identical alpha2 release: https://www.drupal.org/node/2693143. All issues other than this one have been moved to that project's issue queue.

Wim Leers’s picture

Version: 8.x-1.x-dev »

Also note that the code in refreshless has exactly zero mentions of Turbolinks. Download and extract https://ftp.drupal.org/files/projects/refreshless-8.x-1.0-alpha2.tar.gz, you'll find zero occurrences of turbo.

Nick_vh’s picture

WimLeers++ :)

Pol’s picture

Pfff such a shame attitude from those guys.

"This is the last time I’ll ask" => Come on man, or what !?

Anyway, I'm glad you've found a way !

darol100’s picture

Pfff such a shame attitude from those guys.

"This is the last time I’ll ask" => Come on man, or what !?

@Pol, I was asking that myself.

izus’s picture

WimLeers++

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.