Commit Graph

390 Commits

Author SHA1 Message Date
Elijah Ahianyo
61c6728006
[REF-2229]Dedupe deprecation warnings (#2871)
* Dedupe deprecation warnings

* Update reflex/utils/console.py

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

* address PR comments

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-03-26 16:33:55 +00:00
wassaf shahzad
15dc7f4552
added feature to automatically change port (#2867) 2024-03-25 17:38:28 -07:00
Masen Furer
7debd3dbb9
When __REFLEX_SKIP_COMPILE == "yes" allow telemetry to fail (#2881)
* When __REFLEX_SKIP_COMPILE == "yes" allow telemetry to fail

Allow running `--backend-only` without a .web directory

* When re-initializing a pre-project_hash project, do not blow up on KeyError
2024-03-19 14:30:55 -07:00
Masen Furer
479b5182aa
[REF-2216] Warn if windows is used with py312 (#2856)
Display a warning message, recommending python 3.11 with the current release of
reflex.

We need this until running with a uvicorn version that has better support for
py3.12 on windows.
2024-03-15 11:16:20 -07:00
Emmanuel Onwuegbusi
2a8d9d1ef4
added name of Var to error message (#2827) 2024-03-13 15:39:49 -07:00
Thomas Brandého
92db402539
telemetry refactor + unit tests (#2786) 2024-03-13 12:38:54 -07:00
Masen Furer
f52ff56440
[REF-2086] Avoid "Warning: The path to the Node binary could not be found. (#2803) 2024-03-13 12:35:43 -07:00
Thomas Brandého
e5fc5f9a83
better default title for seo (also remove default description) (#2844)
* better default title for seo (also remove default description)
2024-03-13 11:18:54 -07:00
Masen Furer
eb18ce90d5
[REF-2172] Add DECORATED_PAGES before compiling in thread (#2841) 2024-03-12 10:28:37 -07:00
benedikt-bartscher
8a3c9383fb
improve event handler state references (#2818) 2024-03-11 12:18:18 -07:00
Martin Xu
bf297e2f5b
[REF-2141] Custom component command improvements (#2807)
* add custom component command improvements

* fix test

* fix regex to include both single/double quotes
2024-03-07 20:42:22 -08:00
benedikt-bartscher
f5b7eca9c7
add support for sqlalchemy AssociationProxys (#2809)
* add support for sqlalchemy AssociationProxys

* python 3.8 compatibility
2024-03-07 15:19:35 -08:00
benedikt-bartscher
19a5cdd408
Track state usage (#2441)
* rebase

* pass include_children kwarg in radix FormRoot

* respect include_children

* ruff fixes

* readd statemanager init, run pyi gen

* minor performance imporovements, fix for state changes

* fix pyi and pyright

* pass include_children for chakra

* remove old state detection

* add test for unused states in stateless app

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-03-07 14:25:55 -08:00
Masen Furer
03aa28320a
Perf improvements (part 1) (#2779)
* types: remove runtime imports from `is_generic_alias`

Reduce try/except contexts for better performance.

* _decode_var optimizations:

* compile the regex once at module scope
* fast path string scan for REFLEX_VAR_OPENING_TAG before doing more complex logic

* Avoid repeated `hasattr` check in `is_union`

`is_union` gets called a lot, and the hasattr check can be resolved at import
time for better performance.
2024-03-06 10:42:20 -08:00
Carlos Llatser
2125701c2d
Fix encoding of the .gitignore file on Windows (#2797) 2024-03-06 09:40:55 -08:00
Masen Furer
fc190c8c8f
app_module_for_backend: wait for _compile in prod mode (#2760)
* Expose reflex.utils.exec.is_prod_mode

Formalize runtime checking of the app's `--env` parameter.

* app_module_for_backend: wait for _compile in prod mode

Prod mode uses separate worker processes that fork from the main process.

If the app is not fully compiled when the fork occurs, any further changes to
the app (like mounting the _upload endpoint) will not be reflected in the
workers. This is not a performance hit because compile is skipped anyway
for backend processes and hot reload is not in the picture for prod mode.

* remove _is_dev_mode and replace it with calls to is_prod_mode()

_is_dev_mode was a private function in the compiler, but now that utils.exec
exposes is_prod_mode, we should use that throughout for consistency
2024-03-04 16:50:31 -08:00
Pablo GS
bbb9253985
Solved Nodejs prerequisite check (#2767) 2024-03-03 19:47:05 -08:00
Tom Gotsman
93fc269860
initial attempt at writing test for urls (#2689)
* initial attempt at writing test for urls

* turn it into a pytest test

* fix precommit and add wrong url to make sure test work

* fix darglint error and fix url set error

* black error

* add to test .md files in reflex as well

* update to fix masen comment

* black formatting

* Fix trailing slash in reflex/state.py

---------

Co-authored-by: Tom Gotsman <tomgotsman@Toms-MacBook-Pro.local>
Co-authored-by: Tom Gotsman <tomgotsman@toms-mbp.lan>
Co-authored-by: Masen Furer <m_github@0x26.net>
2024-02-29 13:45:57 -08:00
Elijah Ahianyo
7ec7f031a3
Only alert users of reflex upgrade once per project (#2731) 2024-02-27 17:12:21 -08:00
Masen Furer
deae662e2a
[REF-1988] API to Get instance of Arbitrary State class (#2678)
* WiP get_state

* Refactor get_state fast path

Rudimentary protection for state instance access from a background task
(StateProxy)

* retain dirty substate marking per `_mark_dirty` call to avoid test changes

* Find common ancestor by part instead of by character

Fix StateProxy for substates and parent_state attributes (have to handle in
__getattr__, not property)

Fix type annotation for `get_state`

* test_state: workflow test for `get_state` functionality

* Do not reset _always_dirty_substates when adding vars

Reset the substate tracking only when the class is instantiated.

* test_state_tree: test substate access in a larger state tree

Ensure that `get_state` returns the proper "branch" of the state tree depending
on what substate is requested.

* test_format: fixup broken tests from adding substates of TestState

* Fix flaky integration tests with more polling

* AppHarness: reset _always_dirty_substates on rx.State

* RuntimeError unless State is instantiated with _reflex_internal_init=True

Avoid user errors trying to directly instantiate State classes

* Helper functions for _substate_key and _split_substate_key

Unify the implementation of generating and decoding the token + state name
format used for redis state sharding.

* StateManagerRedis: use create_task in get_state and set_state

read and write substates concurrently (allow redis to shine)

* test_state_inheritance: use polling cuz life too short for flaky tests

kthnxbai ❤️

* Move _is_testing_env to reflex.utils.exec.is_testing_env

Reuse the code in app.py

* Break up `BaseState.get_state` and friends into separate methods

* Add test case for pre-fetching cached var dependency

* Move on_load_internal and update_vars_internal to substates

Avoid loading the entire state tree to process these common internal events. If
the state tree is very large, this allow page navigation to occur more quickly.

Pre-fetch substates that contain cached vars, as they may need to be recomputed
if certain vars change.

* Do not copy ROUTER_DATA into all substates.

This is a waste of time and memory, and can be handled via a special case in
__getattribute__

* Track whether State instance _was_touched

Avoid wasting time serializing states that have no modifications

* Do not persist states in `StateManagerRedis.get_state`

Wait until the state is actually modified, and then persist it as part of `set_state`.

Factor out common logic into helper methods for readability and to reduce
duplication of common logic.

To avoid having to recursively call `get_state`, which would require persisting
the instance and then getting it again, some of the initialization logic
regarding parent_state and substates is duplicated when creating a new
instance. This is for performance reasons.

* Remove stray print()

* context.js.jinja2: fix check for empty local storage / cookie vars

* Add comments for onLoadInternalEvent and initialEvents

* nit: typo

* split _get_was_touched into _update_was_touched

Improve clarity in cases where _get_was_touched was being called for its side
effects only.

* Remove extraneous information from incorrect State instantiation error

* Update missing redis exception message
2024-02-27 13:02:08 -08:00
Thomas Brandého
467fb794da
fix telemetry for init event (#2736) 2024-02-27 18:53:57 +01:00
benedikt-bartscher
93f402c773
Initial values for computed vars (#2670)
* initial values for computed vars draft

* add tests, add computed_var overloads

* fix darglint

* pass initial to substates when calling dict

* add tests for for child states

* format black

* allow None as initial value

* rename runtime_only to raises_at_runtime

* cleanup unused arguments of ComputedVars

* refactor cached_var to be partial of computed_var
2024-02-24 13:45:07 -08:00
Krys
278183b526
fix image serializing - REF-1889 (#2550)
* fix image serializing

* If get_format_mimetype does not work, look up format in Image.MIME

Throw a warning if the image format does not have an associated MIME type and
ultimately fallback to image/png and let the browser figure it out.

* test_media: end to end serialization of PIL images

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-02-22 08:13:19 -08:00
Martin Xu
a3be76fb75
use sync redis client to sanity check (#2679) 2024-02-21 07:01:44 -08:00
benedikt-bartscher
6c49b96d9d
Fix SQLAlchemy list types (#2668)
* fix sqlalchemy relationship list type hints

* py3.8 and py3.9 compatibility

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

* add missing import

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-02-20 15:14:33 -08:00
Nikhil Rao
4ad238c42c
Update deprecation version to 0.5.0 (#2642) 2024-02-16 11:23:15 -08:00
Masen Furer
1698e3e5e3
Fix more information link to v0.4.0 blog post (#2638) 2024-02-15 20:51:06 -08:00
Masen Furer
d979d99338
[REF-1902] [REF-1987] Chakra upgrade message (#2624)
* Show rx.chakra upgrade message _before_ overwriting the version

Ensure that the conditions for showing the rx.chakra upgrade message
are checked before overwriting the version saved in .web/reflex.json.

Check for the absense of a config file to suppress the upgrade message
when init'ing a brand new project.

Check for the existance of `reflex.json` before opening it, since it
might not exist at the point it's checked.

* Update more information link in chakra upgrade message

* Fix long line
2024-02-15 12:49:53 -08:00
invrainbow
e729a315f8
Fix fstrings being escaped improperly (#2571) 2024-02-13 14:32:44 -08:00
invrainbow
61234ae164
Fix operator precedence (#2573) 2024-02-12 19:30:25 -08:00
Masen Furer
eafe53369e
keep-chakra: whitelist is always whitelist (#2585)
Regardless of whether the same name exists in the top level rx.<x> namespace,
always convert whitelisted names to rx.chakra.<x>
2024-02-12 14:55:39 -08:00
Masen Furer
58b5e2f5bd
Merge remote-tracking branch 'origin/main' into reflex-0.4.0 2024-02-09 19:38:35 -08:00
Elijah Ahianyo
ccc9c32c95
Get rx.color working with fstrings (#2562)
* fix for rx.color working with fstrings

* Fix fstrings issues
2024-02-09 17:06:55 -08:00
Masen Furer
3619595bcc
Fixup import of ChakraComponent
It is no longer exposed in rx.components namespace
2024-02-08 12:50:07 -08:00
Elijah Ahianyo
601dd34792
rx.color to work with conditional vars (#2546) 2024-02-08 11:45:15 -08:00
Elijah Ahianyo
64a90fa6eb
Decorator to validate rx.color prop fields (#2553) 2024-02-08 11:21:46 -08:00
jackie-pc
a4ee985509
CLI script to maintain Chakra backed components in rx namespace in older apps (#2322) 2024-02-08 11:12:20 -08:00
Alek Petuskey
5589cbbfc2
Refactor rx.color (#2522)
* Refactor

* Lint

* Change name space to top level

* Update test

* Lint

* Fix pyright

* Update pyi

---------

Co-authored-by: Alek Petuskey <alekpetuskey@aleks-mbp.lan>
Co-authored-by: Nikhil Rao <nikhil@reflex.dev>
2024-02-04 15:39:07 -08:00
jackie-pc
80c9eb34e4
Rework telemetry to support installation_id (#2480) 2024-01-31 11:39:48 -08:00
benedikt-bartscher
be7f7969ed
improve sqlalchemy type parsing (#2474)
* improve sqlalchemy type parsing

* add support for propertys and relationships

* cleanup duplicate property check

* avoid confusion, improve readability
2024-01-30 15:57:56 -08:00
Alek Petuskey
670faf291a
[WIP] rx.color (#2443)
* Color module intial commit

* Improvments

* Update reflex/constants/colors.py

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

* Comments+tests

* Fix import

---------

Co-authored-by: Alek Petuskey <alekpetuskey@aleks-mbp.lan>
Co-authored-by: Masen Furer <m_github@0x26.net>
Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MacBook-Pro.local>
2024-01-28 14:06:08 -08:00
benedikt-bartscher
0d8efb9b55
parse return type annotations of sqlalchemy hybrid properties (#2422)
* parse return type annotations of sqlylchemy hybrid properties

* use get_type_hints instead of __annotations__
2024-01-23 14:00:07 -08:00
Masen Furer
9446a1e99f
[REF-1705] Do not overwrite Var attributes during format (#2421) 2024-01-19 15:17:00 -08:00
Masen Furer
6fcc4fd357
Allow app harness tests to import State subclasses (#2408) 2024-01-18 12:54:29 -08:00
jackie-pc
2c270585ab
Skip frontend packages install if previously done (#2400) 2024-01-16 17:52:28 -08:00
benedikt-bartscher
1aca1b677f
fix is_backend_variable for dunder prefixed variables (#2391) 2024-01-16 17:37:05 -08:00
Elijah Ahianyo
26a9e79a5f
Resolve correct python path on windows (#2373) 2024-01-09 09:58:06 -08:00
Masen Furer
87844c3f7d
Enable real app AppHarness tests to not specify state= (#2358) 2024-01-05 17:47:31 -08:00
Elijah Ahianyo
abfc099779
rx.match component (#2318)
* initial commit

* add more tests

* refactor match jinja template

* add docstrings

* cleanup

* possible fix for pyright

* fix conflicts

* fix conflicts again

* comments

* fixed bug from review

* fix tests

* address PR comment

* fix tests

* type error improvement

* formatting

* darglint fix

* more tests

* stringify switch condition and cases as js doesnt support complex types(lists and dicts) in switch cases.

* Update reflex/vars.py

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

* change usages

* Precommit fix

---------

Co-authored-by: Alek Petuskey <alek@pynecone.io>
Co-authored-by: Masen Furer <m_github@0x26.net>
Co-authored-by: Alek Petuskey <alekpetuskey@aleks-mbp.lan>
2024-01-04 09:48:18 -08:00
benedikt-bartscher
58a7e5e460
support parsing type args of DeclarativeBase subclasses (#2348) 2024-01-03 11:55:07 -08:00
Jishnu N
c5c42665eb
add: reflex init app name validator (#2336) 2023-12-28 00:07:55 -08:00
Nikhil Rao
5d21f0ca60
Add high-level API for accordion (#2285) 2023-12-18 17:21:49 -08:00
jackie-pc
7388617b72
apps should no longer call "app.compile()" (#2291) 2023-12-18 16:06:21 -08:00
Martin Xu
3c07537c11
only exclude assets folder if it's in the root_dir (#2308) 2023-12-18 15:51:13 -08:00
jackie-pc
92bd3da676
capture exceptions thrown by any process in run_concurrently_context (#2296) 2023-12-14 14:41:45 -08:00
Martin Xu
9da65b9a9a
[REF-1464] Handle requirements.txt encoding (#2284) 2023-12-14 14:25:40 -08:00
Masen Furer
e245b6b6a0
support SQLModel 0.0.14 + SQLAlchemy 2 (#2283) 2023-12-12 17:52:11 -08:00
Elijah Ahianyo
9629b59617
DataFrame Serializer fix (#2281) 2023-12-12 14:03:40 -08:00
benedikt-bartscher
f90982ea06
use redis-py url syntax for redis_url (#2267)
* use redis-py url syntax for redis_url

* port is optional

* Add StateManagerRedis.close method

The close helper method always calls `close_connection_pool=True` so that all
outstanding redis operations can be stopped before changing event loops.

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2023-12-12 10:54:10 -08:00
Masen Furer
e52267477c
[REF-1417] Convert underscore-prefixed style props to pseudo selector (#2266) 2023-12-11 13:37:57 -08:00
Alek Petuskey
421be5748b
Warning if newer reflex/reflex-hosting-cli available (#2271)
* Check to see if there are new reflex version avaliable if so throw a warning

* precommit

* request -> httpx

* Fix pr comments

* Forgot import

* Generalize check_latest_package_version

---------

Co-authored-by: Alek Petuskey <alekpetuskey@aleks-mbp.lan>
Co-authored-by: Alek Petuskey <alekpetuskey@Aleks-MBP.attlocal.net>
2023-12-08 21:21:12 -08:00
Thomas Brandého
caf32605ca
add next/image and next-video in next namespace (#2223) 2023-12-07 10:38:47 -08:00
Masen Furer
60147dec65
[REF-201] Separate on_load handler from initial hydration (#1847) 2023-11-30 12:21:15 -08:00
Elijah Ahianyo
e3ee98098a
RED-1052/rx.State as Base State (#2146) 2023-11-29 09:43:33 -08:00
Martin Xu
f8395b1fd6
Separate out the hosting CLI from main repo (#2165) 2023-11-28 15:20:06 -08:00
Masen Furer
527437cf23
[REF-144] Add context in each component to prevent rerenders (#2198) 2023-11-27 16:05:59 -08:00
Thomas Brandého
8fc254041b
fix name for import var when is default and add tests (#2214) 2023-11-26 12:46:43 -08:00
Masen Furer
1603144c7d
[REF-889] useContext per substate (#2149) 2023-11-21 11:52:06 -08:00
Nikhil Rao
e9437ad941
Use singleton app provider to speed up compiles (#2172) 2023-11-20 18:11:24 -08:00
Tom Gotsman
5198daebae
keep app id (project hash) the same even after re-init (#2195) 2023-11-20 15:30:14 -08:00
Elijah Ahianyo
714edb3cde
REF-1202: Upgrade bun version if it differs from reflex set version (#2206) 2023-11-20 15:21:17 -08:00
Elijah Ahianyo
7f810ece21
To camel case fix (#2205) 2023-11-20 11:33:48 -08:00
Nikhil Rao
c3e652b8c1
Speed up reflex CLI imports (#2185) 2023-11-17 12:31:07 -08:00
Nikhil Rao
f1005e774e
Fix missing lazy imports (#2187) 2023-11-16 13:20:48 -08:00
Martin Xu
adb26787c8
Hosting CLI: remove requirements generation when init, add back timeout for deploy command, remove deploy legacy command (#2179) 2023-11-15 16:23:34 -08:00
Elijah Ahianyo
ea22452b27
Reduce Syntax highlighter footprint (#2037) 2023-11-13 12:47:55 -08:00
Thomas Brandého
39cc1b2f12
Upgrade to NextJS 14 (#2142) 2023-11-13 09:52:51 -08:00
Masen Furer
5e6520cb5d
Support Form controls via name attribute (no ID or ref) (#2012) 2023-11-10 12:58:59 -08:00
Elijah Ahianyo
7a04652a6a
Revert "Bun as runtime on Mac and Linux (#2138)" (#2153) 2023-11-09 13:01:48 -08:00
Elijah Ahianyo
4d6fa9b823
Bun as runtime on Mac and Linux (#2138) 2023-11-08 16:22:02 -08:00
Thomas Brandého
c835ad0737
fix to_snake_case and add tests (#2133) 2023-11-06 12:13:28 -08:00
Nikhil Rao
6e1bce3412
Prompt for template on reflex init (#2122) 2023-11-03 13:37:01 -07:00
Martin Xu
4c97b4c4c0
Hosting CLI: use http endpoint to return deploy milestones (#2085) 2023-11-03 12:13:46 -07:00
Martin Xu
4a526620ac
[REF-1042] Hosting CLI: check the user selected app name (#2102) 2023-11-02 14:34:10 -07:00
Nikhil Rao
6e71393ed5
Use blank template as default (#2109) 2023-11-01 15:59:34 -07:00
Masen Furer
8eb68a006e
Expose gunicorn_worker_class via Config (#2084) 2023-10-31 13:45:29 -07:00
Masen Furer
56476d0a86
Expose DOM event actions on EventHandler, EventSpec, and EventChain (stopPropagation) (#1891)
* Expose preventDefault and stopPropagation for DOM events

All EventHandler, EventSpec, and EventChain can now carry these extra
"event_actions" that will be applied inside the frontend code when an event is
triggered from the DOM.

Fix #1621
Fix REF-675

* Test cases (and fixes) for "event_actions"

* form: from __future__ import annotations

for py38, py39 compat

* Revert overzealous merge conflict resolution
2023-10-31 11:42:42 -07:00
Martin Xu
8ad9f3a96e
show all columns in list deployments, let CP control what columns user see (#2061) 2023-10-27 13:56:30 -07:00
Nikhil Rao
bb77d14fbc
Update demo command to open demo.reflex.run (#2059) 2023-10-27 13:16:02 -07:00
Martin Xu
23255d49d4
Add back build log command to CLI (#2053) 2023-10-27 11:30:04 -07:00
Masen Furer
ff4c5a5cf8
Remove .pyc and __pycache__ from template dir (#2056) 2023-10-27 11:20:46 -07:00
Nikhil Rao
8133aa10c9
Update base template (#2027) 2023-10-26 17:59:14 -07:00
Masen Furer
f66c6c3361
Support callback for rx.call_script (#2045) 2023-10-26 17:54:48 -07:00
Martin Xu
e9cf822460
CLI will not set auto/stop setting for deployment (#2040)
* do not set autostart/autostop as default on CLI

* cli feedback

* fix test

* clean up last few messages

* catch general exception for export and exit
2023-10-26 17:47:22 -07:00
Alek Petuskey
70a6b5f2d3
Autogenerating Dependencies During Deployment (#2033) 2023-10-26 17:32:58 -07:00
Thomas Brandého
9a5579e1ef
Add datagrid editor (#1941) 2023-10-26 16:17:34 -07:00
Martin Xu
fe01f0cf11
add region check upfront when user deploys interactively (#2030) 2023-10-26 10:07:49 -07:00
Masen Furer
92dd68c51f
Improve Var type handling for better rx.Model attribute access (#2010) 2023-10-25 11:55:50 -07:00
Martin Xu
f404205c3f
CLI improvements (#2026) 2023-10-24 15:35:51 -07:00
Martin Xu
81053618c9
CLI switch to prod server (#2016) 2023-10-24 09:43:20 -07:00
jackie-pc
b3499e6b7a
[reflex export] backend.zip excludes dirs that look like venv dirs (#2009) 2023-10-23 09:01:42 -07:00
Masen Furer
91bbf91c52
Resolve npm path and fnm path on Windows (#2015) 2023-10-23 08:59:48 -07:00
Thomas Brandého
d00425276d
fix fnm version check (#2014) 2023-10-23 08:45:55 -07:00
Martin Xu
07ca8fcb3b
[REF-99] Add first version of CLI for hosting service (#1810) 2023-10-21 13:09:56 -07:00
jackie-pc
c653f95435
support exporting to zip archives to a dir that is not cwd (to be used by hosting cli) (#2005) 2023-10-20 09:40:30 -07:00
Nikhil Rao
e7f0cd8e4c
Stop double compiles in dev mode (#1990) 2023-10-19 15:26:14 -07:00
Elijah Ahianyo
06bdf9ed8a
Remove 0.3.0 deprecated features (#1947) 2023-10-19 09:44:32 -07:00
Nikhil Rao
b4bb849388
Fix posthog (#1992) 2023-10-18 12:30:09 +02:00
Thomas Brandého
df09c716c6
fix serialization as a whole for list/dict/Base containing custom items to serialize (#1984) 2023-10-17 10:44:54 -07:00
Masen Furer
d1d5812602
format: event arg values use backticks (#1926) 2023-10-17 10:42:35 -07:00
Elijah Ahianyo
c6abeb31a5
Props as Literals (#1921) 2023-10-15 20:16:39 -07:00
Alek Petuskey
7d4194be34
Added base template + improve templating code (#1937) 2023-10-15 20:02:41 -07:00
Masen Furer
024cb5fa9b
Var field cleanup (#1943) 2023-10-13 14:53:55 -07:00
Nikhil Rao
85937c2369
Pin frontend package versions (#1920) 2023-10-05 12:45:21 -07:00
Elijah Ahianyo
513835cf74
Update Deprecations (#1927) 2023-10-05 12:12:42 -07:00
Elijah Ahianyo
68664a5094
Deprecate set_cookie and set_local_storage (#1917) 2023-10-04 14:15:37 -07:00
Masen Furer
0a196693a3
Add Editor component (#1851) 2023-10-02 09:41:58 -07:00
Thomas Brandého
dcb17103bb
code cleanup (split constants into a folder) (#1866) 2023-09-28 17:27:20 -07:00
Elijah Ahianyo
26885d98cf
rx.table __bool__ regression fix (#1828) 2023-09-28 09:31:01 -07:00
Nikhil Rao
41872dfdc9
Format event handlers not in importable modules (#1875) 2023-09-27 11:30:15 -07:00
Nikhil Rao
8231993e5a
Improvements to custom styles in rx.markdown (#1852) 2023-09-25 15:59:48 -07:00
Masen Furer
351611ca25
rx.background and StateManager.modify_state provides safe exclusive access to state (#1676) 2023-09-21 11:42:11 -07:00
Thomas Brandého
211dc15995
New API to define triggers (#1820) 2023-09-21 09:47:22 -07:00
Thomas Brandého
84bae0dc7d
use jinja2 to render package.json (#1849) 2023-09-21 09:46:11 -07:00
Masen Furer
0cd7242bb2
exec: print the URL, not the address the server binds to (#1846) 2023-09-20 19:31:06 -07:00
Elijah Ahianyo
d81d544b97
add option to disable Tailwind (#1842) 2023-09-20 16:47:58 -07:00
Nikhil Rao
3113aecb30
Support custom styling for code in markdown (#1844) 2023-09-20 11:40:25 -07:00
Nikhil Rao
264c44e630
Disable metrics in CI (#1822) 2023-09-15 18:15:25 -07:00
Nikhil Rao
1938a6cc58
Add serializers for different var types (#1816) 2023-09-15 17:19:26 -07:00
Elijah Ahianyo
06a110a07d
Style props with Callable Values (#1751) 2023-09-12 11:26:53 -07:00
Elijah Ahianyo
891e6a4736
Allow underscores in routes (#1713) 2023-09-08 12:18:33 -07:00
Nikhil Rao
47d789e9a6
Don't show error logs on sigint (#1781) 2023-09-07 15:54:52 -07:00
Masen Furer
43ac87f5ca
exec: don't debug print the line, processes.stream_logs already does (#1780) 2023-09-07 15:31:08 -07:00
Nikhil Rao
abc09f9074
Don't show app running message twice (#1770) 2023-09-07 01:41:26 -07:00
Elijah Ahianyo
141d1c3aab
Deprecation warning enhancement (#1738) 2023-09-06 10:46:44 -07:00
Masen Furer
38c5503f94
Client-side Routing (404 redirect) (#1695) 2023-09-05 16:22:00 -07:00
Thomas Brandého
03a92bc60e
remove frontend_package option (#1700) 2023-09-05 13:45:18 -07:00
Masen Furer
71811a600c
Var: __bool__ and __iter__ always raise a TypeError (#1750) 2023-09-05 13:44:22 -07:00
wassaf shahzad
e99d6723bc
added changes for datetime (#1745)
* added changes for datetime

* fixed formatting

* fixed darglint issue

* test_state: check for other datetime module classes

* utils/types.py: use issubclass check

fix docstring copy/paste issue

* utils/format.py: reuse types.is_datetime check

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2023-09-04 22:29:02 -07:00
Nev Delap
41e97bbc46
Issues 1633 Add frontend_path to config to support running multiple reflex apps off the same domain, and 1583 Show the correct info on where the site is being served. (#1724)
* Support setting Next.js basePath in Reflex config. (#1633)

- Tests.
- And sorted config in next.config.js template.

* Display the correct running at url with basePath if it is set. (#1583)

* Formatting, fixed by black.

* Fix indenting in test data.

* Fixed that conflict resolution shouldnt have included console.debug line.

* Rmove use of :=. Add http:// to url. Use urljoin to build url.
2023-09-02 06:38:22 -07:00
Elijah Ahianyo
829a7751b5
Refactor: Move format_prop Static Method for Improved Reusability (#1714) 2023-09-01 13:01:11 -07:00
Nikhil Rao
1d9f25be6d
Fix project hash and modernize type annotations (#1704) 2023-08-31 17:04:39 -07:00
Alek Petuskey
fed75ea7f8
Incrementally Add New Packages (#1607) 2023-08-31 14:20:44 -07:00
Masen Furer
2392c52928
Implement on_mount and on_unmount for all components. (#1636) 2023-08-30 09:50:39 -07:00
Elijah Ahianyo
689f078aa3
Fix Node Installation on ARM-based Macs with FNM (#1701) 2023-08-29 14:59:56 -07:00
Nikhil Rao
6bfce48b0c
Use stream_logs for frontend process (#1682) 2023-08-25 16:16:51 -07:00
Masen Furer
3916668461
Avoid compile step when running production backend (#1665) 2023-08-25 14:50:03 -07:00
Elijah Ahianyo
dbaa6a1e56
Fnm and node for POSIX (#1606) 2023-08-25 13:04:10 -07:00
Martin Xu
76b8af3b42
Refactor zipping in reflex export (#1668) 2023-08-23 17:18:16 -07:00
Masen Furer
81fd9d1e9c
Run backend from the main thread in dev mode (#1653) 2023-08-23 16:52:54 -07:00
Masen Furer
e6dfe67594
Show config in system debug (#1626) 2023-08-18 15:02:44 -07:00
Nikhil Rao
0beb7a409f
Clean up config parameters (#1591) 2023-08-18 14:22:20 -07:00
Thomas Brandého
f771894077
add system infos to output when in loglevel debug (#1567) 2023-08-18 13:00:49 -07:00
Martin Xu
fd4a6257c3
Remove unused full_control related code (#1624)
* remove full_control related code

* remove more unused code
2023-08-18 12:56:33 -07:00
wassaf shahzad
0be5d670ed
Added fix for serializing PIL images (#1619) 2023-08-18 11:17:42 -07:00
Elijah Ahianyo
98fae89319
Automatic Install FNM and Node for Windows: (#1566) 2023-08-17 11:23:09 -07:00
Masen Furer
26e45c1f18
format_dict: only unescape quotes when removing outer quotes (#1609) 2023-08-17 09:45:25 -07:00
Elijah Ahianyo
ed4de0d7ba
Reinstate bun path (#1552) 2023-08-15 17:39:43 -07:00
Nikhil Rao
6d15326abf
Support f-strings in component children and non-style props (#1575) 2023-08-14 11:33:16 -07:00
Nikhil Rao
fbcfb51771
App harness use new_process (#1573) 2023-08-11 17:54:34 -07:00
Alek Petuskey
005c7df394
Add windows warning message. (#1570) 2023-08-11 13:54:32 -07:00
Thomas Brandého
cd47815a4d
form support more inputs (#1554) 2023-08-10 09:54:04 -07:00
Elijah Ahianyo
a9b7394e0e
Remove Home folder for windows (#1502) 2023-08-03 14:27:38 -07:00
jackie-pc
c452ec774d
CI: Basic integration test for WSL (#1510) 2023-08-03 14:26:09 -07:00
Masen Furer
919f239168
check_initialized: skip REFLEX_DIR check for backend only (#1478) 2023-08-02 06:33:56 -07:00
jackie-pc
837978f378
Full OS matrix builds for unit and integration tests (Linux, Mac, Windows) (#1460) 2023-08-01 11:34:12 -07:00
Nikhil Rao
91c0de4b5f
Use concurrent.futures for threading (#1483) 2023-07-31 17:45:40 -07:00
Nikhil Rao
f01eff5b29
Show status bar on reflex init (#1467)
* Show status bar on reflex init

* Fix tests

* Fix version

* Fix test
2023-07-30 20:45:34 -07:00
Nikhil Rao
068bcd906e
Add unified logging (#1462) 2023-07-30 19:58:48 -07:00
Nikhil Rao
e1cb09e9d4
Remove curl and parallelize node/bun install (#1458) 2023-07-28 17:53:24 -07:00
Thomas Brandého
6555234dee
fix breadcrumb API & add get_page_crumbs method (#1387) 2023-07-28 16:40:49 -07:00
Nikhil Rao
7304351a66
Improve prerequisites check (#1454) 2023-07-28 16:29:50 -07:00
Thomas Brandého
6bc622e67d
update behaviour for wrong state passed as argument (#1447) 2023-07-28 11:18:36 -07:00
Nikhil Rao
e26bba80a6
Create ~/.reflex directory and update integration tests (#1419) 2023-07-27 16:39:53 -07:00
jackie-pc
7a09554cfa
dev-mode compile: purge .web dir at last min to reduce downtime window (#1430) 2023-07-26 16:04:48 -07:00
TaiJuWu
0a25859255
feature: Auto install node by nvm on Linux (#1404) 2023-07-25 00:12:39 -07:00
Siddhant Goel
6f5ac6ace2
fix: check bun installation exit code during reflex init (#1385) 2023-07-21 11:43:15 -07:00
Nikhil Rao
d1924bb4a6
Fix sitemap output dir (#1382) 2023-07-19 17:55:52 -07:00
Nikhil Rao
3f151f054d
Generate sitemap on export (#1358)
* Generate sitemap on export

* Remove prints
2023-07-17 23:14:37 -07:00
Alek Petuskey
be9120b251
Export Error Handling + Improved CLI (#1359) 2023-07-17 22:50:57 -07:00
Masen Furer
4a661a5395
reflex db migrate CLI and associated config (#1336) 2023-07-17 18:06:50 -07:00
pigeon
d6b191538e
Add custom message when the user exits an app (#1345) 2023-07-17 11:45:48 -07:00
Nikhil Rao
7397cd795a
Optimize dev mode compile (#1348) 2023-07-17 11:42:07 -07:00
Thomas Brandého
c15839da40
parameter for turning off nextJS compression (#1316) 2023-07-13 15:33:01 -07:00
Masen Furer
ffa6ddf8b8
migrate_to_reflex: convert pcconfig to rxconfig (#1270)
* migrate_to_reflex: convert pcconfig to rxconfig

fix #1269

* migrate_to_reflex: replace pynecone.io links with reflex.dev
2023-06-29 16:10:48 -07:00
Elijah Ahianyo
272f0eb003
Bugfix: Some Pages are not Generated: (#1278)
Fix issue with some pages not being generated
2023-06-29 16:01:31 -07:00
Nikhil Rao
bb96e12940
Fix missing stdout in event handlers (#1271) 2023-06-28 16:26:09 -07:00
Maks Rybalchenko
71425b2077
exclude .web folder from uvicorn file sync (#1252) 2023-06-26 18:46:34 -07:00
Sergei Ozeranskii
1dfe76c4a3
Unify the launch of child processes (#1250) 2023-06-26 14:50:23 -07:00
Nikhil Rao
139ce38df1
Rename pynecone to reflex (#1236) 2023-06-25 16:56:55 -07:00