瀏覽代碼

Merge branch 'main' into release/reflex-0.7.6

Khaleel Al-Adhami 1 月之前
父節點
當前提交
507bc051a6
共有 5 個文件被更改,包括 10 次插入5 次删除
  1. 2 2
      pyi_hashes.json
  2. 4 0
      reflex/app.py
  3. 1 0
      reflex/components/recharts/__init__.py
  4. 1 1
      reflex/components/recharts/general.py
  5. 2 2
      reflex/utils/export.py

+ 2 - 2
pyi_hashes.json

@@ -114,10 +114,10 @@
   "reflex/components/react_player/audio.pyi": "972975ed0ba3e1dc4a867da20b11ae8e",
   "reflex/components/react_player/react_player.pyi": "63ffffbc24907103f797dcfd85894107",
   "reflex/components/react_player/video.pyi": "35ce5ad62e8bff17d9c09d27c362f8dc",
-  "reflex/components/recharts/__init__.pyi": "d4013ae04aaa4d81fccffb727d513ed6",
+  "reflex/components/recharts/__init__.pyi": "a52c9055e37c6ee25ded15688d45e8a5",
   "reflex/components/recharts/cartesian.pyi": "34b15e8f5125b5a8145e3e04ed6418e4",
   "reflex/components/recharts/charts.pyi": "b3d35de9cea86307ad2ab7d69ff2d06b",
-  "reflex/components/recharts/general.pyi": "ccc5e13f46429b08cdd14fd507fe3163",
+  "reflex/components/recharts/general.pyi": "5548fc494c29063c262ca7a7ef51dce8",
   "reflex/components/recharts/polar.pyi": "8fb87fd69c9edf55998f11ea8ada76fb",
   "reflex/components/recharts/recharts.pyi": "157acc830323075ffaf4f68d495d1787",
   "reflex/components/sonner/toast.pyi": "0b6dc33413f30fdd043b89ec3c8c3f39",

+ 4 - 0
reflex/app.py

@@ -293,6 +293,7 @@ class UnevaluatedPage:
     image: str
     on_load: EventType[()] | None
     meta: list[dict[str, str]]
+    context: dict[str, Any] | None
 
 
 @dataclasses.dataclass()
@@ -681,6 +682,7 @@ class App(MiddlewareMixin, LifespanMixin):
         image: str = constants.DefaultPage.IMAGE,
         on_load: EventType[()] | None = None,
         meta: list[dict[str, str]] = constants.DefaultPage.META_LIST,
+        context: dict[str, Any] | None = None,
     ):
         """Add a page to the app.
 
@@ -695,6 +697,7 @@ class App(MiddlewareMixin, LifespanMixin):
             image: The image to display on the page.
             on_load: The event handler(s) that will be called each time the page load.
             meta: The metadata of the page.
+            context: Values passed to page for custom page-specific logic.
 
         Raises:
             PageValueError: When the component is not set for a non-404 page.
@@ -762,6 +765,7 @@ class App(MiddlewareMixin, LifespanMixin):
             image=image,
             on_load=on_load,
             meta=meta,
+            context=context,
         )
 
     def _compile_page(self, route: str, save_page: bool = True):

+ 1 - 0
reflex/components/recharts/__init__.py

@@ -64,6 +64,7 @@ _SUBMOD_ATTRS: dict = {
         "ResponsiveContainer",
         "legend",
         "Legend",
+        "tooltip",
         "graphing_tooltip",
         "GraphingTooltip",
         "label",

+ 1 - 1
reflex/components/recharts/general.py

@@ -259,7 +259,7 @@ class Cell(Recharts):
 
 responsive_container = ResponsiveContainer.create
 legend = Legend.create
-graphing_tooltip = GraphingTooltip.create
+graphing_tooltip = tooltip = GraphingTooltip.create
 label = Label.create
 label_list = LabelList.create
 cell = Cell.create

+ 2 - 2
reflex/utils/export.py

@@ -41,10 +41,10 @@ def export(
 
     # Override the config url values if provided.
     if api_url is not None:
-        config.api_url = str(api_url)
+        config._set_persistent(api_url=str(api_url))
         console.debug(f"overriding API URL: {config.api_url}")
     if deploy_url is not None:
-        config.deploy_url = str(deploy_url)
+        config._set_persistent(deploy_url=str(deploy_url))
         console.debug(f"overriding deploy URL: {config.deploy_url}")
 
     # Show system info