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

feat(frontend): listener templating #3937

Merged
merged 3 commits into from
Dec 11, 2024
Merged

Conversation

peterpeterparker
Copy link
Member

@peterpeterparker peterpeterparker commented Dec 11, 2024

Motivation

Migration to Svelte v5 (#3929) involves replacing the ComponentType. While updating the Listener, a minor TypeScript issue was identified. We use a svelte:component that maps a token property, which may or may not be present, and can sometimes be set or unset. This approach works because the component is assigned to a state variable, but it is not fully TypeScript-compliant. To address this, we can leverage the template to correctly mount the listener.

Copy link
Collaborator

@AntonioVentilii AntonioVentilii left a comment

Choose a reason for hiding this comment

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

LGTM tks!

Minor question, non blocker

{#if isNullish(token) || $authNotSignedIn}
<NoListener>
<slot />
</NoListener>
Copy link
Collaborator

@AntonioVentilii AntonioVentilii Dec 11, 2024

Choose a reason for hiding this comment

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

shall we delete NoListener at this point? and leave just <slot />, and use it as fallback instead of EthListener?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking doing that in another PR.

@peterpeterparker peterpeterparker merged commit fbd7a5b into main Dec 11, 2024
18 checks passed
@peterpeterparker peterpeterparker deleted the feat/listenet-mount branch December 11, 2024 09:18
peterpeterparker added a commit that referenced this pull request Dec 11, 2024
# Motivation

Follow-up of #3937. We do not need the `NoListener` anymore and can
simplify with a slot.
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.

2 participants