Skip to content
Snippets Groups Projects

Include a11y_autocomplete_widget and JS dependency using foxy/vite method from #frontend_bundler_initiative

3 unresolved threads

Closes #3472824

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
11 11 done
12 12
13 13 composer config repositories.drupal composer https://packages.drupal.org/8
14
15 # Temporary command to fetch foxy-compatible a11y_autocomplete_element module
16 # while integration under development.
17 composer config repositories.drupal/a11y_autocomplete_element '{"type": "git", "url": "https://git.drupalcode.org/issue/a11y_autocomplete_element-3472705.git"}'
  • Normally we'd accomplish this by patching Foxy, in drupal_cms_patches/composer.json.

  • How would patching foxy help here? The purpose of this is to have the development branch of a11y_autocomplete_element with its composer.json/package.json files in place before the foxy plugin runs as part of composer post-install

  • Oh.... just use a patch instead of a dev branch, right. I can try that, the foxy plugin is kinda finicky and it may not work.

  • Yeah I tried adding the patch, but because it's in a recipe it doesn't get applied soon enough...

  • Ah, I see what you mean. Yeah, if composer.json itself needs to be patched, then the only thing we could do here is have the change committed upstream before we could add this to Drupal CMS, sadly. We cannot rely on issue fork repositories because they would only apply to a local Drupal CMS development set-up, rather than "real" projects.

    Edited by Adam G-H
  • I don't intend for this to be merged, it's here so we can see it working. Commit would definitely have to wait until the module has a compatible release

  • Please register or sign in to reply
  • 1 web_root: web
    • This is troublesome. If the web root ever changes, or just is different, this won't work.

      Also, recipes can't override simple config like this. This would need to be done as a simpleConfigUpdate config action.

      I think this is also a clear case where the recipe system would need to provide the web root dynamically - that would necessitate core changes, which we could certainly do with a patch.

    • Absolutely, the foxy module is in alpha and I've been asking for feedback, this is the first constructive feedback there has been, so yay! Let's find another way to handle this.

      I tried myriad ways to find the web root programatically and failed.

    • Ah, there are ways :) I could submit an MR to Foxy to detect the web root programmatically if that will be helpful.

    • Max Pogonowski changed this line in version 4 of the diff

      changed this line in version 4 of the diff

    • Please register or sign in to reply
  • Adam G-H
  • Adam G-H
  • added 1 commit

    • e3520b83 - Move vite config into project template

    Compare with previous version

  • added 1 commit

    • a6490641 - Ignore vite config when it is copied to project root.

    Compare with previous version

  • 1 import { defineConfig } from 'vite'
    • This file could use a top-level comment explaining what it does, and whether it is safe to edit. It's also worth noting that, if this is part of the project template, it can never be updated later, since project templates aren't update-able...not sure if that changes the calculus here.

    • We would be locking users into using vite over other bundlers with this combined with the composer.json post-update/install scripts. I think it would be better to let people opt in to this stuff and edit it later, foxy supports yarn and bun for example. I'm just not sure how to go about it, this whole MR is a launching point, not the end product

    • Please register or sign in to reply
  • added 1 commit

    Compare with previous version

  • added 1 commit

    • f9c94d31 - Move composer entries to base recipe

    Compare with previous version

  • added 1 commit

    • 6dd99af5 - Remove foxy web root setting

    Compare with previous version

  • Please register or sign in to reply
    Loading