Commit Graph

1643 Commits

Author SHA1 Message Date
Elijah Ahianyo
9c656a0f9c
Fix benchmark tests (#3822) 2024-08-23 11:55:18 -07:00
Alek Petuskey
13a6d538a9
Fix code wrap in markdown (#3755) 2024-08-20 12:11:39 -07:00
benedikt-bartscher
2d9380a6fd
minor State cleanup (#3768) 2024-08-20 12:10:13 -07:00
Shubhankar Dimri
9c70971dc6
fix get_uuid_string_var (#3795) 2024-08-20 10:25:37 -07:00
Elijah Ahianyo
1f3779f40e
[REF-3536][REF-3537][REF-3541] Move chakra components into its repo(reflex-chakra) (#3798) 2024-08-19 13:41:31 -07:00
Elijah Ahianyo
4190a79835
[REF-3334] Validate Toast Props (#3793) 2024-08-15 09:30:32 -07:00
Alek Petuskey
b01c4b6c6a
Bump memory on relevant actions (#3781)
Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MacBook-Pro.local>
2024-08-13 15:49:43 -07:00
Thomas Brandého
634c0916f6
do not reload compilation if using local app in AppHarness (#3790)
* do not reload if using local app

* Update reflex/testing.py

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

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-08-13 23:14:38 +02:00
Khaleel Al-Adhami
910bcdb017
use different registry when in china, fixes #3700 (#3702) 2024-08-12 03:06:34 -07:00
Thomas Brandého
0eff63eed4
fix import clash between connectionToaster and hooks.useState (#3749) 2024-08-12 03:04:55 -07:00
benedikt-bartscher
b58ce1082e
fix appharness app_source typing (#3777) 2024-08-11 17:42:39 -07:00
Shubhankar Dimri
911c2af044
#3752 bugfix add domain for XAxis (#3764) 2024-08-09 12:12:49 -07:00
Thomas Brandého
1a3a6f4a34
add message when installing requirements.txt is needed for chosen template during init (#3750) 2024-08-09 12:08:16 -07:00
Masen Furer
1131caebe8
bump to 0.5.9 (#3746) 2024-08-06 13:43:12 -07:00
Masen Furer
3309c0e533
Use ._is_mutable() to account for parent state proxy (#3739)
When a parent state proxy is set, also allow child StateProxy._self_mutable to
override the parent's `_is_mutable()`.
2024-08-05 14:03:49 -07:00
Masen Furer
7d9ed7e2ce
Use the new state name when setting is_hydrated to false (#3738) 2024-08-05 14:03:30 -07:00
Manas Gupta
c7e30522bc
fix: add verification for path /404 (#3723)
Co-authored-by: coolstorm <manas.gupta@fampay.in>
2024-08-05 14:02:47 -07:00
Alek Petuskey
76627c2076
Add comments to html metadata component (#3731) 2024-08-01 13:24:39 -07:00
Khaleel Al-Adhami
ad14f38329
add type hinting to existing types (#3729)
* add type hinting to existing types

* dang it darglint

* i cannot
2024-07-31 12:01:17 -07:00
benedikt-bartscher
129adc941a
add test for initial state dict (#3727) 2024-07-31 11:37:53 -07:00
benedikt-bartscher
2629366b23
fix initial_value for computed_var (#3726)
* fix initial_value for computed_var

* fix initial_value in pyi
2024-07-31 10:00:52 -07:00
Khaleel Al-Adhami
1c400043c6
[REF-3328] Implement __getitem__ for ArrayVar (#3705)
* half of the way there

* implement __getitem__ for array

* add some tests

* add fixes to pyright

* fix default factory

* implement array operations

* format code

* fix pyright issue

* give up

* add object operations

* add test for merge

* pyright 🥺

* use str isntead of _var_name

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

* wrong var_type

* make to much nicer

* add subclass checking

* enhance types

* use builtin list type

* improve typing even more

* i'm awaiting october

* use even better typing

* add hash, json, and guess type method

* fix pyright issues

* add a test and fix lots of errors

* fix pyright once again

* add type inference to list

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-07-30 15:38:32 -07:00
Masen Furer
06833f6d8d
[REF-3203] Find a DOM event-like object in addEvents (#3706) 2024-07-29 17:17:51 -07:00
Khaleel Al-Adhami
800685da68
fix silly bug when style is set directly to breakpoints (#3719)
* fix silly bug when style is set directly to breakpoints

* add helpful comment

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

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-07-29 16:57:33 -07:00
Masen Furer
4cdd87d851
Bump to v0.5.8 (#3716) 2024-07-29 09:52:45 -07:00
paoloemilioserra
2e726f1bb9
Update vars.py (#3659)
Prevent a validation error from pydantic/v1 that cannot find _var_name, etc. in __dataclass_fields__
2024-07-28 17:51:08 -07:00
Masen Furer
a4e3f05601
[REF-3375] useMemo on generateUUID props to maintain consistent value (#3708)
When using rx.vars.get_uuid_string_var, wrap the prop Var in `useMemo` so that
the value remains consistent across re-renders of the component.

Fix #3707
2024-07-26 17:10:08 -07:00
Thomas Brandého
c4346c2624
update init prompt to use new templates from reflex-dev/templates (#3677) 2024-07-25 10:51:44 -07:00
Thomas Brandého
d389f4b5ca
fix var warning (#3704) 2024-07-25 10:50:18 -07:00
Khaleel Al-Adhami
ede5cd1f2c
[REF-3321] implement var operation decorator (#3698)
* implement var operation decorator

* use older syntax

* use cast and older syntax

* use something even simpler

* add some tests

* use old union tactics

* that's not how you do things

* implement arithmetic operations while we're at it

* add test

* even more operations

* can't use __bool__

* thanos snap

* forgot ruff

* use default factory

* dang it darglint

* i know i should have done that but

* convert values into literalvars

* make test pass

* use older union tactics

* add test to string var

* pright why do you hate me 🥺
2024-07-25 09:34:14 -07:00
Masen Furer
0845d2ee76
[REF-3184] [REF-3339] Background task locking improvements (#3696)
* [REF-3184] Raise exception when encountering nested `async with self` blocks

Avoid deadlock when the background task already holds the mutation lock for a
given state.

* [REF-3339] get_state from background task links to StateProxy

When calling `get_state` from a background task, the resulting state instance
is wrapped in a StateProxy that is bound to the original StateProxy and shares
the same async context, lock, and mutability flag.

* If StateProxy has a _self_parent_state_proxy, retrieve the correct substate

* test_state fixup
2024-07-23 15:28:38 -07:00
Thomas Brandého
b9927b6f49
notifying frontend about backend error looks better (#3491) 2024-07-23 13:58:15 -07:00
Khaleel Al-Adhami
ea016314b0
[REF-3227] implement more literal vars (#3687)
* implement more literal vars

* fix super issue

* pyright has a bug i think

* oh we changed that

* fix docs

* literalize vars recursively

* do what masen told me :D

* use dynamic keys

* forgot .create

* adjust _var_value

* dang it darglint

* add test for serializing literal vars into js exprs

* fix silly mistake

* add  handling for var and none

* use create safe

* is none bruh

* implement function vars and do various modification

* fix None issue

* clear a lot of creates that did nothing

* add tests to function vars

* added simple fix smh

* use fconcat to make an even more complicated test
2024-07-22 12:45:23 -07:00
Elijah Ahianyo
9666244a87
[REF-3273] Add SVG circle, polygon and rect components (#3684) 2024-07-22 12:05:50 -07:00
Elijah Ahianyo
decdc857be
rx.list Dont set/hardcode list_style_position css prop (#3695) 2024-07-22 10:56:34 -07:00
Masen Furer
8b45d289bd
reflex init --ai fixups (#3691)
* reflex.build polling: catch exceptions and retry

Extend interval to 2 seconds to reduce server load.

* Add function to check if a string looks like a generation hash

* reflex init: allow --template to be a generation hash if --ai is specified
2024-07-19 14:05:53 -07:00
Thomas Brandého
921a5cd632
fix typo (#3689) 2024-07-19 18:02:50 +02:00
Masen Furer
1da606dd8e
[REF-3197] Browser init workflow (#3673) 2024-07-18 18:51:33 -07:00
Elijah Ahianyo
1bc1978c31
[REF-3135] Radix Primitive components should not ignore provided class_name prop (#3676) 2024-07-18 13:26:46 -07:00
Benyamin Zojaji
25aa0cbab1
add Persian translation and update the language links in the README.md files to include Persian (#3666) 2024-07-17 18:31:18 -07:00
Alek Petuskey
0a8b8a89b4
Benchmarking Updates (#3680)
* Benchmark test

* Lighthouse posthog

---------

Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MacBook-Pro.local>
2024-07-17 17:15:13 -07:00
Khaleel Al-Adhami
458cbfac59
[REF-3228] implement LiteralStringVar and format/retrieval mechanism (#3669)
* implement LiteralStringVar and format/retrieval mechanism

* use create safe

* add cached properties to ConcatVarOperation

* fix caches

* also include self

* fix inconsistencies in typings

* use default factory not default

* add missing docstring

* experiment with immutable var data

* solve pydantic issues

* add sorted function

* missing docs

* forgot ellipses

* give up on frozen

* dang it darglint

* fix string serialization bugs and remove unused code

* add returns statement

* whitespace moment

* add simple test for string concat

* export ConcatVarOperation
2024-07-17 17:01:27 -07:00
Masen Furer
94c4c2f29f
bump to 0.5.7 (#3678) 2024-07-16 11:38:56 -07:00
Alek Petuskey
93231f8168
Improve graphing asethetic (#3611)
* Improve graphing asthetic

* Few more updates

* More style updates

* Update reflex/components/recharts/polar.py

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

* Address pr comments

* fix precommit

* Fix types

* PYI

* PYI update

---------

Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MacBook-Pro.local>
Co-authored-by: Masen Furer <m_github@0x26.net>
2024-07-15 11:25:08 -07:00
lumin
ec35e4f256
feat: Improve documentation in Japanese README.md file (#3650) 2024-07-14 13:16:10 -07:00
Khaleel Al-Adhami
5b927f18d0
[REF-3222] define new JS-type var classes (#3668)
* define new JS-type var classes

* add docstring

* get rid of dataclass definitions and export all new vars

* order imports in the correct way

* only hash once
2024-07-12 14:42:08 -07:00
Manas Gupta
b04a7dab84
Update Radial Bar Component (#3662)
* add: radial bar properties

* add: generate new pyi file

* style: fix linting

---------

Co-authored-by: coolstorm <manas.gupta@fampay.in>
2024-07-12 13:29:21 -07:00
Masen Furer
0ed895cde7
debounce: pass through key and special_props (#3655)
These fields on the base Component were not being carried onto the
DebounceInput component (to be passed to the child).

Discovered while testing #3653
2024-07-12 13:27:19 -07:00
benedikt-bartscher
9663377374
cleanup unused useReducer import (#3667) 2024-07-12 12:55:25 -07:00
Elijah Ahianyo
eed0edc12a
Allow DebounceInput as child of FormControl Component (#3660) 2024-07-11 16:07:25 -07:00