8000 Comparing v3.2.1...v3.2.2 · symfony/stimulus-bridge · GitHub
[go: up one dir, main page]

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: symfony/stimulus-bridge
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.2.1
Choose a base ref
...
head repository: symfony/stimulus-bridge
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.2.2
Choose a head ref
  • 6 commits
  • 13 files changed
  • 2 contributors

Commits on Jul 13, 2022

  1. Configuration menu
    Copy the full SHA
    28cf851 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2022

  1. Configuration menu
    Copy the full SHA
    869519d View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2023

  1. minor #76 Fix README: registering lazy controllers in bootstrap.js (j…

    …msche)
    
    This PR was merged into the main branch.
    
    Discussion
    ----------
    
    Fix README: registering lazy controllers in bootstrap.js
    
    Commits
    -------
    
    869519d Fix README: registering lazy controllers in bootstrap.js
    weaverryan committed Jan 10, 2023
    Configuration menu
    Copy the full SHA
    7ce6105 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. Configuration menu
    Copy the full SHA
    0d77e41 View commit details
    Browse the repository at this point in the history
  2. bug #81 [Bug] Removing unnecessary Promise in object of controllers t…

    …o be loaded (weaverryan)
    
    This PR was squashed before being merged into the main branch.
    
    Discussion
    ----------
    
    [Bug] Removing unnecessary Promise in object of controllers to be loaded
    
    Hi!
    
    Subtle change. Previously, the webpack loader parsed `controllers.json` (which eventually becomes the `symfonyControllers` variable in `index.ts`) into something that exported an object where each key was a promise - something like:
    
    ```js
    export default {
        'symfony--ux-autocomplete--autocomplete': import(/* webpackMode: \"eager\" */ '`@symfony`/ux-autocomplete/dist/controller.js')
    }
    ```
    
    Then, in `startStimulusApp()`, we called used `.then()` to wait for that promise to resolve then registered its resolved value:
    
    ```js
    symfonyControllers[controllerName].then((module) => {
        application.register(controllerName, module.default);
    });
    ```
    
    This is totally unnecessary and a relic of how this library was originally built. It also causes the UX controllers to be registered *late*. It's barely noticeable, but in practice, instead of the UX controllers being registered BEFORE the DOM is ready, they are registered after. This actually causes a problem with a new feature from LiveComponents.
    
    The new parsed version of `controllers.json` from the loader looks much simpler:
    
    ```diff
    + import controller_0 from '`@symfony`/ux-autocomplete/dist/controller.js';
    
    export default {
    -    'symfony--ux-autocomplete--autocomplete': import(/* webpackMode: \"eager\" */ '`@symfony`/ux-autocomplete/dist/controller.js')
    +    'symfony--ux-autocomplete--autocomplete': controller_0,
    }
    ```
    
    (I don't show it here, but lazy controllers have a similar simplification).
    
    In short: it's a bug fix & an easy win. Controllers will load slightly earlier as a result.
    
    Thanks!
    
    Commits
    -------
    
    0d77e41 [Bug] Removing unnecessary Promise in object of controllers to be loaded
    weaverryan committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    b49d87b View commit details
    Browse the repository at this point in the history
  3. Tagging 3.2.2

    weaverryan committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    d58dc50 View commit details
    Browse the repository at this point in the history
Loading
0