Skip to content
Snippets Groups Projects

Resolve #3523725 "Htmx attributes"

Open Shawn Duncan requested to merge issue/drupal-3523725:3523725-htmx-attributes into 11.x
1 unresolved thread

Closes #3523725

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Lee Rowlands
  • Lee Rowlands
  • Lee Rowlands
  • Lee Rowlands
  • Lee Rowlands
  • Lee Rowlands
  • Looking great, mostly just some comments about taking things further from someone with no exposure to HTMX. Happy for you to say "nah you won't ever need that" if that's the case.

    Couple of questions - one from an escaping/encoding point of view and one about test speeds

    Nice one!

  • Lee Rowlands left review comments

    left review comments

  • Shawn Duncan added 1 commit

    added 1 commit

    • a18dacab - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Shawn Duncan added 4 commits

    added 4 commits

    • 85e4e81a - Refactor Kernel test into Unit test
    • 349ff643 - Support array of values in HtmxAttribute::selectOutOfBand
    • 4f93b37b - Support array of values in HtmxAttribute::trigger
    • b361f6e5 - Support array of values in HtmxAttribute::params.

    Compare with previous version

  • Shawn Duncan added 1 commit

    added 1 commit

    Compare with previous version

  • Shawn Duncan added 1 commit

    added 1 commit

    • 12c33593 - refactor TwigExtensionTest.php

    Compare with previous version

  • Shawn Duncan added 1 commit

    added 1 commit

    • c5123454 - refactor string value filtering

    Compare with previous version

  • Shawn Duncan added 1 commit

    added 1 commit

    Compare with previous version

  • Shawn Duncan resolved all threads

    resolved all threads

  • Shawn Duncan added 1 commit

    added 1 commit

    • 15f65fb0 - remove QuoteSwitchingRenderTrait.php

    Compare with previous version

  • Shawn Duncan resolved all threads

    resolved all threads

  • 293 *
    294 * @param string $strategy
    295 * The swap strategy.
    296 * @param bool $ignoreTitle
    297 * Instruct HTMX not to swap in the page title from the request.
    298 *
    299 * @return $this
    300 * Returns this object to allow chaining methods.
    301 *
    302 * @see https://htmx.org/attributes/hx-swap/
    303 */
    304 public function swap(string $strategy, bool $ignoreTitle = TRUE): HtmxAttribute {
    305 // HTMX defaults this behavior to FALSE, that is it replaces page title.
    306 // We believe our most common use case is to not change the title.
    307 if ($ignoreTitle) {
    308 $strategy .= ' ignoreTitle:true';
    • that should be a default in the JS no?

    • htmx does have a config option for this, but I think we would still want to give our developers the ability to set it to true.

      Do you think we should switch the default to false using htmx.config.ignoreTitle and switch the parameter default here as well?

    • Please register or sign in to reply
    Please register or sign in to reply
    Loading