Skip to content
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

[BUGFIX canary] Restore/deprecate outlet TemplateFactory support #20577

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

chancancode
Copy link
Member

@chancancode chancancode commented Nov 18, 2023

Fixes #20576

The test is a bit misleading in that, this is not actually restored to support the very old 1.6.0 version of ember-test-helpers. The issue is that while that particular spot of the invalid usage was fixed in 1.6.1, other similarly invalid patterns have popped up in the code since then. However, the old tests was probably a close enough approximation of the general problem.

This is not to avoid fixing the actual issue, but it's just that it was very difficult for us to support for a short time, and there may be other code that copied the same invalid pattern elsewhere.

We could probably backport this to all the way up to LTS if we want with minimal effort, since the code I brought back is basically the same as what was previously there, just with the deprecation.

See also emberjs/ember-test-helpers#1445

@chancancode chancancode force-pushed the restore-deprecate-outlet-template-factory branch 2 times, most recently from 9b2b615 to 2c528bb Compare November 18, 2023 01:38
Fixes #20576

The test is a bit misleading in that, this is not actually restored
to support the very old 1.6.0 version of ember-test-helpers. The
issue is that while that particular spot of the invalid usage was
fixed in 1.6.1, other similarly invalid patterns have popped up in
the code since then. However, the old tests was probably a close
enough approximation of the general problem.

This is not to avoid fixing the actual issue, but it's just that it
was very difficult for us to support for a short time, and there
may be other code that copied the same invalid pattern elsewhere.

See also emberjs/ember-test-helpers#1445
@chancancode chancancode force-pushed the restore-deprecate-outlet-template-factory branch from 2c528bb to 3384cc1 Compare November 18, 2023 01:42
let templateFullName = `template:-undertest-${templateId}`;
owner.register(templateFullName, template);

let outletState = {
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is every property in here needed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, pretty much, the actual thing is typed in TypeScript in the runtime code (it's the interface you commented on last time)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But also, the point was to replicate the same code in test helpers, which I gather at one point this was probably close to verbatim, and it's still not that far off today

@chancancode chancancode merged commit 196eb4c into main Nov 18, 2023
18 checks passed
@chancancode chancancode deleted the restore-deprecate-outlet-template-factory branch November 18, 2023 07:18
chancancode added a commit that referenced this pull request Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@ember/test-helpers rendering test broke on canary after #20570
2 participants