Skip to content

Commit 754dc11

Browse files
authored
Auto-generate reactpy.html.* elements (#1255)
1 parent e24b6aa commit 754dc11

File tree

20 files changed

+447
-675
lines changed

20 files changed

+447
-675
lines changed

Diff for: docs/source/_exts/autogen_api_docs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def generate_api_docs():
4343
if file.name == "__init__.py":
4444
if file.parent != PYTHON_PACKAGE:
4545
content.append(make_package_section(file))
46-
else:
46+
elif not file.name.startswith("_"):
4747
content.append(make_module_section(file))
4848

4949
API_FILE.write_text("\n".join(content))

Diff for: docs/source/about/changelog.rst

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ Unreleased
1919

2020
- :pull:`1251` - Substitute client-side usage of ``react`` with ``preact``.
2121
- :pull:`1239` - Script elements no longer support behaving like effects. They now strictly behave like plain HTML script elements.
22+
- :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()``.
23+
24+
**Removed**
25+
26+
- :pull:`1255` - Removed the ability to import ``reactpy.html.*`` elements directly. You must now call ``html.*`` to access the elements.
27+
- :pull:`1255` - Removed ``reactpy.sample`` module.
28+
- :pull:`1255` - Removed ``reactpy.svg`` module. Contents previously within ``reactpy.svg.*`` can now be accessed via ``html.svg.*``.
29+
- :pull:`1255` - Removed ``reactpy.html._`` function. Use ``html.fragment`` instead.
2230

2331
**Fixed**
2432

Diff for: docs/source/guides/getting-started/_examples/run_starlette.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# :lines: 11-
1+
# :lines: 10-
22

33
from reactpy import run
44
from reactpy.backend import starlette as starlette_server

Diff for: src/reactpy/__init__.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from reactpy import backend, config, html, logging, sample, svg, types, web, widgets
1+
from reactpy import backend, config, logging, types, web, widgets
2+
from reactpy._html import html
23
from reactpy.backend.utils import run
34
from reactpy.core import hooks
45
from reactpy.core.component import component
@@ -37,8 +38,6 @@
3738
"html_to_vdom",
3839
"logging",
3940
"run",
40-
"sample",
41-
"svg",
4241
"types",
4342
"use_callback",
4443
"use_connection",

0 commit comments

Comments
 (0)