Commit Graph

2239 Commits

Author SHA1 Message Date
Masen Furer
98f50811f9
Override react-is@19.0.0 for recharts compatibility (#4857)
See https://github.com/recharts/recharts/issues/4558 for details.
2025-02-21 16:11:40 -08:00
Khaleel Al-Adhami
ee03415894
fix autoscroll on stateful children (#4858) 2025-02-21 15:09:25 -08:00
Khaleel Al-Adhami
8943341605
simplify toast banner logic (#4853)
* simplify toast banner logic

* expose toast

* default back to title and desc, and replace brs with new lines
2025-02-20 15:10:15 -08:00
benedikt-bartscher
836e8f8ce9
migrate to new react 19 context api (#4849) 2025-02-20 12:23:47 -08:00
Masen Furer
e891dbe6b9
pyproject.toml: bump to 0.7.2dev1 (#4851) 2025-02-20 12:23:14 -08:00
Khaleel Al-Adhami
c2917d46d5
simplify and fix set_color_mode (#4852)
* simplify and fix set_color_mode

* woops
2025-02-19 22:06:13 -08:00
Khaleel Al-Adhami
96086bcb0c
change error connecting to backend when backend is cold started (#4814)
* change error connecting to backend when backend is cold started

* do as simon wanted

* prefix with REFLEX
2025-02-19 15:09:13 -08:00
Khaleel Al-Adhami
6e4522c15c
react 19 time (#4848)
* react 19 time

* idk why

* better default for resolvedColorMode

* remove prints
2025-02-19 14:46:53 -08:00
Masen Furer
deb1f4f702
[ENG-4713] Cache pages which add states when evaluating (#4788)
* cache order of imports that create BaseState subclasses

* Track which pages create State subclasses during evaluation

These need to be replayed on the backend to ensure state alignment.

* Clean up: use constants, remove unused code

Handle closing files with contextmanager

* Expose app.add_all_routes_endpoint for flexgen

* Include .web/backend directory in backend.zip when exporting
2025-02-19 12:43:20 -08:00
Khaleel Al-Adhami
7a6c7123bd
treat hyphen as underscore in keys of styles (#4810)
* treat hyphen as underscore in keys of styles

* fix tests

* more nuanced conversions
2025-02-19 12:33:03 -08:00
Khaleel Al-Adhami
abab18e165
components deserve to be first class props (#4827)
* components deserve to be first class props

* default back to {}

* smarter yield

* how much does caching help?

* only hit the slower path on _are_fields_known

* remove the cache thingy

* cache the inner _get_component_prop_names

* oops

* dang it darglint

* refactor things a bit

* fix events
2025-02-19 11:27:33 -08:00
Masen Furer
762d975a87
Allow any user to set show_built_with_reflex=False in any mode (#4847) 2025-02-19 11:03:54 -08:00
Sumanth
405872aaf0
Wrapping extra components inside of the Context Menu Component (#4831)
* Wrapping extra components inside of the Context Menu Component  (partial fix for #4262) label, group, radio, radio_group

* removed unwanted changes

* removed codespell ignores and pyright type checking ignores

* remove misc changes

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2025-02-19 10:59:46 -08:00
Thomas Brandého
0a33cc3b8a
auto hide badge for pro+ users for cloud deployments (#4819)
* auto hide badge for pro+ users for cloud deployments

* update integrations tests

* fix integrations for real
2025-02-19 18:29:11 +01:00
Khaleel Al-Adhami
946b7bc25a
upgrade deps as per python 3.10 (#4842)
* upgrade deps as per python 3.10

* no need for that guy
2025-02-18 13:56:58 -08:00
Khaleel Al-Adhami
18990df41f
add capitalize and title var operations (#4840) 2025-02-18 12:45:43 -08:00
Khaleel Al-Adhami
3129ddab47
Add auto scroll (#4790)
* add auto_scroll

* add auto_scroll

* add auto_scroll to global

* use random id for maximum safety
2025-02-18 11:52:39 -08:00
Khaleel Al-Adhami
f4165c9812
fix types for html elements (#4768) 2025-02-18 10:20:22 -08:00
Masen Furer
6848915883
Update rx.get_upload_url signature to accept Var[str] (#4826)
* Update rx.get_upload_url signature to accept Var[str]

* Add py.typed

Fix #4806
2025-02-14 17:10:01 -08:00
Khaleel Al-Adhami
10bae9577c
only write if file changed (#4822)
* only write if file changed

* preface it on it existing
2025-02-13 22:49:27 -08:00
Khaleel Al-Adhami
7c4257a222
give option to only use main thread (#4809)
* give option to only use main thread

* change default to main thread

* fix comment

* default to None, as 0 would raise a ValueError

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

* add warning about passing 0

* move executor to config

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2025-02-13 18:36:30 -08:00
Khaleel Al-Adhami
8e579efe47
remove some benchmarks from CI (#4812) 2025-02-13 16:17:06 -08:00
Khaleel Al-Adhami
b44bbc81a0
import var perf improvements (#4813)
* import var perf improvements

* use tuples over iterator

* the only thing that matters

* maybe tuple map is faster than tuple list comprehension

* do it in one list comprehension
2025-02-13 15:54:10 -08:00
Khaleel Al-Adhami
aac61c69c2
actually get rid of callable var fr fr (#4821) 2025-02-13 15:40:01 -08:00
Khaleel Al-Adhami
6fb491471b
cache get_type_hints for environment (#4820) 2025-02-13 13:44:02 -08:00
Khaleel Al-Adhami
40294a7c9e
standarize filename from upload (#4734)
* standarize filename from upload

* all my friends hate fast api upload file

* make deprecated filename private

* lstrip the "/"

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

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2025-02-13 13:36:59 -08:00
Khaleel Al-Adhami
c6fb4e238d
improve into component conversion (#4754)
* improve into component conversion

* correct the order of .State
2025-02-13 12:44:42 -08:00
Khaleel Al-Adhami
10c45b185c
adjust setter to include type annotation (#4726)
* adjust setter to include type annotation

* apparently this discovered some bugs

* remove some pyright ignores

* add str to int/float conversion

* dang it darglint
2025-02-13 12:44:27 -08:00
Thomas Brandého
2ba73f7ff9
bump ruff to 0.9.6 (#4817) 2025-02-13 10:19:33 -08:00
Khaleel Al-Adhami
d79366d8b2
benchmark experimentation (#4811)
* benchmark experimentation

* do the same for test_evaluate_page

* import templates beforehands

* add auto reload

* disable extensions
2025-02-12 14:51:58 -08:00
Thomas Brandého
dd5b817f0f
fix port handling (#4773)
* handle port better

* setting port via envvar is possible again

* change default deploy_url and api_url

* fix for review

* update docstring

* type new envvar as optional
2025-02-12 19:06:01 +01:00
Khaleel Al-Adhami
977e1dcb67
update deps 2025-02-11 (#4804) 2025-02-12 09:05:36 -08:00
Thomas Brandého
a31301cb4f
add stateful benchmarks (#4764)
* add stateful benchmarks

* make stateful stuff more complex

* unpack tuple in itertag

* fix comment
2025-02-11 18:51:05 -08:00
Masen Furer
7da96a1175
pyproject.toml: bump to 0.7.1 for further development (#4808) 2025-02-11 18:41:04 -08:00
Masen Furer
3f68a27a22
[ENG-4647] Fix env_file handling (#4805)
* [ENG-4647] Fix env_file handling

* Import dotenv.load_dotenv early to avoid ImportError while loading
  rxconfig.py
* Read ENV_FILE from the environment explicitly.

fix #4803

* Config.Config: use_enum_values = False

Save enum fields as the enum object rather than the value.
2025-02-11 18:05:33 -08:00
Khaleel Al-Adhami
cb2e7df96a
invert logic of default hot reload exclusion (#4807)
* invert logic of default hot reload exclusion

* console debug reload paths
2025-02-11 17:47:44 -08:00
Khaleel Al-Adhami
6cbdd00169
fix toast provider needed (#4801)
* fix toast provider needed

* fix tests
2025-02-11 16:46:06 -08:00
Simon Young
289d10d30e
test actions in codeql (#4802) 2025-02-11 16:04:03 -08:00
Simon Young
e5e6c4e1d7
Create codeql.yml (#4799)
* Create codeql.yml

* add config

* fix that guy who's mad

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2025-02-11 15:49:06 -08:00
Declan Brady
894a01a5a5
Add toast.loading from the sonner package (#4792) 2025-02-11 12:21:27 -08:00
Thomas Brandého
64b1630d02
set global loglevel for subprocesses (#4791) 2025-02-11 12:15:38 -08:00
Khaleel Al-Adhami
372bd22475
raise error when passing a str(var) (#4769)
* raise error when passing a str(var)

* make it faster

* fix typo

* fix tests

* mocker consistency

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

* ditto

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

---------

Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>
2025-02-11 11:39:55 -08:00
Khaleel Al-Adhami
d545ee3f0b
move overlays to _app.js (#4794)
* move overlays to _app.js

* fix unit tests

* fix dynamic imports app

* fix unit cases once again

* clear custom compoent cache between app harness tests
2025-02-11 11:39:38 -08:00
Khaleel Al-Adhami
a194c90d6f
improve hot reload handling (#4795) 2025-02-11 11:39:28 -08:00
Khaleel Al-Adhami
90be664981
improve icon error message (#4796) 2025-02-11 11:39:14 -08:00
Masen Furer
85f07fcd89
Sticky tweaks: only show in prod mode (#4789)
* Sticky tweaks: only show in prod mode

Only display the sticky badge in prod mode.

Display the mini-badge for mobile and tablet; full badge only displayed at
desktop width.

* Remove localhost checking
2025-02-10 12:22:37 -08:00
Thomas Brandého
3a02d03cb1
fix bun path handling and add a test (#4785)
* fix bun path handling and add a test

* fix flags

* fix tests

* fix unit tests and mock object

* fix units test again

* revert some changes for now

* remove unused test
2025-02-10 11:44:44 -08:00
Masen Furer
8b2c7291d3
Add ComputedVar overloads for BASE_TYPE, SQLA_TYPE, and DATACLASS_TYPE (#4777)
Allow typing to find __getattr__ for rx.var that returns an object-like model.
2025-02-07 17:38:42 -08:00
Simon Young
3de04156e9
allow gunicorn worker to be disabled (#4774)
* allow gunicorn worker to be disabled

* allow gunicorn worker to be disabled

* rewrite the command

---------

Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
2025-02-07 17:20:35 -08:00
Khaleel Al-Adhami
ee731a908d
provide plotly subpackages (#4776) 2025-02-07 17:19:28 -08:00