Skip to content

Auto-generate reactpy.html.* elements #1255

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

Merged
merged 7 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/_exts/autogen_api_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def generate_api_docs():
if file.name == "__init__.py":
if file.parent != PYTHON_PACKAGE:
content.append(make_package_section(file))
else:
elif not file.name.startswith("_"):
content.append(make_module_section(file))

API_FILE.write_text("\n".join(content))
Expand Down
8 changes: 8 additions & 0 deletions docs/source/about/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ Unreleased

- :pull:`1251` - Substitute client-side usage of ``react`` with ``preact``.
- :pull:`1239` - Script elements no longer support behaving like effects. They now strictly behave like plain HTML script elements.
- :pull:`1255` - The ``reactpy.html`` module has been modified to allow for auto-creation of any HTML nodes. For example, you can create a ``<data-table>`` element by calling ``html.data_table()``.

**Removed**

- :pull:`1255` - Removed the ability to import ``reactpy.html.*`` elements directly. You must now call ``html.*`` to access the elements.
- :pull:`1255` - Removed ``reactpy.sample`` module.
- :pull:`1255` - Removed ``reactpy.svg`` module. Contents previously within ``reactpy.svg.*`` can now be accessed via ``html.svg.*``.
- :pull:`1255` - Removed ``reactpy.html._`` function. Use ``html.fragment`` instead.

**Fixed**

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# :lines: 11-
# :lines: 10-

from reactpy import run
from reactpy.backend import starlette as starlette_server
Expand Down
5 changes: 2 additions & 3 deletions src/reactpy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from reactpy import backend, config, html, logging, sample, svg, types, web, widgets
from reactpy import backend, config, logging, types, web, widgets
from reactpy._html import html
from reactpy.backend.utils import run
from reactpy.core import hooks
from reactpy.core.component import component
Expand Down Expand Up @@ -37,8 +38,6 @@
"html_to_vdom",
"logging",
"run",
"sample",
"svg",
"types",
"use_callback",
"use_connection",
Expand Down
Loading
Loading