Commit Graph

1595 Commits

Author SHA1 Message Date
Nikhil Rao
940afb2c92
Remove deprecations for 0.5.0 (#3222) 2024-05-07 08:55:42 -07:00
Masen Furer
aa8858b113
Expose color_scheme on TabsTrigger (#3112) 2024-05-06 18:36:44 -07:00
benedikt-bartscher
185ec31a71
do not access state __subclasses__, prevent issues with AppHarness (#3143) 2024-05-06 18:35:25 -07:00
Masen Furer
83371d51d3
[REF-2658] Alembic should use batch mode for autogenerate (#3223) 2024-05-06 18:34:55 -07:00
benedikt-bartscher
b3c06bd139
prevent issues with #3214 (#3237) 2024-05-06 18:34:16 -07:00
Thomas Brandého
57476966f3
add_style api (#3202) 2024-05-06 16:59:11 -07:00
PeterYusuke
d68792f7b3
Add Japanese README.md file (#3234) 2024-05-06 10:50:02 -07:00
Elijah Ahianyo
0838e5ac6a
[REF-2676][REF-2751] Windows Skip ARM devices on bun install + Telemetry (#3212) 2024-05-06 09:50:05 -07:00
Elijah Ahianyo
9c7dbdbc72
[REF-2643] Throw Errors for duplicate Routes (#3155) 2024-05-03 12:15:40 -07:00
Elijah Ahianyo
24d15acae6
Windows Pin Version followup (Use Windows Install Link) (#3193) 2024-05-03 12:14:22 -07:00
Thomas Brandého
a7355962fd
prevent shadowing of computed vars (#3221) 2024-05-03 12:13:57 -07:00
Thomas Brandého
1817c30e22
add toast component (#3186) 2024-05-03 12:09:11 -07:00
Nikhil Rao
7903a1020d
Clean up config and app API (#3197) 2024-05-02 18:15:28 -07:00
Elijah Ahianyo
db47d39979
Windows --frontend-only fix ctrl + c (#3181) 2024-05-01 17:40:27 -07:00
Masen Furer
c636c91c9c
[REF-2273] Implement .setvar special EventHandler (#3163)
* Allow EventHandler args to be partially applied

When an EventHandler is called with an incomplete set of args it creates a
partial EventSpec. This change allows Component._create_event_chain to apply
remaining args from an args_spec to an existing EventSpec to make it
functional.

Instead of requiring the use of `lambda` functions to pass arguments to an
EventHandler, they can now be passed directly and any remaining args defined in
the event trigger will be applied after those.

* [REF-2273] Implement `.setvar` special EventHandler

All State subclasses will now have a special `setvar` EventHandler which
appears in the autocomplete drop down, passes static analysis, and canbe used
to set State Vars in response to event triggers.

Before:
    rx.input(value=State.a, on_change=State.set_a)

After:
    rx.input(value=State.a, on_change=State.setvar("a"))

This reduces the "magic" because `setvar` is statically defined on all State
subclasses.

* Catch invalid Var names and types at compile time

* Add test cases for State.setvar

* Use a proper redis-compatible token
2024-05-01 17:13:55 -07:00
benedikt-bartscher
9ead091fec
Improved get_attribute_access_type tests (#3180)
* test get_attribute_access_type against attrs

* add union and hybrid_property tests
2024-05-01 17:13:23 -07:00
Masen Furer
aeca983290
Allow StatefulComponent to also be rendered via __str__ (#3211)
This makes it easier to implement React "render functions" when wrapping
components that require children to be a callable.
2024-05-01 17:03:40 -07:00
khhan0130
be93b1280c
Update CodeBlock class to accept rx.color in custom_style (#3168) 2024-05-01 14:48:33 -07:00
Elijah Ahianyo
93c4f5024e
Windows Pin Bun version (#3192) 2024-05-01 14:47:03 -07:00
Masen Furer
19d8f6c752
[REF-2523] Implement new public Component API (#3203) 2024-05-01 14:46:27 -07:00
benedikt-bartscher
e31b458a69
allow optional props with None default value (#3179) 2024-05-01 13:33:38 -07:00
benedikt-bartscher
73e9123733
migrate deprecated redis.close to redis.aclose (#3199) 2024-05-01 12:05:00 -07:00
Martin Xu
fe731e385d
custom component install as editable mode (#3200) 2024-04-30 18:12:16 -07:00
Masen Furer
b7e85ecec4
[REF-2574] Default width for Stack (+children) and default padding for container (#3104) 2024-04-30 13:15:57 -07:00
Nikhil Rao
8bb736111a
Change readme back to use 0.4.x (#3188) 2024-04-30 00:50:02 +02:00
Angelina Sheyko
4b6a7ff8e3
Fixed unused kwargs in reflex.App (#3170) 2024-04-29 13:53:27 -07:00
Masen Furer
3564df7620
Implement throttle and debounce as event actions (#3091) 2024-04-26 17:28:51 -07:00
benedikt-bartscher
c2017b295e
Improved get_attribute_access_type (#3156) 2024-04-26 17:28:30 -07:00
Masen Furer
74eaab5e19
Integration testing: Firefox compatibility (#3162)
* Integration testing: Firefox compatibility

* test_client_side_storage: ruff format
2024-04-26 13:44:08 -07:00
Thomas Brandého
92cdc15896
IconButton for color_mode with nice default and a position props to control it (#3165) 2024-04-26 12:08:09 -07:00
Elijah Ahianyo
3a58558166
Bump bun version to 1.1.5 (#3176) 2024-04-26 11:50:51 -07:00
Thomas Brandého
0ef695d842
add default underline for links (#3148) 2024-04-26 11:42:05 -07:00
Masen Furer
0a8aaea599
[REF-2682] Foreach over dict uses Tuple arg value (#3160)
* test_foreach: assert on arg _var_type

* [REF-2682] Foreach over dict uses Tuple arg value

When iterating over a Var with _var_type dict, the resulting arg value
_var_type should be Tuple[key, value] so it can be correctly used with other
var operations.

Fix #3157

* Correct _var_type for iteration over Tuple of multiple types

The arg value when iterating over a tuple could be any of the possible values
mentioned in the annotation.

When only one type is used, the Union collapses to the base type, at least in py3.11

* Add comments
2024-04-25 09:10:55 -07:00
Thomas Brandého
ac36bfc6ea
Radix 3.0 (#3159) 2024-04-25 08:33:29 -07:00
JLDev
ebb0e79232
a little correction in the "es" docs (#3127) 2024-04-24 20:58:10 -07:00
Thomas Brandého
0c0477cffb
extend rx.input allowed types (#3149) 2024-04-24 16:04:56 -07:00
Ogidi Ifechukwu
ce2bd2286e
Refactor upload component and add styled upload component (#3035) 2024-04-24 13:45:22 -07:00
Angelina Sheyko
cd1a30d758
Fixed app name validation (#3146) 2024-04-24 13:32:36 -07:00
Martin Xu
a5f9001cf9
send template info in init telemetry event (#3153) 2024-04-24 06:47:33 -07:00
Thomas Brandého
b084c805d4
sync ruff version in pyproject.toml with the precommit one (#3150) 2024-04-23 16:53:36 -07:00
Jirka Borovec
4d567b7ec1
ruff-format: unify Black with Ruff v0.1 (#2837)
* ruff-format: unify Black with Ruff

* ruff lint.

* v0.1.0

* run precommit

* hand fixing

* fix `not isinstance(...)`

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

* rev isinstance(...) with noqa

* exclude = ["*.pyi"]

* apply precommit

* apply format

* revert pyi

* fixing

* Fix or

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

* Update reflex/components/datadisplay/code.pyi

* Apply suggestions from code review

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

* Update tests/components/core/test_colors.py

* Update reflex/app.py

* Update reflex/app.py

* Update benchmarks/test_benchmark_compile_pages.py

* Update benchmarks/test_benchmark_compile_pages.py

* Update benchmarks/test_benchmark_compile_pages.py

---------

Co-authored-by: Thomas Brandého <thomas.brandeho@gmail.com>
2024-04-23 14:40:06 -07:00
Elijah Ahianyo
8e4d6a4781
[REF-2636]Improve Error message for unsupported event trigger (#3147)
* Improve Error message for unsupported event trigger

* typo fix

* fix ci

* add tests

* Update reflex/components/component.py

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

* fix typo

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-04-23 14:36:26 -07:00
Masen Furer
25b84107da
bump to 0.4.9 (#3142) 2024-04-23 09:52:17 -07:00
Thomas Brandého
fd3375394b
pin macos version for CI (#3145)
* fix macos version for CI

* pin macos to 12 for CI

* replace macos-latest with macos-12
2024-04-23 17:38:12 +02:00
Masen Furer
cd4f6bd056
[REF-2620] Fallback to npm (not bun) (#3138)
get_package_manager() will always resolve to npm
2024-04-22 18:17:54 -07:00
Ihor
415ce5557c
fix: args issue in __init__ of App class (#3140) (#3141) 2024-04-22 15:43:16 -07:00
benedikt-bartscher
0a1ff38920
separate DECORATED_PAGES per reflex app (#3102) 2024-04-22 11:32:31 -07:00
Masen Furer
041abb39c8
[REF-2619] Re-init when the template is out of date (#3121) 2024-04-22 11:32:00 -07:00
Masen Furer
19007ee2a1
pin react-focus-lock to 2.11.3 (#3123) 2024-04-19 21:12:42 -07:00
Tom Gotsman
a23faa2c50
add color dalle code example (#3108) 2024-04-19 17:54:10 -07:00