Code Monkey home page Code Monkey logo

Comments (5)

swanson avatar swanson commented on July 21, 2024 4

I think we should wait for some real world cases that demand this before preemptively adding such configurations. I mean, I can imagine this maybe useful to some, but I'd like to see a real case before we add the additional weight.

Yeah, my only real world case is that I have a large app with lots of forms -- some are form_with, some are form_for, some are remote, some are local -- and I would like to upgrade TurboLinks to TurboDrive but...it's a big undertaking to audit every form (there are hundreds). So I have to undertake that effort before I could start using Turboframes, Streams, etc

from turbo.

dhh avatar dhh commented on July 21, 2024 3

Yeah, that sounds fair. I'd be fine seeing a toggle for each element.

from turbo.

dhh avatar dhh commented on July 21, 2024

I think we should wait for some real world cases that demand this before preemptively adding such configurations. I mean, I can imagine this maybe useful to some, but I'd like to see a real case before we add the additional weight.

from turbo.

santib avatar santib commented on July 21, 2024

I was thinking exactly the same. In my case I'd like to be able to:

  • Turn on/off Turbo Drive (default: on). Why? Because I'd be able to start using Turbo Frames and Turbo Streams right away, even before making sure that none of my forms break with Turbo Drive.
  • Turn on/off Turbo Streams via Websockets (default: on). Why? Because I'd be able to use almost all of Turbo without needing to care about Redis and Websockets. (Maybe this toggle should be on turbo-rails ?)

I don't know if this would be feasible with the current implementation (didn't check yet). But at least from a developer's point of view would be clear IMO.

from turbo.

swanson avatar swanson commented on July 21, 2024

This has been resolved in https://github.com/hotwired/turbo/releases/tag/v7.0.0-beta.2 -- opt-out of the form behavior with data-turbo=false on a root element and override on a per form / page basis.

If you want to only opt-out of forms, you can put data-turbo=false in your form builder.

from turbo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.