Commit graph

145 commits

Author SHA1 Message Date
Zach Daniel
6bf3aa2fd6 improvement: add clear_value/1 2022-12-20 22:18:55 -05:00
Zach Daniel
44c9ffb04c improvement: add prepare_source option for seeding changesets
fix: small logic bug when setting param value
2022-12-15 16:40:24 -05:00
Rebecca Le
ac3e2dc9ac
feat: add custom HTTP status codes for specific types of errors that can be thrown (#62) 2022-11-23 03:42:06 -05:00
Zach Daniel
87cd90cfc0 improvement: properly pass actor and tenant down to nested changesets 2022-11-02 20:37:41 -07:00
Zach Daniel
701512f23b fix: properly retain sorting of list forms 2022-10-27 22:43:20 -05:00
Zach Daniel
72b4de3f4f fix: infinite loop in inspect
test: test new form errors
2022-10-09 23:22:13 -04:00
Zach Daniel
6fb3b7ac9f fix: populate hidden fields from server-side form by default 2022-10-06 22:33:36 -04:00
Zach Daniel
882fe2fb65 improvement: clear filter form value when field changes 2022-10-04 00:54:50 -04:00
Frank Dugan III
e1f283636e
fix: select first public attribute as field when remapping path
fix: update_predicate correctly handles existing predicate
2022-09-30 16:40:23 -04:00
Frank Dugan III
8f59f15bea
fix: nested groups have correct form names (#54) 2022-09-28 14:34:50 -04:00
Frank Dugan III
b088969315
feat: append predicate path w/ field when relationship (#53) 2022-09-26 19:32:49 -04:00
Zach Daniel
bcfb2b9483 improvement: update to latest ash 2022-09-21 01:24:52 -04:00
Zach Daniel
b64cd13941 improvement: support latest ash 2022-09-14 13:21:36 -04:00
Zach Daniel
b2f0e77d09 improvement: support ash 2.0 properly 2022-08-30 17:40:03 -06:00
Zach Daniel
443342c76f fix: require setting include_non_map_types? for non map types 2022-08-23 22:45:13 -04:00
Zach Daniel
343e70b6d5 improvement: update to latest ash
fix: remove typo from new transform_params logic
2022-08-22 16:14:27 -04:00
Zach Daniel
336b5c7931 fix: shore up missing cases around transform_params 2022-08-22 15:44:42 -04:00
Zach Daniel
dff7d12e86 improvement: support non-map type nested forms 2022-08-22 14:31:28 -04:00
Zach Daniel
1bbe7c34db fix: mark forms updated with update_form/4 as touched by default 2022-08-16 22:16:47 -04:00
Zach Daniel
6ad0183759 fix: handle errors in form change tracking 2022-08-15 12:31:07 -04:00
Zach Daniel
72a2965107 fix: properly parse string paths in FilterForm
improvement: add `update_predicate/3`
2022-08-13 15:10:47 -04:00
Zach Daniel
9cc3ceb636 Revert "improvement: add form_only_field/5"
This reverts commit b9cdfd09fc.
2022-08-02 19:18:27 -04:00
Zach Daniel
549caa40bc Revert "fix: fix nested form_only_fields and add more tests"
This reverts commit bd60b02341.
2022-08-02 19:18:20 -04:00
Zach Daniel
bd60b02341 fix: fix nested form_only_fields and add more tests 2022-08-01 23:35:16 -04:00
Zach Daniel
b9cdfd09fc improvement: add form_only_field/5 2022-08-01 22:07:29 -04:00
Zach Daniel
231a581edd improvement: warn on unhandled errors by default 2022-07-07 22:22:30 -04:00
Zach Daniel
a554cd9a07 improvement: allow forms to be ignored 2022-06-28 22:28:44 -04:00
Zach Daniel
6ba516aeaa WIP 2022-06-28 22:22:38 -04:00
Zach Daniel
e9466d1e12 Revert "improvement: trialing treating all form parameters as strings for keys/values"
This reverts commit 0307ff190c.
2022-06-21 18:27:44 -04:00
Zach Daniel
0307ff190c improvement: trialing treating all form parameters as strings for keys/values
This is experimental, and may be reverted later
2022-06-21 01:29:00 -04:00
Zach Daniel
09f673751b chore: fix tests 2022-05-28 21:20:54 -04:00
Darren Black
142bbc3b52
fix: Fix validate_opts when single form (#44) 2022-05-22 02:08:43 -04:00
Darren Black
465d036620
test: Failing test for validate_opts issue (#43) 2022-05-20 10:59:23 -04:00
Zach Daniel
873317aa79 fix: validate after adding/removing forms 2022-05-17 11:06:41 -04:00
kernel-io
a861dbf3b9
test: added failing test (#40) 2022-05-17 10:39:46 -04:00
kernel-io
b65bf57ebf
test: add failing test for remove_form (#39) 2022-05-16 22:37:36 -04:00
Zach Daniel
50f6a108b4 fix: raise error on non-existant resource for api 2022-05-16 16:09:38 -04:00
Josh Price
ad5f1c4b5e
test: set primary action explicitly in tests (#38)
* test: set primary action explicitly

* chore: update all deps
2022-05-16 15:34:33 -04:00
kernel-io
89af1acd41
fix: respect touched forms in params generation (#37) 2022-05-13 20:45:07 -04:00
Zach Daniel
4c013819d0 fix: synthetically cast attributes in read forms
fix: raise explicitly on non-existent action
2022-05-09 15:45:57 -04:00
Zach Daniel
89db16968d fix: show hidden fields for read actions 2022-03-21 22:42:34 -04:00
Zach Daniel
a8223ecc09 fix: add pkey ids as params when creating read forms from data 2022-03-21 22:34:50 -04:00
Zach Daniel
f5357b5af4 fix: track data properly for reads generated from data 2022-03-21 22:24:19 -04:00
Zach Daniel
9e8ab6c904 test: fix test 2022-02-20 23:34:57 -05:00
Zach Daniel
6f011a55fe chore: update tests/docs 2021-12-28 22:30:06 -05:00
Zach Daniel
b590e8ff72 fix: check for operators first
improvement: don't return ids by default
2021-12-06 14:17:30 -05:00
Zach Daniel
b8fae705a5 fix: properly set nested names 2021-12-06 01:13:40 -05:00
Zach Daniel
724b0defc2 fix: allow the as option to be set 2021-12-06 01:05:47 -05:00
Zach Daniel
6e21815628 improvement: better default name, just use ids elsewhere 2021-12-06 00:30:00 -05:00
Zach Daniel
076d9fe356 fix: properly set params on validate 2021-12-05 21:51:35 -05:00
Zach Daniel
6f9bc82895 fix: set proper form ids and names 2021-12-05 21:17:26 -05:00
Zach Daniel
4c4ca71609 fix: support only predicate in params 2021-12-05 20:24:08 -05:00
Zach Daniel
8ee53e4bfc improvement: better sanitized parameters
improvement: add params_for_query
2021-12-02 12:52:14 -05:00
Zach Daniel
0687568299 improvement: expose paths for filters
improvement: simple error handling patterns for filter forms
2021-12-02 03:12:18 -05:00
Zach Daniel
6e26f89fd1 feat: new FilterForm for building forms to produce Ash.Filters 2021-12-01 15:28:38 -05:00
Zach Daniel
dcc7edfaa7 WIP on filter_form 2021-11-29 21:40:46 -05:00
Zach Daniel
0d6a20ff5f fix: typo on checking if errors are set to the same value as before 2021-11-12 22:10:33 -05:00
Darren Black
6afdd21f95
Validation issue in rc (#30) 2021-11-12 21:22:55 -05:00
Zach Daniel
1fe82efd04 chore: add a test trying to reproduce an issue
chore: update locked version of ash
2021-11-10 15:11:22 -05:00
Zach Daniel
4eabe074af improvement: use existing forms on validate, instead of rebuilding 2021-11-08 04:47:12 -05:00
Zach Daniel
a8b6a7d1e5 improvement: enrich but also simplify changed? behavior 2021-11-06 14:12:53 -04:00
Zach Daniel
3c56731aae improvement: add a .changed? field 2021-11-06 12:15:50 -04:00
Zach Daniel
16cf384e5e test: fix failing test cases 2021-08-27 13:21:48 -04:00
Zach Daniel
f194e157ae improvement: undo some data tracking changes that didn't work
improvement: continue improving sparse forms
2021-08-15 11:30:46 -04:00
Zach Daniel
942c69dafb improvement: track touched forms for saner removal cases
improvement: add `sparse?` option for list forms
improvement: add auto options, including sparse forms and relationship_fetcher
2021-08-11 18:48:52 -04:00
Zach Daniel
48df4c1eb5 improvement: customize relationship fetcher (experimental)
fix: attempt to fix data removal for to_one relationships
2021-08-11 01:27:07 -04:00
Zach Daniel
aa97ffe2f2 chore: release version v0.5.9 2021-08-05 02:07:36 -04:00
Darren Black
913947b457
test: Failing test (#23) 2021-08-05 00:45:09 -04:00
Zach Daniel
e43ab34f2a fix: don't return NotLoaded from input_value
improvement: add `Form.value/2`
2021-08-03 22:59:04 -04:00
Zach Daniel
6c8e92bd65 improvement: retain original data for form submission
improvement: update to latest ash
2021-08-01 13:19:01 -04:00
Zach Daniel
24cbc780de improvement: add Form.errors/2, deprecate Form.errors_for/3 2021-07-21 21:52:04 -04:00
Darren Black
6ca6435263
test: Error on submit when removing the last item from a single resource (#20) 2021-07-20 01:54:36 -04:00
Darren Black
380a67a1fa
fix: Fix remove form path when a nested single (#19) 2021-07-20 01:00:44 -04:00
Darren Black
72a341a6c1
test: Failing test for invalid path (#17) 2021-07-19 23:42:11 -04:00
Darren Black
2373c19e8b
test: Failing test for remove_form reindex (#16) 2021-07-19 22:55:05 -04:00
Darren Black
8194e433cb
improvement: Improve error message when incorrect api configured for resource (#15) 2021-07-19 00:58:46 -04:00
Darren Black
c861cc9092
fix: Fix nested form naming (#14) 2021-07-18 22:07:54 -04:00
Zach Daniel
d1889a5bfb fix: set form aliases properly
improvement: move `api` to initial form creation option
2021-07-18 19:20:25 -04:00
Zach Daniel
ff40864c6b improvement: alter behavior of params option to submit
improvement: add `set_data/2`
2021-07-18 12:43:59 -04:00
Darren Black
e8d8aebaa3
fix: Fix default form id when :as provided (#12) 2021-07-18 12:28:47 -04:00
Zach Daniel
f36e6c30f2 fix: always pass forms down 2021-07-17 16:06:15 -04:00
Darren Black
785263e514
test: Add failing test (#9) 2021-07-17 15:57:27 -04:00
Zach Daniel
e8da89bdbc improvement: add AshPhoenix.update_form/3
docs: add docs for special cases of auto forms
2021-07-17 14:17:05 -04:00
Zach Daniel
0508ff48d5 improvement: add auto?: true flag 2021-07-16 20:40:49 -04:00
Zach Daniel
ea9ec350cd test: add another test for validation errors
fix: don't set data unless necessary
2021-07-16 19:58:14 -04:00
Darren Black
8378a38713
fix: Wrap single items on to_form (#8) 2021-07-16 18:23:07 -04:00
Zach Daniel
defbf581dc improvement: first edition of auto forms 2021-07-16 16:50:36 -04:00
Zach Daniel
d7ec7da419
improvement: refactor forms with new data structure AshPhoenix.Form (#6)
Co-authored-by: Darren Black <dblack@totaltrash.net>
2021-07-15 14:09:15 -04:00
Zach Daniel
a7b2296d43 chore: refactor the use_data? change 2021-07-12 17:37:06 -04:00
Zach Daniel
e98c617405 chore: fix lint 2021-07-12 17:19:17 -04:00
Zach Daniel
9350101bb5 improvement: add use_data? opt to add_related
test: add some tests for `add_related`
fix: don't assume an empty map is an indexed map
2021-07-12 17:19:06 -04:00
Zach Daniel
26d24b4801 imorovement: add_to_path when 0th item is updating 2021-06-13 21:25:04 -04:00
Zach Daniel
d5a485e068 fix: fix case where "lists" weren't properly added to
test: add unit tests for `add_to_path/3`
2021-06-13 20:23:14 -04:00
Zach Daniel
8b03e9fc5a
feat: general cleanup, ready for initial release 2020-10-20 21:25:28 -04:00
Zach Daniel
b6b87b95e9
feat: init 2020-10-20 13:54:35 -04:00