Skip to content

Conversation

geoffreygarrett
Copy link
Contributor

Unified node reference handling for Leptos 0.7 that supports type-safe conditional/dynamic rendering:

  • Replace element-specific macros with generic NodeRefContainer<E> implementation
  • Add type-safe conversion between NodeRef<E> and type-erased AnyNodeRef
  • Enable node refs across conditional branches via AnyNodeRefAttr

Part of a larger update across RustForWeb/radix components - additional PRs will follow that depend on these changes.

geoffreygarrett added 5 commits December 22, 2024 12:53
…dling

- Introduced the  trait to enable conversion of typed s to

- Facilitates generic operations on various node references across HTML, SVG, and Math node types

- Added comprehensive tests to ensure the functionality and reliability of the new trait

- Updated  to reflect version bump to 0.0.4
- Implement generic NodeRefContainer<E> to handle node references consistently across elements
- Add type-safe conversions between specific NodeRef<E> and type-erased AnyNodeRef
- Improve attribute handling for conditional rendering with AnyNodeRefAttr
- Fix issue with node refs being spread across multiple elements in conditionals
@geoffreygarrett geoffreygarrett marked this pull request as draft December 31, 2024 16:18
@geoffreygarrett geoffreygarrett mentioned this pull request Jan 1, 2025
4 tasks
@geoffreygarrett
Copy link
Contributor Author

#8 is contained in this PR with more.

@geoffreygarrett geoffreygarrett changed the title Unify node-ref handling for Leptos 0.7 migration refactor(any_node_ref): revamp for leptos 0.7 Jan 1, 2025
@geoffreygarrett
Copy link
Contributor Author

Closing this draft PR in favor of three separate feature PRs for better review and maintainability:

These PRs contain the same changes but split into logical, independent features.

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.

1 participant