Skip to content

DEV: Make outletArgs available as regular arguments in PluginOutlet #32742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 19, 2025

Conversation

davidtaylorhq
Copy link
Member

@davidtaylorhq davidtaylorhq commented May 15, 2025

Historically, plugin outlet arguments had to be accessed like @outletArgs.foo in templates, or this.args.outletArgs.foo in javascript. Following this commit, outletArgs will be passed to connectors at the top level, so they can be accessed like @foo in templates or this.args.foo in JS.

@outletArgs remains available for compatibility, and there are no plans to remove it.

For custom classic component connectors, these new arguments may clash with functions/fields defined on the component class. This rare case will be automatically detected, protected against, and a deprecation will be shown.

@davidtaylorhq davidtaylorhq force-pushed the plugin-outlet-curry-args branch 4 times, most recently from 08d84e4 to 6a4f386 Compare May 16, 2025 16:38
@davidtaylorhq davidtaylorhq marked this pull request as ready for review May 16, 2025 16:38
Historically, plugin outlet arguments had to be accessed like `@outletArgs.foo` in templates, or `this.args.outletArgs.foo` in javascript. Following this commit, outletArgs will be passed to connector components at the top level, so they can be accessed like `@foo` in templates or `this.args.foo` in JS.

`@outletArgs` remains available for compatibility, and there are no plans to remove it.

For custom classic component connectors, these new arguments may clash with functions/fields defined on the component class. This rare case will be automatically detected, protected against, and a deprecation will be shown.
@davidtaylorhq davidtaylorhq force-pushed the plugin-outlet-curry-args branch from 6a4f386 to 1337a66 Compare May 16, 2025 16:40
…plugin-outlet-test.gjs

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
@davidtaylorhq davidtaylorhq merged commit 707a912 into main May 19, 2025
16 checks passed
@davidtaylorhq davidtaylorhq deleted the plugin-outlet-curry-args branch May 19, 2025 10:09
davidtaylorhq added a commit that referenced this pull request May 19, 2025
…Outlet (#32742)"

This reverts commit 707a912.

This is causing some unexpected re-rendering. Reverting while we investigate
davidtaylorhq added a commit that referenced this pull request May 19, 2025
#32807)

…Outlet (#32742)"

This reverts commit 707a912.

This is causing some unexpected re-rendering. Reverting while we
investigate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants