Commit Graph

1383 Commits

Author SHA1 Message Date
Masen Furer
3c8c7c3c46
[REF-1586] Use bun as a package manager on windows (#2359) 2024-04-11 16:43:01 -07:00
Thomas Brandého
e377ce70b6
add run_in_thread (#3077) 2024-04-11 16:42:14 -07:00
wassaf shahzad
4056ad613f
fix: removed .git in template URL (#3049) 2024-04-11 15:35:34 -07:00
Yummy-Yums
6837eb8e8f
Fix For When user selects Empty files using File Upload (#3051) 2024-04-11 15:35:15 -07:00
Masen Furer
fc0be257a3
Fix annotated EventHandler (#3076) 2024-04-11 15:34:00 -07:00
hugehope
713ee06ab7
chore: fix some typos in comments (#3071) 2024-04-11 14:34:23 -07:00
Thomas Brandého
a3cb475247
minimal fix for upload_url in rx.download (#3073) 2024-04-11 14:08:16 -07:00
Elijah Ahianyo
04ab2b9a71
[REF-2524] Tuple unpacking should apply at component level (#3062) 2024-04-11 14:04:19 -07:00
Masen Furer
1a11941577
[REF-2392] Expose next.config.js transpilePackages key (#3006) 2024-04-11 13:50:42 -07:00
Masen Furer
d7abcd45de
Force pydantic v1 for sqlmodel compatibility (#3026) 2024-04-11 13:42:30 -07:00
wassaf shahzad
9073a2781b
added serializer for enums (#3058) 2024-04-09 21:13:43 -07:00
Nikhil Rao
bf28dabd98
Bump to 0.4.7 (#3057) 2024-04-09 14:30:30 -07:00
Nikhil Rao
dd241a1097
Add frontend flag to _init (#3054) 2024-04-09 13:15:18 -07:00
Nikhil Rao
d5e3ccaed8
Get project name from pyproject (#3048) 2024-04-08 18:49:24 -07:00
Elijah Ahianyo
fdc944e002
Literal Error Formatting (#3037) 2024-04-08 11:29:40 -07:00
Elijah Ahianyo
a5d3ba419c
Run benchmarks when PR gets merged (#3022) 2024-04-08 11:22:25 -07:00
Martin Xu
67702e0927
remove prompt for display name (#3025) 2024-04-05 18:25:37 -07:00
Thomas Brandého
11a64e04d5
change to a nicer error message when reflex run fail (#3023) 2024-04-05 13:44:03 -07:00
Martin Xu
43dff5397c
bugfix in processing the user entered keywords for custom component share command (#3012) 2024-04-04 18:23:04 -07:00
Tom Gotsman
8c99a4a7f5
add logo to blank template (#3014) 2024-04-04 16:06:19 -07:00
Martin Xu
7d36610cae
Support reflex app creation from templates from github (#2490) 2024-04-04 15:31:34 -07:00
Nikhil Rao
44d6c997dd
Reflex run automatically inits when needed (#3011) 2024-04-04 14:34:12 -07:00
Martin Xu
ef5c5bea2b
[REF-2303] Update custom component template for new API (#3007) 2024-04-04 11:58:39 -07:00
Tom Gotsman
0619017626
adding a reflex logo component (#2994) 2024-04-04 11:26:25 -07:00
Nikhil Rao
9606c65060
Include architecture post in readme (#2993) 2024-04-04 11:20:05 -07:00
Thomas Brandého
8735e01e5c
add experimental namespace under rx._x (#2951)
* add experimental namespace under rx._x

* add warning when using rx._x
2024-04-04 19:59:28 +02:00
Phuc Tran
2ba526fb8e
Fix typo under page.py (#3001) 2024-04-04 09:26:45 -07:00
Martin Xu
5274f04b66
[REF-2296] Rename recursive functions (#2999) 2024-04-04 09:26:31 -07:00
Elijah Ahianyo
619c0b0d06
Exclude .web dir when running uvicorn (#2986) 2024-04-04 09:25:03 -07:00
Swaraj Baral
ae3dfc6412
Added custom_attrs to the list of trigger props (#2980) 2024-04-04 09:24:48 -07:00
Thomas Brandého
bf0ebb8d09
Lendemor/improve coverage (#2988)
* add more tests

* add tests to raise coverage

* more tests, bump coverage to 73

* fix up icon_button test

* fix darglint for app.py

* fix utcnow usage warning

* set threshold to 72

* fix timestamp

* fix unit tests for linux-redis

* removed commented code and put a TODO
2024-04-04 14:31:43 +02:00
Thomas Brandého
34ee07ecd1
use dict instead of set to store hooks (#2995) 2024-04-03 17:13:42 -07:00
Sidharth Anil
b2c51b82a5
Windows uvicorn bug fix (#2954) 2024-04-03 14:43:28 -07:00
Elijah Ahianyo
d43a85bab2
Unpack component tuples in a fragment (#2985) 2024-04-03 10:44:04 -07:00
Martin Xu
00b1e193ad
the keywords in pyproject.toml template have extra spaces (#2990) 2024-04-02 14:07:12 -07:00
Alek Petuskey
0981ac675b
Update sidebar template (#2959) 2024-04-02 11:48:34 -07:00
Aman Salwan
0e221f0984
Logic for removing the 'None' property along with its corresponding test case. (#2969) 2024-04-02 11:37:05 -07:00
Martin Xu
9504700777
remove types-tabulate from dev deps, it is in CLI (#2977) 2024-04-01 15:57:46 -07:00
Martin Xu
6d400eddc9
Revert "[REF-2269] Add add_imports API for component class (#2937)" (#2978)
This reverts commit 8edd1dfdc9.
2024-04-01 15:57:03 -07:00
Masen Furer
c357405c3e
bump to 0.4.6 (#2975) 2024-04-01 12:06:10 -07:00
Nikhil Rao
d4a546ba70
Relax typer pin (#2976) 2024-04-01 12:05:58 -07:00
Nikhil Rao
108d5aa5b2
Pin uvicorn and typer versions (#2974) 2024-04-01 11:34:03 -07:00
Martin Xu
df5489807d
adjust share command prompt (#2965)
* adjust share command prompt

* use lower case "y" for console.ask, keep order consistent as "y" then "n"

* share command update: do not suggest demo URL is mandatory, also move to the last question; when checking if user has permission to upsert package, do POST to record this package (if first time sharing)

* clean up prompt for preview image
2024-04-01 11:32:34 -07:00
Martin Xu
7e4668f5ca
[REF-2425] Reduce unnecessary CI runs (#2966) 2024-03-29 16:25:03 -07:00
Thomas Brandého
0af4770180
generate pyi files when building/publishing 3rd party component (#2945)
* build pyi files when building/publishing 3rd party

* fix typo in workflow

* add future annotation

* add tests to pass coverage check

* add more unit tests

* omit pyi_generator from test coverage

* change black from dev deps to direct deps

* remake all pyi

* format pyi if black is present, return as if otherwise

* fix requested changes

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-03-29 09:54:21 -07:00
Masen Furer
55b0fb36e8
[REF-2219] Avoid refetching states that are already cached (#2953)
* Add test_get_state_from_sibling_not_cached

A better unit test to catch issues with refetching parent states
and calculating the wrong parent state names to fetch.

* _determine_missing_parent_states: correctly generate state names

Prepend only the previous state name to the current relative_parent_state_name
instead of joining all of the previous state names together.

* [REF-2219] Avoid refetching states that are already cached

The already cached states may have unsaved changes which can be wiped out if
they are refetched from redis in the middle of handling an event.

If the root state already knows about one of the potentially missing states,
then use the instance that is already cached.

Fix #2851
2024-03-29 09:42:25 -07:00
Masen Furer
628c865530
Set is_hydrated=False at route onChangeStart (#2949)
* Connection pulser only depends on has_connection_errors

Avoid showing the WiFi error icon when the state is hydrating / navigating
because not being hydrated is not indicative of a connection error in itself.

* Set is_hydrated=False at route onChangeStart

When navigation event starts, set is_hydrated=False on the client side before
any on_load event is dispatched. This avoids a flickering problem where the
client browser navigates and briefly shows content on the page before
processing on_load events associated with the page.

Fix #2885

* Update pyi
2024-03-29 09:41:18 -07:00
Abhivyakt Bhati
ee66884e96
Update README.md (#2963)
Fixed deployment link. The previous one was wrong and led to a 404 error on Reflex's website
2024-03-29 09:28:33 -07:00
Malte Klemm
86526cba51
[REF-2127] Loosen requirements (#2796)
* Remove upper bounds of most dependencies.

Also adds a import try except block for pydantic.v1 and relocks.

Keep black and ruff to not mess to much with current formatting

Make pyright see the right import as long as constraint still lock pydantiv v1

Down pin pytest-asyncio again due to known issue

Fix upload handler with latest versions of fastapi

Change comment

* Add changed lockfile

* Set max versions for deps

* Revert app.pyi

---------

Co-authored-by: Malte Klemm <malte.klemm@blueyonder.com>
Co-authored-by: Nikhil Rao <nikhil@reflex.dev>
2024-03-29 09:26:53 -07:00
Masen Furer
5510eaf820
[REF-2265] ComponentState: scaffold for copying State per Component instance (#2923)
* [REF-2265] ComponentState: scaffold for copying State per Component instance

Define a base ComponentState which can be used to easily create copies of the
given State definition (Vars and EventHandlers) that are tied to a particular
instance of a Component (returned by get_component)

* Define `State` field on `Component` for typing compatibility.

This is an Optional field of Type[State] and is populated by ComponentState.

* Add integration/test_component_state.py

Create two independent counters and increment them separately

* Add unit test for ComponentState
2024-03-29 09:22:25 -07:00