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
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
Martin Xu
f372402ee4
[REF-2272] Support declaring EventHandlers directly in component ( #2952 )
2024-03-29 06:26:07 -07:00
Martin Xu
8edd1dfdc9
[REF-2269] Add add_imports
API for component class ( #2937 )
2024-03-28 11:03:26 -07:00
Masen Furer
432fcd4a5b
Account for imports of @rx.memo components for frontend package installation ( #2863 )
...
* CustomComponent ignores the annotation type in favor of the passed value
Do not require rx.memo wrapped functions to have 100% correct annotations.
* test_custom_component_get_imports: test imports from wrapped custom components
* Account for imports of custom components for frontend installation
Create new ImportVar that only install the package to avoid rendering the
imports in the page that contains the custom component itself.
* Handle Imports that should never be installed
* Fix up double negative logic
* Perf Optimization: use the imports we already calculate during compile
Instead of augmenting _get_imports with a weird, slow, recursive crawl and
dictionary reconstruction, just use the imports that we compile into the
components.js file to install frontend packages needed by the custom
components.
Same effect, but adds essentially zero overhead to the compilation.
2024-03-15 09:59:59 -07:00
Masen Furer
3350fa0388
Component: translate underscore suffix for props supported by chakra ( #2636 )
...
* Component: translate underscore suffix for props supported by chakra
type_ becomes type
min_ becomes min
max_ becomes max
id_ becomes id
The deprecation warning is only displayed when the underscore suffix prop is
passed and the non-underscore suffix prop is defined on the given component.
* Rename type_ to type in accordion and scroll_area
All of the new radix components avoid the underscore suffix names where
possible.
* Update deprecation warning wording
* Refactor for readability
* Do not raise deprecation warning for `id_`
id is kind of a special prop because it exists on all components
* Add test case for deprecating underscore suffix props
2024-02-15 20:46:06 -08:00
Masen Furer
f12746d859
Inherit _rename_props from parent classes ( #2613 )
...
Ensure that _rename_props from base classes add to the list of _rename_props in subclasses.
Add a test case to validate this behavior.
2024-02-14 14:36:01 -08:00
invrainbow
e729a315f8
Fix fstrings being escaped improperly ( #2571 )
2024-02-13 14:32:44 -08:00
Elijah Ahianyo
5e9b472d1b
[REF-1919] Valid Children/parents to allow Foreach,Cond,Match and Fragment ( #2591 )
2024-02-13 14:22:22 -08:00
invrainbow
61234ae164
Fix operator precedence ( #2573 )
2024-02-12 19:30:25 -08:00
Masen Furer
b607531318
Unbreak tests after recent changes in main (p2)
2024-02-08 10:46:40 -08:00
Masen Furer
c596651de6
Fix pre-commit issues introduced from merging origin/main
2024-02-08 10:28:45 -08:00
Nikhil Rao
05d1be2182
Move core components to radix namespace ( #2506 )
2024-02-02 14:26:46 -08:00
Nikhil Rao
5176a7cb14
Support component create methods as keys in global styles ( #2498 )
2024-01-31 12:25:18 -08:00
Tianze
209c5fab7b
Tabs validate parent is proper tab container ( #2463 )
2024-01-30 11:45:00 -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
Masen Furer
0211e9a0e5
Avoid passing props to lists and list items ( #2326 )
2023-12-21 15:58:45 -08:00
Nikhil Rao
93c97383d9
Refactor chakra components into separate folder ( #2315 )
2023-12-21 09:52:08 -08:00
Elijah Ahianyo
e3ee98098a
RED-1052/rx.State as Base State ( #2146 )
2023-11-29 09:43:33 -08:00
Masen Furer
527437cf23
[REF-144] Add context in each component to prevent rerenders ( #2198 )
2023-11-27 16:05:59 -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
Thomas Brandého
1a83f85783
_valid_children and _invalid_children accessible from class ( #2192 )
2023-11-17 12:30:18 -08: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
Elijah Ahianyo
06bdf9ed8a
Remove 0.3.0 deprecated features ( #1947 )
2023-10-19 09:44:32 -07:00
Thomas Brandého
211dc15995
New API to define triggers ( #1820 )
2023-09-21 09:47:22 -07:00
Nikhil Rao
ac8dfc5f91
Format component as React string ( #1848 )
2023-09-20 19:30:38 -07:00
Masen Furer
71811a600c
Var: __bool__ and __iter__ always raise a TypeError ( #1750 )
2023-09-05 13:44:22 -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
217a5806ee
Validate component children ( #1647 )
2023-08-23 15:56:27 -07:00
Nikhil Rao
139ce38df1
Rename pynecone to reflex ( #1236 )
2023-06-25 16:56:55 -07:00
TaiJuWu
0531d611dc
feature: support custom attribute for components ( #1085 )
2023-05-26 11:49:57 -07:00
Elijah Ahianyo
368b79f160
pc table validation ( #1075 )
2023-05-24 13:14:27 -07:00
Nikhil Rao
e6a679d3a3
Update pc.form on_submit args ( #1033 )
2023-05-16 12:09:15 -07:00
iron3oxide
32f3a387ae
Rename var module to vars ( #983 )
2023-05-09 23:01:25 -07:00
Thomas Brandého
893c0b132e
Make argument optional for event handlers ( #950 )
2023-05-06 13:10:35 -07:00
Elijah Ahianyo
18c715670a
Revamp Imports ( #926 )
2023-05-04 22:11:01 -07:00
Nikhil Rao
60323a3aec
Revert fstrings change ( #895 )
2023-04-27 14:36:20 -07:00
Nikhil Rao
f0346506d7
Allow fstrings as component children ( #890 )
2023-04-26 19:32:51 -07:00
Elijah Ahianyo
29945504bc
Dynamic vars initialization unit tests( #880 )
2023-04-26 14:41:47 -07:00
Masen Furer
c3148d348c
component.get_hooks: inject hook code into component func ( #810 )
2023-04-15 22:10:17 -07:00
Nikhil Rao
8eea6ac822
Add component memoization ( #770 )
2023-04-03 17:38:56 -07:00
iron3oxide
7067baf176
Refactor utils module ( #666 )
2023-03-16 14:59:27 -07:00
Nikhil Rao
0bd8f6acfc
Add keypress event handlers ( #523 )
2023-02-12 13:12:57 -08:00
Nikhil Rao
eb723b6ebe
Add compile error for invalid event handlers ( #482 )
2023-02-08 16:27:13 -08:00
Robert Neumann
fdf0e9ea6b
Add --no-zip pc CLI Parameter ( #479 )
2023-02-08 14:39:38 -08:00
Atharva Shah
2ccbfff223
General code cleanup ( #312 )
2023-01-22 10:58:07 -08:00
Nikhil Rao
3f27ce3442
Fix component decorator bugs ( #203 )
2023-01-04 15:20:33 -08:00
Nikhil Rao
d93e2cec00
Add decorator for custom components ( #193 )
2023-01-02 16:08:00 -08:00
Nikhil Rao
9ecadcc646
Improve prop error messages ( #84 )
...
* Add better error messages for component props
2022-12-13 11:31:57 -08:00