Commit Graph

1688 Commits

Author SHA1 Message Date
HongyuHansonYao
4e990d2716
Recharts supporting radix color, add event triggers (#3430)
Co-authored-by: Hongyu Yao <hongyuyao@hongyus-mbp-3.lan>
2024-06-07 09:47:12 -07:00
Masen Furer
6e719d4c83
[REF-2977] [REF-2982] Merge layout prop and automatic darkmode (#3442)
* [REF-2977] [REF-2982] Merge layout prop and automatic darkmode

* Expose `template` prop in rx.plotly
* Set default `template` to a color_mode_cond that responds to dark mode
* Merge user-provided `layout` and `template` props into the serialized
  plot data

* pyi_generator: avoid affecting the HTML Template component

* Raise warning when importing rx.plotly without plotly installed

* Remove PlotlyLib component and consolidate imports [fixup]
2024-06-07 09:42:50 -07:00
Masen Furer
fb173908db
Only run pyi_generator on files in reflex/components or reflex/__init__.py (#3452) 2024-06-06 21:31:17 -07:00
Devon Stewart
39d9a9f8eb
[bug] Avoid deleting endpoint port when running on Replit (#3447)
* "if codespace_name" repeated, no-op

* Special-case replit.dev

* Codifying a ruff future
2024-06-06 14:00:00 -07:00
benedikt-bartscher
f672391618
Webdriver ArgOptions improvements (#3429)
* allow to pass custom selenium ArgOptions to webdriver

* allow to pass capabilities to auto generated driver options
2024-06-06 13:59:41 -07:00
Thomas Brandého
3579513964
fix warning about props (#3451) 2024-06-06 13:45:22 -07:00
Thomas Brandého
e1244b4ea6
promote toast to main namespace (#3422) 2024-06-06 10:38:35 -07:00
Thomas Brandého
4b955d3831
clean up hooks and update component to use add_hooks (#3439) 2024-06-06 10:26:04 -07:00
Elijah Ahianyo
44ad9a7311
[REF-2956] Fail When Backend port or frontend port is explicitly provided and the port is in use (#3432) 2024-06-05 11:46:00 -07:00
Milo Chen
bbd320b3ce
fix: correct zh_tw and zh_cn README for hyperlink issues (#3440)
* fix: correct zh_tw and zh_cn README for hyperlink issues

* Update docs/zh/zh_cn/README.md

Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>

* Update docs/zh/zh_tw/README.md

Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>

---------

Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>
2024-06-05 19:11:20 +02:00
Masen Furer
765f349f02
[REF-3004] Use relative path to stylesheet for postcss-import compat (#3435)
* test_tailwind: include custom stylesheet

* [REF-3004] Use relative path to stylesheet for postcss-import compat

postcss-import balls all of the CSS up into a single file, which happens at
compile time. So, replace the `@/` with `../public` so the import paths can be
resolved relative to the `styles` directory.

* test_compiler: fix compile_stylesheets expectations

* Use constants.Dirs.PUBLIC instead of "public"
2024-06-05 10:02:05 -07:00
Masen Furer
447fe56833
bump version to 0.5.3 (#3446) 2024-06-05 10:01:17 -07:00
Masen Furer
096ecf3113
[REF-3006] Inline code rendered in rx.markdown has extra trailing space (#3426)
Avoid replacing newlines with whitespaces... these show up in the rendered
output 😱

Fix #3425
2024-06-05 16:55:02 +02:00
Elijah Ahianyo
6420fb1252
[REF-3010] Circular Imports Fix (#3433) 2024-06-04 11:50:02 -07:00
Elijah Ahianyo
a3cbfefb22
[REF-2602] Do not suppress import errors in rxconfig (#3434) 2024-06-04 11:48:52 -07:00
HongyuHansonYao
1c29bff998
Set use resize handler default to true (#3424)
* init

* empty commit

* set true

* set true

* set true

---------

Co-authored-by: Hongyu Yao <hongyuyao@hongyus-mbp-3.lan>
2024-06-03 12:42:22 -07:00
Milo Chen
6c1af838cf
PR zh/zh_tw readme update for relex 0.5.2 (#3415) 2024-06-03 10:29:58 -07:00
Carlos
7a12fe2c5e
include resize and radius props to the text area component (#3383)
* include resize and radius props to the text area component

* run scripts/make_pyi.py for text_area

* pre-commit fixup

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-05-31 17:45:59 -07:00
Masen Furer
b04e3a6ce9
[REF-1356] Track changes applied to Base subclass via helper method. (#2242) 2024-05-31 14:58:58 -07:00
Masen Furer
5995b32f5f
[REF-2978] Ignore Redis config_set for AWS ElastiCache (#3401) 2024-05-31 14:58:25 -07:00
Masen Furer
16fc3936a4
[REF-2202] Implement event handlers for Plotly (#3397)
* pyi_generator: do not generate kwargs for event trigger props

event triggers are handled separately

* Implement event handlers for Plotly

* py38 compat: from __future__ import annotations
2024-05-31 13:04:19 -07:00
HongyuHansonYao
d9e718d7bd
Layout property not pushed through on rx.plotly (#3394)
* init fix

* Update reflex/components/plotly/plotly.py

Co-authored-by: Masen Furer <m_github@0x26.net>

* plotly: treat `data` as a `dict`-type Var in _render

this allows the data to be passed directly as a figure or from a state var

* removed width height prop as they are no longer needed

* updated

* reverted some of the changes

* fixed unit tests

* regen pyi

---------

Co-authored-by: Hongyu Yao <hongyuyao@hongyus-mbp-3.lan>
Co-authored-by: Masen Furer <m_github@0x26.net>
Co-authored-by: Hongyu Yao <hongyuyao@Hongyus-MacBook-Pro-3.local>
2024-05-31 11:48:43 -07:00
Elijah Ahianyo
34bf25071a
[REF-2821]Improve Dynamic Imports (#3345)
* Improve import times

* add lazy loading to rx.el

* add lazy loading to reflex core components

* minor refactor

* Get imports working with reflex web

* get imports to work with all reflex examples

* refactor to define imports only in the root.

* lint

* deadcode remove

* update poetry deps

* unit tests fix

* app_harness fix

* app_harness fix

* pyi file generate

* pyi file generate

* sort pyi order

* fix pyi

* fix docker ci

* rework pyi-generator

* generate pyi for __init__ files

* test pyright

* test pyright ci

* partial pyright fix

* more pyright fix

* pyright fix

* fix pyi_generator

* add rx.serializer and others

* add future annotation import which fixes container CI, then also load recharts lazily

* add new pyi files

* pyright fix

* minor fixes for reflex-web and flexdown

* forward references for py38

* ruff fix

* pyi fix

* unit tests fix

* reduce coverage to 68%

* reduce coverage to 67%

* reduce coverage to 66%as a workaround to coverage's rounding issue

* reduce coverage to 66%as a workaround to coverage's rounding issue

* exclude lazy_loader dependency review checks.

* its lazy-loader

* Add docstrings and regenerate pyi files

* add link

* address Pr comments

* CI fix

* partially address PR comments.

* edit docstrings and fix integration tests

* fix typo in docstring

* pyi fix
2024-05-31 16:43:10 +00:00
Jishnu N
83d99889ec
refactor: radix section default size (#3406) 2024-05-30 20:52:01 -07:00
Masen Furer
2f1a68c975
pyproject.toml: bump to 0.5.2 (#3408) 2024-05-30 16:58:23 -07:00
Elijah Ahianyo
1a833d6b25
Recommend Running with REFLEX_USE_NPM=1 if npm run fails after installing packages with bun. (#3399) 2024-05-30 15:57:15 -07:00
Tom Gotsman
5652310840
update image for readme (#3395)
* update image for readme

* update based on Nikhil's comment

---------

Co-authored-by: Tom Gotsman <tomgotsman@toms-mbp.lan>
2024-05-30 12:23:56 -07:00
Kelechi Ebiri
d99c40a763
Add domain prop for the PolarRadiusAxis component (#3349) 2024-05-30 09:14:50 -07:00
Sagar Hedaoo
7f054fda9d
Updated in/readme.md with current readme (#3333) 2024-05-30 09:14:02 -07:00
Thomas Brandého
c7064b9a24
add config knob for react_strict_mode. default to True. also cleanup unused code (#3389) 2024-05-29 11:49:04 -07:00
Elijah Ahianyo
4b939caa7f
[REF-2895]Benchmarks getting skipped on merge (#3369) 2024-05-29 09:28:41 -07:00
benedikt-bartscher
93de407007
Explicit deps and interval for computed vars (#3231) 2024-05-28 12:27:27 -07:00
Masen Furer
ac1c660bf0
Radix Themes + Tailwind Harmony (#3355) 2024-05-28 12:21:28 -07:00
Thomas Brandého
33f71c6eef
add mapping between client_token and socket id (#3388) 2024-05-28 10:53:26 -07:00
abulvenz
6c6eaaa55f
External assets (#3220) 2024-05-28 09:39:25 -07:00
abulvenz
7c2056e960
feat: Optionally comparing fields in Var.contains, e.g. on rx.Base based types. (#3375)
* feat: Optionally comparing fields, e.g. on rx.Base based types.

* feat: Minimally invasive change.
Leave the current implementation as is. Added test.

* fix: Supporting old-school python versions.

* fix: Adding masenf's suggestions to use var instead of string.
2024-05-24 17:16:26 -07:00
Masen Furer
51d3b2cb21
url quote the str data passed to rx.download (#3381) 2024-05-24 09:44:09 -07:00
Masen Furer
653f00b046
[REF-2878] Map fontFamily to fontFamily and --default-font-family (#3380)
When setting the font_family prop for a component, also set the radix token
`--default-font-family` so that child radix components will inherit the font.
2024-05-23 15:54:39 -07:00
benedikt-bartscher
d96f051486
set config.deploy_url during AppHarness tests (#3359) 2024-05-23 09:23:07 -07:00
Masen Furer
ed39c27bfb
[REF-2915] ComponentState subclasses are always treated as mixin (#3372)
Always treat ComponentState subclasses as mixin, and explicitly pass
`mixin=False` in `.create` classmethod when intentionally creating a substate.

This allows a "base" ComponentState to have subclasses that also work as
ComponentState themselves.

Fix #3368
2024-05-22 16:12:33 -07:00
Thomas Brandého
956a526b20
add support for lifespan tasks (#3312)
* add support for lifespan tasks

* allow passing args to lifespan task

* add message to the cancel call

* allow asynccontextmanager as lifespan tasks

* Fix integration.utils.SessionStorage

Previously the SessionStorage util was just looking in localStorage, but the
tests didn't catch it because they were asserting the token was not None,
rather than asserting it was truthy.

Fixed here, because I'm using this structure in the new lifespan test.

* If the lifespan task or context takes "app" parameter, pass the FastAPI instance.

* test_lifespan: end to end test for register_lifespan_task

* In py3.8, Task.cancel takes no args

* test_lifespan: use polling to make the test more robust

Fix CI failure

* Do not allow task_args for better composability

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-05-22 12:07:03 -07:00
benedikt-bartscher
0b613d5d3b
do not check attribute type for var internals (#3357) 2024-05-22 11:35:42 -07:00
Angelina Sheyko
0c0dde127f
Added config for number of gunicorn workers (#3351) 2024-05-22 11:31:15 -07:00
owlur
6976fe6145
Update Korean README.md and synchronize code with the latest version (#3337) 2024-05-21 19:37:21 -07:00
Masen Furer
3e5bf00ba2
Bump to 0.5.1 (#3364) 2024-05-21 17:17:48 -07:00
Thomas Brandého
4bda3eb233
add style for orientation=vertical in tabs (#3332) 2024-05-21 16:21:46 -07:00
Santiago Botero
d40d992670
Update Spanish README.md (#3330) 2024-05-21 14:51:50 -07:00
seewind
f961e2daa0
#3321: Update Chinese README.md (#3350) 2024-05-21 14:50:36 -07:00
Eric Brown
d50be7eab1
Use twine environment variables if set (#3353) 2024-05-21 14:43:49 -07:00
Nikhil Rao
ff985aee22
Suppress runtime warnings (#3354) 2024-05-21 12:34:25 -07:00