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

Improved default transforms for vdom_to_html #1278

Merged

Conversation

Archmonger
Copy link
Contributor

@Archmonger Archmonger commented Feb 13, 2025

Description

This PR predominantly is to backport the improved vdom_to_html transforms from reactpy-django into reactpy.

Changelog

  • Renamed reactpy.utils.html_to_vdom to reactpy.utils.string_to_reactpy.
  • Renamed reactpy.utils.vdom_to_html to reactpy.utils.reactpy_to_string.
  • reactpy.utils.string_to_reactpy has been upgraded to handle more complex scenarios without causing ReactJS rendering errors.
  • reactpy.utils.reactpy_to_string will now retain the user's original casing for element data-* and aria-* attributes.
  • Convert pragma: no cover comments to nocov

Checklist

Please update this checklist as you complete each item:

  • Tests have been developed for bug fixes or new functionality.
  • The changelog has been updated, if necessary.
  • Documentation has been updated, if necessary.
  • GitHub Issues closed by this PR have been linked.

By submitting this pull request I agree that all contributions comply with this project's open source license(s).

@Archmonger Archmonger changed the base branch from main to develop February 13, 2025 22:53
@Archmonger Archmonger marked this pull request as ready for review February 14, 2025 06:08
@Archmonger Archmonger merged commit 3c6abe6 into reactive-python:develop Feb 14, 2025
17 checks passed
@Archmonger Archmonger deleted the v2-improve-default-transforms branch February 14, 2025 06:28
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