Commit Graph

1854 Commits

Author SHA1 Message Date
Dillon Kearns
fc17849da8 Optimistically hide deleted items. 2022-08-13 06:12:38 -07:00
Dillon Kearns
d4f2f3e35d Wire up delete button. 2022-08-12 18:44:59 -07:00
Dillon Kearns
8e84792621 Add todo complete button. 2022-08-12 11:01:18 -07:00
Dillon Kearns
200e47314c Create new todo items. 2022-08-12 09:43:36 -07:00
Dillon Kearns
a68094bcf4 Fetch todos by session. 2022-08-12 08:34:02 -07:00
Dillon Kearns
4d4ac95fbc Remove old header title. 2022-08-12 08:33:49 -07:00
Dillon Kearns
008e13fba5 Get session cookie. 2022-08-12 08:08:11 -07:00
Dillon Kearns
22356d4511 Remove unused imports. 2022-08-12 08:03:58 -07:00
Dillon Kearns
814ea506b1 Render new item form. 2022-08-12 08:03:37 -07:00
Dillon Kearns
5634b8788b Copy over starting point from Evan's TodoMVC app. 2022-08-12 07:56:01 -07:00
Dillon Kearns
bb1239fbba Remove unused. 2022-08-11 20:37:46 -07:00
Dillon Kearns
76208360ae Extract common code. 2022-08-11 20:26:50 -07:00
Dillon Kearns
9a4850ba10 Remove log statements. 2022-08-11 20:11:50 -07:00
Dillon Kearns
53b4a08db8 Parse magic links and create sessions. 2022-08-11 20:09:29 -07:00
Dillon Kearns
db6303b2d9 Update send-grid project. 2022-08-11 11:45:47 -07:00
Dillon Kearns
2fd7becbf8 Wire up encrypt/decrypt logic for magic hash on form submit and on page load with query param. 2022-08-11 11:43:43 -07:00
Dillon Kearns
8314fa06c5 Add send-grid package submodule. 2022-08-11 06:03:47 -07:00
Dillon Kearns
2cfac9abeb Wire in encrypt port data source. 2022-08-11 06:01:44 -07:00
Dillon Kearns
ea03083bf2 Add starting point for todos app example. 2022-08-10 15:24:41 -07:00
Dillon Kearns
0d969ed851 Update package-lock. 2022-08-09 11:40:24 -07:00
Dillon Kearns
a07c15b72f Execute logout with client-side submission handler, and support pointing at external actions. 2022-08-09 11:37:10 -07:00
Dillon Kearns
99151f86a6 Update search example. 2022-08-09 09:03:25 -07:00
Dillon Kearns
ad5fda503f Force rebuild. 2022-08-09 08:49:37 -07:00
Dillon Kearns
abfa27ee9f Fix bug that causes extra navigation for form POSTs. 2022-08-09 08:44:12 -07:00
Dillon Kearns
d594cdcc60 Update logout button. 2022-08-09 06:40:32 -07:00
Dillon Kearns
517acbce9d Use new action setup for logout handler. 2022-08-09 06:36:45 -07:00
Dillon Kearns
b7accea2e8 Fix form field names. 2022-08-09 06:34:12 -07:00
Dillon Kearns
426d42b0bf Fix errors. 2022-08-08 10:49:43 -07:00
Dillon Kearns
69bde1d010 Migrate route over to new server-side validation API. 2022-08-08 07:50:30 -07:00
Dillon Kearns
1542e7b502 Use new form API function. 2022-08-08 06:47:47 -07:00
Dillon Kearns
7ae7932e8b Show deleting button text when transitioning. 2022-08-08 05:10:03 -07:00
Dillon Kearns
a0477a0441 Remove redundant functions. 2022-08-03 10:11:41 +02:00
Dillon Kearns
926d56af84 Update package-lock. 2022-08-03 09:40:57 +02:00
Dillon Kearns
de79f1f07c Update hashes from new vite version. 2022-08-03 09:40:22 +02:00
Dillon Kearns
19beffa1a1 Update package-lock files. 2022-08-03 09:40:06 +02:00
Dillon Kearns
6a99994eb5 Remove server-side validation from field in favor of doing it within the combine function. 2022-08-03 09:33:16 +02:00
Dillon Kearns
985e79922c Update docs and remove obsolete globalErrors helper. 2022-08-01 10:40:51 +02:00
Dillon Kearns
d7a2127daf Install latest terser. 2022-08-01 10:36:22 +02:00
Dillon Kearns
3943ed66d9 Install latest mocha. 2022-08-01 10:34:51 +02:00
Dillon Kearns
5446efa32d Remove temporary example. 2022-08-01 10:29:14 +02:00
Dillon Kearns
75b487f204 Add minimum value for shopping cart quantity. 2022-08-01 09:29:52 +02:00
Dillon Kearns
c5777b8b33 Use path.join to prevent duplicate slashes. 2022-07-28 08:22:04 +02:00
Dillon Kearns
e53efe7ad3 Update adapter script. 2022-07-27 21:30:46 +02:00
Dillon Kearns
675271a07e Update netlify config. 2022-07-27 21:16:37 +02:00
Dillon Kearns
c99af60ab5 Use password hashing in smoothies example. 2022-07-27 18:58:08 +02:00
Dillon Kearns
944b78bce4 Add a login helper function. 2022-07-27 18:10:23 +02:00
Dillon Kearns
2328cf3dee Install bcrypt-js. 2022-07-27 18:09:58 +02:00
Dillon Kearns
13e272cabd Fix type. 2022-07-26 09:03:32 +02:00
Dillon Kearns
e191b1c870 Extract function. 2022-07-25 15:57:40 +02:00
Dillon Kearns
fb8e23e5b6 Change argument order. 2022-07-25 15:15:45 +02:00
Dillon Kearns
e51b7b9e57 Inline type alias. 2022-07-25 13:24:06 +02:00
Dillon Kearns
bf21755847 Clear todo input field after entering item. 2022-07-25 13:11:58 +02:00
Dillon Kearns
6a5a9f4c8c Add Validation.fieldStatus. 2022-07-24 21:14:18 +02:00
Dillon Kearns
f1f25f787e Rename types. 2022-07-24 21:00:47 +02:00
Dillon Kearns
1a8e8e4886 Fix errors. 2022-07-24 20:23:48 +02:00
Dillon Kearns
6757b27ea4 Rename types. 2022-07-24 20:20:05 +02:00
Dillon Kearns
ea22871b65 Change Validation type to support constraints for named fields with new design. 2022-07-24 15:06:07 +02:00
Dillon Kearns
6291237bf4 Remove hardcoded form id. 2022-07-24 10:02:06 +02:00
Dillon Kearns
c853df574b Rename functions. 2022-07-24 09:21:55 +02:00
Dillon Kearns
4cd79105f2 Rename functions. 2022-07-24 09:18:10 +02:00
Dillon Kearns
b4c26d5401 Rename functions. 2022-07-24 09:14:48 +02:00
Dillon Kearns
c37eb3668e Rename functions. 2022-07-24 09:11:12 +02:00
Dillon Kearns
94b6649271 Rename type. 2022-07-24 09:09:20 +02:00
Dillon Kearns
4eb3667847 Rename type. 2022-07-24 09:08:43 +02:00
Dillon Kearns
9d8320d5fd Remove unused. 2022-07-24 09:01:28 +02:00
Dillon Kearns
f77db01796 Migrate usage of old Form type. 2022-07-23 20:26:40 +02:00
Dillon Kearns
5fe860a11e Migrate another page to new Form type, and Form.dynamic function. 2022-07-23 18:42:10 +02:00
Dillon Kearns
8a6bd84c11 Migrate another page. 2022-07-23 08:45:20 +02:00
Dillon Kearns
80b418ecf9 Migrate another page. 2022-07-23 08:44:00 +02:00
Dillon Kearns
8680999754 Migrate another page. 2022-07-22 21:29:09 +02:00
Dillon Kearns
4496a72e35 Migrate another page. 2022-07-22 21:26:00 +02:00
Dillon Kearns
8f2c1a04f5 Migrate another page. 2022-07-22 21:23:05 +02:00
Dillon Kearns
54276b82af Remove completed todo. 2022-07-22 21:19:50 +02:00
Dillon Kearns
f978587688 Migrate another page. 2022-07-22 21:18:32 +02:00
Dillon Kearns
82769e3c20 Show button transition. 2022-07-22 21:06:20 +02:00
Dillon Kearns
6a6cb2e17e Remove obsolete attribute. 2022-07-22 21:05:47 +02:00
Dillon Kearns
d1bbef991a Migrate another page. 2022-07-22 21:05:27 +02:00
Dillon Kearns
fbe4b28a12 Migrate another page to new Form type. 2022-07-22 20:59:51 +02:00
Dillon Kearns
0529b0a9d5 Migrate another page. 2022-07-22 20:45:29 +02:00
Dillon Kearns
c01d4f6765 Migrate another module to new form API. 2022-07-22 17:32:43 +02:00
Dillon Kearns
70cd707a96 Migrate module. 2022-07-22 17:29:46 +02:00
Dillon Kearns
f034531062 Migrate tailwind form example to new form type. 2022-07-22 16:31:46 +02:00
Dillon Kearns
9a011c012c Migrate another page to new form type. 2022-07-22 12:02:51 +02:00
Dillon Kearns
170c906e72 Use new Form type for another route. 2022-07-22 09:41:35 +02:00
Dillon Kearns
c2f0e2922a Add form data parser for new type. 2022-07-21 15:31:16 +02:00
Dillon Kearns
fc153e7f48 Remove some hardcoding. 2022-07-20 11:36:50 +02:00
Dillon Kearns
379ffc55ba Stub out new design for Form.init with some Debug.todo calls. 2022-07-19 18:36:08 +02:00
Dillon Kearns
642b9a6f9b Fix command. 2022-07-12 16:28:29 +02:00
Dillon Kearns
4541ce8adc Fix examples. 2022-07-12 13:25:24 +02:00
Dillon Kearns
c5d9fe865d Extract common helper for preparing validation errors and hidden input values in Form module. 2022-07-12 12:25:14 +02:00
Dillon Kearns
b730d50689 Update example. 2022-07-12 11:54:13 +02:00
Dillon Kearns
d78180a140 Wire through useCache flag from DataSource, and expose DataSource.Http.uncachedRequest. 2022-07-12 02:10:21 -07:00
Dillon Kearns
5e89b67b0b Update smoothies app, and remove requestTime cache-busting URL string in preparation for disabling caching for SSR DataSources. 2022-07-09 11:57:16 -07:00
Dillon Kearns
65bf2113ba Update examples. 2022-07-09 09:03:00 -07:00
Dillon Kearns
078a95b5b8 Use clean diff for escaping test. 2022-07-09 08:23:58 -07:00
Dillon Kearns
169bf18561 Rename some WIP function names. 2022-07-09 08:03:02 -07:00
Dillon Kearns
55bdca78c5 Fix typos. 2022-07-08 18:01:54 -07:00
Dillon Kearns
102d27c84b Update docs. 2022-07-08 18:00:30 -07:00
Dillon Kearns
50ce177be1 Rename module. 2022-07-08 17:58:49 -07:00
Dillon Kearns
8ce539a3a3 Rename module. 2022-07-08 17:56:52 -07:00
Dillon Kearns
76d2ac367f Change module name. 2022-07-08 17:51:26 -07:00
Dillon Kearns
03729f89ed Rename module. 2022-07-08 17:40:01 -07:00
Dillon Kearns
d14688b4d8 Remove obsolete state that's managed by Form API now. 2022-07-08 17:35:53 -07:00
Dillon Kearns
fdee339801 Rename variable and add debug output in example. 2022-07-08 15:25:48 -07:00
Dillon Kearns
59b865670e Use Validation type as base for all fields in combiner function. 2022-07-08 14:29:30 -07:00
Dillon Kearns
8cacb7c4f3 Use Form.Errors wrapper type instead of raw Dict to make access more type-safe. 2022-07-08 11:16:24 -07:00
Dillon Kearns
34e2389ab4 Pass html attributes into Form render functions directly. 2022-07-08 11:09:52 -07:00
Dillon Kearns
70b1423bd2 Use builder pattern for rendering forms. 2022-07-08 10:57:22 -07:00
Dillon Kearns
5420de8dfa Remove obsolete function. 2022-07-08 09:59:59 -07:00
Dillon Kearns
79202cbd68 Update package-lock. 2022-07-08 09:57:06 -07:00
Dillon Kearns
344341a93a Wire up prototype for new Form builder pattern for fetcher/transition options. 2022-07-07 16:02:35 -07:00
Dillon Kearns
91d040a7a7 Add escaping example output. 2022-07-06 10:06:18 -07:00
Dillon Kearns
e3e0ffdd7e Try local import. 2022-07-05 15:56:48 -07:00
Dillon Kearns
6f35f55021 Update path in build script calling adapter code. 2022-07-05 11:08:57 -07:00
Dillon Kearns
d895b7fbb3 Fix extension in adapter script. 2022-07-05 11:02:02 -07:00
Dillon Kearns
905d940bf4 Force build. 2022-07-05 10:59:40 -07:00
Dillon Kearns
bdc1715726 Use latest esbuild. 2022-07-05 10:54:58 -07:00
Dillon Kearns
ceb6286cba Update token 2022-07-05 10:32:09 -07:00
Dillon Kearns
c1a5ea97a2 Migrate todo example. 2022-07-05 10:18:13 -07:00
Dillon Kearns
fb2026a769 Migrate search example page. 2022-07-05 09:57:02 -07:00
Dillon Kearns
3a2670a4ac Migrate signup page. 2022-07-05 08:38:28 -07:00
Dillon Kearns
966ceb491a Update package-lock. 2022-07-05 08:25:01 -07:00
Dillon Kearns
98f49bdbbb Use transition state for isSubmitting check. 2022-07-05 08:24:52 -07:00
Dillon Kearns
e1dd176516 Remove log statement. 2022-07-05 08:24:40 -07:00
Dillon Kearns
8e93fef8e3 Increase label area for checkboxes and radio buttons. 2022-07-05 08:24:34 -07:00
Dillon Kearns
e156e4f268 Migrate tailwind form example to new Form API. 2022-07-02 09:06:32 -07:00
Dillon Kearns
8caacce2b7 Add some fixes to pokedex example. 2022-07-02 09:05:50 -07:00
Dillon Kearns
7fe196d2e9 Fix lamdera error with unserializable Data in example. 2022-06-30 13:18:56 -07:00
Dillon Kearns
325004f3fc Try removing symlink. 2022-06-30 11:56:13 -07:00
Dillon Kearns
5b1bf51c25 Run reset command in right order. 2022-06-30 10:48:26 -07:00
Dillon Kearns
d4447bfe16 Try global elm-format install to fix CI error. 2022-06-30 10:44:39 -07:00
Dillon Kearns
ff8850680a Try node 18 in CI. 2022-06-30 10:31:07 -07:00
Dillon Kearns
c2eecd59b6 Update example to use new Form API. 2022-06-30 09:38:49 -07:00
Dillon Kearns
4cdd215dad Remove testing DataSource from hackernews demo. 2022-06-29 13:32:50 -07:00
Dillon Kearns
e861c71ce6 Force build. 2022-06-29 12:47:37 -07:00
Dillon Kearns
6850d98562 Fix hackernews example. 2022-06-29 12:13:34 -07:00
Dillon Kearns
f1a2c3c0a9 Add scaffolding for running server-side validations. Remove deprecated form parsing Server.Request API. 2022-06-29 10:57:30 -07:00
Dillon Kearns
8ea702f4e7 Update examples. 2022-06-28 15:45:36 -07:00
Dillon Kearns
da6e7d7313 Remove some Debug statements. 2022-06-28 14:48:57 -07:00
Dillon Kearns
3816a4baf6 Wrap Validation type in custom type wrapper. 2022-06-27 10:55:45 -07:00
Dillon Kearns
669bc2e53f Run dependent validations even if an individual field fails so that you can have more fine-grained control over dependent errors. 2022-06-25 14:30:31 -07:00
Dillon Kearns
5949fa7b31 Try new subGroup interface. 2022-06-24 11:31:16 -07:00
Dillon Kearns
8a05926ec0 Add sub-group form helper. 2022-06-24 08:56:41 -07:00
Dillon Kearns
5e9492d45a Use new validated min/max field attributes in place of obsolete non-validated versions. 2022-06-23 10:29:28 -07:00
Dillon Kearns
2799aa7d57 Add a form rendering option for method. 2022-06-22 15:33:40 -07:00
Dillon Kearns
e3d1bee868 Wire through the data argument to formState in view function. 2022-06-22 14:45:00 -07:00
Dillon Kearns
2a530b48e6 Add render option for submit strategy. 2022-06-22 14:34:05 -07:00
Dillon Kearns
4ce8ba2c28 Validate description length. 2022-06-21 10:53:35 -07:00
Dillon Kearns
ec5bc916c1 Include errors in ViewField. 2022-06-21 09:33:57 -07:00
Dillon Kearns
88d6a058f0 Change a heading name. 2022-06-21 09:26:30 -07:00
Dillon Kearns
a611c96959 Add (parsed : Maybe parsed) to field record for view. 2022-06-21 09:26:20 -07:00
Dillon Kearns
f492f9b068 Show submission status in submit button. 2022-06-21 08:42:27 -07:00
Dillon Kearns
2091ca3bdb Add create-group form example. 2022-06-21 08:38:46 -07:00
Dillon Kearns
6d68a0c504 Inline variable. 2022-06-20 16:35:07 -07:00
Dillon Kearns
bda8eed9df Add type annotation. 2022-06-20 16:30:13 -07:00
Dillon Kearns
502abc6c54 Log dependent form example when received in action. 2022-06-20 15:30:00 -07:00
Dillon Kearns
4b88672817 Remove unused. 2022-06-20 15:22:23 -07:00
Dillon Kearns
57c215a4df Remove completed todo. 2022-06-20 15:21:49 -07:00
Dillon Kearns
369770df6e Render field errors in dynamic form example. 2022-06-20 15:18:52 -07:00
Dillon Kearns
b194671b9e Dynamic sub-form parsing renders views properly. 2022-06-20 15:13:27 -07:00
Dillon Kearns
58c7a84038 Add basic prototype for dependent form parsing. 2022-06-20 14:20:39 -07:00
Dillon Kearns
87fa08a016 Use different approach for defining increment/decrement form parser. 2022-06-18 18:06:58 -07:00
Dillon Kearns
0e682cba4b Rename module. 2022-06-18 10:34:55 -07:00
Dillon Kearns
d5b6c5bd47 Rename module. 2022-06-18 10:29:41 -07:00
Dillon Kearns
3a38135957 Only return parsed results (no rendered view) from form parse function. 2022-06-18 10:23:23 -07:00
Dillon Kearns
6bfd076baf Rename function. 2022-06-18 10:20:41 -07:00
Dillon Kearns
9b5a1871b3 Rename function. 2022-06-18 10:02:59 -07:00
Dillon Kearns
df16cf19fc Allow form parser combining function to do dependent field errors. 2022-06-18 08:44:57 -07:00
Dillon Kearns
5bbcc21998 Remove obsolete form parser version. 2022-06-16 12:03:54 -07:00
Dillon Kearns
aa9c1d09d7 Wire up properties and field types to field renderer. 2022-06-16 08:42:02 -07:00
Dillon Kearns
5b92530e29 Render checkboxes correctly. 2022-06-15 13:24:04 -07:00
Dillon Kearns
f742a1c5ae Add rendering logic for <select>. 2022-06-15 12:40:18 -07:00
Dillon Kearns
04ff00414e Add initial setup for <select> form input. 2022-06-15 11:48:24 -07:00
Dillon Kearns
145bc194ad Add edit page. 2022-06-15 09:11:55 -07:00
Dillon Kearns
c83e3bb957 Handle parsing multiple form shapes. 2022-06-14 16:49:02 -07:00
Dillon Kearns
4117e072ca Use initial values to parse preview of form data. 2022-06-14 09:27:48 -07:00
Dillon Kearns
9dc5a92671 Add form state to track whether submit was attempted and expose in form state. 2022-06-14 08:43:08 -07:00
Dillon Kearns
cb63a023b6 Update error message for smoothie not found page. 2022-06-14 07:49:35 -07:00
Dillon Kearns
ec64c146d8 Add smoothie update action. 2022-06-13 12:55:03 -07:00
Dillon Kearns
d2b794bfa5 Add edit screen. 2022-06-13 12:47:18 -07:00
Dillon Kearns
7f5e4f9266 Add new smoothie route. 2022-06-13 12:18:38 -07:00
Dillon Kearns
156c843926 Add way to provide default values from DataSource. 2022-06-12 16:03:34 -07:00
Dillon Kearns
a0f8585fd0 Extract some form rendering logic and add Field.withClientValidation. 2022-06-10 11:59:09 -07:00
Dillon Kearns
7a289700df Use form field defined in Field module. 2022-06-10 11:21:39 -07:00
Dillon Kearns
d1bea1df35 Remove unused code. 2022-06-10 09:40:05 -07:00
Dillon Kearns
cb1226af8c Including transitioning state in form view context. 2022-06-10 07:23:06 -07:00
Dillon Kearns
071e0d6dd9 Add client-side errors to view. 2022-06-09 10:49:14 -07:00
Dillon Kearns
3c0bce5769 Include field errors in FormParser view function. 2022-06-09 09:54:48 -07:00
Dillon Kearns
79d03cf768 Wire up example with new form parser. 2022-06-09 09:08:26 -07:00
Dillon Kearns
10111e15a2 Update styles. 2022-06-09 09:03:23 -07:00
Dillon Kearns
9430c9a630 Add profile page. 2022-06-03 17:27:23 -07:00
Dillon Kearns
eed054a7b7 Add a SetField helper. 2022-06-03 17:20:18 -07:00
Dillon Kearns
e13f3def99 Use FormParser API in smoothies example. 2022-06-03 07:24:03 -07:00
Dillon Kearns
fe3cd5fea8 Completed exercise. 2022-05-26 09:55:57 -07:00
Dillon Kearns
b26e281bab Update login logic. 2022-05-25 15:51:44 -07:00
Dillon Kearns
69e7a5b153 Add expectSessionData helper. 2022-05-25 14:30:09 -07:00
Dillon Kearns
1c485e95c2 Reset to initial starting point. 2022-05-25 10:18:02 -07:00
Dillon Kearns
ab8b747cb5 Extract some styles to css file. 2022-05-25 10:00:31 -07:00
Dillon Kearns
30133498d6 Use redirect helper. 2022-05-25 09:56:13 -07:00
Dillon Kearns
1e83fbe6db Remove circular import. 2022-05-25 09:50:10 -07:00