Skip to content

Commit 60b1baf

Browse files
Add missing rx.el.figure HTML element (#5575)
* Add missing rx.el.figure HTML element - Add Figure class to typography.py following existing pattern - Add figure to element mapping in __init__.py - Create convenience function figure = Figure.create - Fixes issue #5573 where rx.el.figure was not available The figure element is a standard HTML semantic element used to represent self-contained content, often with a caption using figcaption. * Update pyi_hashes.json after adding Figure element - Regenerated .pyi files locally to match CI expectations - Fixes pre-commit hook failure in CI * Regenerate pyi files using specified command - Used 'uv run python -m reflex.utils.pyi_generator' as requested by @adhami3310 - Fixes CI pre-commit failure by updating pyi_hashes.json with correct values - All 119 .pyi files regenerated successfully --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 3607041 commit 60b1baf

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

pyi_hashes.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"reflex/components/datadisplay/code.pyi": "3787ca724cae7b29d57ea03f981b8c22",
2626
"reflex/components/datadisplay/dataeditor.pyi": "23f777b8a46eff2afd95035dd5fc51a7",
2727
"reflex/components/datadisplay/shiki_code_block.pyi": "0bf1ed97bcc4159df150d56d92d78945",
28-
"reflex/components/el/__init__.pyi": "8943a76f52fb5ed6a1c04b7cd31976f9",
28+
"reflex/components/el/__init__.pyi": "00ded672c0336da6225036f56855b042",
2929
"reflex/components/el/element.pyi": "7faa2cda13a04870d6c1cbfb4b3a2a0a",
30-
"reflex/components/el/elements/__init__.pyi": "5042206599bd3483a6b7a8f922f7c1f2",
30+
"reflex/components/el/elements/__init__.pyi": "2e30624329b8b535dfd8969f95efdd25",
3131
"reflex/components/el/elements/base.pyi": "3fde62b5c749a40c43d1a4f0d0dccda4",
3232
"reflex/components/el/elements/forms.pyi": "b7db5e64a2d0ee1a7ecf72cac927587a",
3333
"reflex/components/el/elements/inline.pyi": "027f051369a253446365e77a4d621013",
@@ -37,7 +37,7 @@
3737
"reflex/components/el/elements/scripts.pyi": "d38ffd5cc01d62979f9788b9c478f82d",
3838
"reflex/components/el/elements/sectioning.pyi": "11deb805947a6b7ec88c409c362273c5",
3939
"reflex/components/el/elements/tables.pyi": "e5573a4a8c9cb13d8169a596b6699b31",
40-
"reflex/components/el/elements/typography.pyi": "dc4e234a7a58be0a9c2c6036a52f9b59",
40+
"reflex/components/el/elements/typography.pyi": "9f9f6990749f4a3c643f8ab344df00cd",
4141
"reflex/components/gridjs/datatable.pyi": "5c19d2b5788a8520d43a4d6dcc247705",
4242
"reflex/components/lucide/icon.pyi": "637bf77970ef805ac4bdc1eba77ece76",
4343
"reflex/components/markdown/markdown.pyi": "a569dd6a60d67baebfc4d04cddf85020",

reflex/components/el/elements/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
"dl",
126126
"dt",
127127
"figcaption",
128+
"figure",
128129
"hr",
129130
"ol",
130131
"li",

reflex/components/el/elements/typography.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ class Figcaption(BaseHTML):
4646
tag = "figcaption"
4747

4848

49+
class Figure(BaseHTML):
50+
"""Display the figure element."""
51+
52+
tag = "figure"
53+
54+
4955
class Hr(BaseHTML):
5056
"""Display the hr element."""
5157

@@ -132,6 +138,7 @@ class Del(BaseHTML):
132138
dl = Dl.create
133139
dt = Dt.create
134140
figcaption = Figcaption.create
141+
figure = Figure.create
135142
hr = Hr.create
136143
li = Li.create
137144
ol = Ol.create

0 commit comments

Comments
 (0)