Skip to content

Conversation

@NullVoxPopuli
Copy link
Contributor

With all the v1 addons gone now, ember-container-query is compatible with vite-native (no compat) applications

Pending:

  • I need to finish the docs for resize-observer and do a release

@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review November 16, 2025 22:52
@ijlee2 ijlee2 force-pushed the prepare-replacement-for-ember-resize-observer-service branch from a286729 to dfab8b3 Compare November 19, 2025 10:05
@ijlee2 ijlee2 added the enhance: dependency Issue asks for a new or updated dependency label Nov 19, 2025

registerDestructor(this, () => {
this.resizeObserver.unobserve(this._element, this.onResize);
if (this._element) {
Copy link
Owner

@ijlee2 ijlee2 Nov 19, 2025

Choose a reason for hiding this comment

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

To confirm, did you add this if-statement just for TypeScript (Argument of type 'Element | undefined' is not assignable to parameter of type 'Element'.), or was it also because the modifier had otherwise resulted in a runtime error in docs-app?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was in response to that ts message, yes

Copy link
Owner

@ijlee2 ijlee2 left a comment

Choose a reason for hiding this comment

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

I reduced the number of commits for posterity. Thanks for keeping this addon's dependencies up-to-date.

@ijlee2 ijlee2 changed the title Replace ember-resize-observer-service with a v2 addon, which eliminates the last v1 addon in this library Replaced ember-resize-observer-service with ember-primitives/resize-observer Nov 19, 2025
@ijlee2 ijlee2 merged commit 6d2ae50 into ijlee2:main Nov 19, 2025
26 checks passed
@ijlee2
Copy link
Owner

ijlee2 commented Nov 19, 2025

I think declarations/modifiers/container-query.d.ts shows #private due to the name #resizeObserver:

export default class ContainerQuery<T extends IndexSignatureParameter> extends Modifier<ContainerQuerySignature<T>> {
    #private;
    private _dataAttributes;
    private _element?;
    private _named;
    // ...
}

Should this be considered a bug in ember-container-query? If so, can you rename the variable to _resizeObserver?

private _resizeObserver = resizeObserver(this);

@NullVoxPopuli
Copy link
Contributor Author

Should this be considered a bug in ember-container-query?

I don't think so, #privateFields aren't meant to be knowable from the outside, so i think it's fine

@ijlee2
Copy link
Owner

ijlee2 commented Nov 19, 2025

Sounds good, thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhance: dependency Issue asks for a new or updated dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants