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

POC - Migrate to subscriber controllers #3819

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

svanherk
Copy link
Contributor

Update to #1901

POC of how to migrate the form/validation, selection, and labelledby components and mixins to the subscriber controllers.
This is not thoroughly tested and variables are not well-named - this is a starting point.

@@ -196,6 +205,14 @@ export class IdSubscriberController extends BaseSubscriber {
});
}

_handlePassthrough(e) {
Copy link
Contributor Author

@svanherk svanherk Jul 11, 2023

Choose a reason for hiding this comment

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

Replicating the passthrough functionality added to selection-observer-mixin. Some decisions need to be made here if multiple registries exist.

if (this._registryObserver) this._registryObserver.disconnect();
this._registryControllers.forEach(controller => {
controller.unsubscribe(this._host);
});
this._idPropertyValue = undefined;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is a current bug with disconnected then reconnect IdSubscribers not being able to re-register.

@@ -153,21 +153,30 @@ export class IdSubscriberController extends BaseSubscriber {
super(host, name, options);

this._idPropertyName = options && options.idPropertyName;
this._idPropertyValue = this._idPropertyName ? this._host[this._idPropertyName] : undefined;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think this will ever not be undefined.

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.

None yet

1 participant