Integrate with HTMX

Created on 26 October 2023, 12 months ago
Updated 30 November 2023, 11 months ago

Problem/Motivation

I'm postponing this on #3397049: Integrate with AJAX β†’ , and we might not need this for a while even after that issue is done, but eventually we'll probably need the same fix that's applied there to also be applied when HTMX is used on a site. Conceptually, HTMX is just like Drupal's AJAX, but is more modern, standardized, and documented than Drupal's custom-made AJAX system. Drupal core doesn't use HTMX, but perhaps we'll replace AJAX with HTMX in Drupal core some day and even if we don't, increasingly contrib and custom modules and sites might want to start using HTMX over Drupal's AJAX.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Postponed

Version

1.0

Component

JSX Theme Engine

Created by

πŸ‡ΊπŸ‡ΈUnited States effulgentsia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @effulgentsia
  • πŸ‡ΊπŸ‡ΈUnited States effulgentsia
  • πŸ‡ΊπŸ‡ΈUnited States effulgentsia
  • πŸ‡ΊπŸ‡ΈUnited States cosmicdreams Minneapolis/St. Paul

    I'm very interested on where this investigation might take you @effulgentsia. I've been exploring the potential of HTMX myself and want to make a few demos to see what's possible.

    Do you have any Next Steps to pursue here?

  • πŸ‡ΊπŸ‡ΈUnited States effulgentsia

    Hey @cosmicdreams! Great to see you here :)

    Are you more interested in HTMX as it relates to Drupal core? Or how it relates to the (still in very early stage development) JSX theme engine (this issue)? If the former, I opened 🌱 [Plan] Gradually replace Drupal's AJAX system with HTMX Active . For that issue, I think a possible next step would be to pick one place that currently uses AJAX in core (I'd probably suggest taking a straightforward example like ConfigSingleExportForm rather than starting with Field UI or Views UI) and trying to convert it to HTMX and see what you end up needing to add to such an MR (besides the HTMX library itself) to make it work.

    For this issue, I currently have it postponed on #3397049: Integrate with AJAX β†’ , because the first step is to make the JSX theme engine work with ajax at all. Once we figure out how to do that, it will inform how to make it work with htmx as well. I expect the solution with respect to JSX theme engine to be very similar between ajax and htmx, since the underlying problem is the same: where to intercept the response before it's added to the DOM so that we can manipulate it first (for example, render it with React or whichever JSX renderer is being used).

  • πŸ‡ΊπŸ‡ΈUnited States cosmicdreams Minneapolis/St. Paul

    I was thinking about doing some demos for 🌱 [Plan] Gradually replace Drupal's AJAX system with HTMX Active

Production build 0.71.5 2024