form icon indicating copy to clipboard operation
form copied to clipboard

Initial version of Lit adapter for Tanstack form

Open Christian24 opened this issue 1 year ago • 4 comments

This closes #498.

This is the first cut.

It has tests, a basic example and the base-lib, there's also Material Web Components example. I added a little QuickStart guide.

Open points:

  • I am not 100% sure this is entirely type safe and I am not sure why it is not. It seems the field options passed .field() can be pretty much anything. Upon further investigation, this seems to be an issue with using an array, so maybe DeepKeys or its use is broken? @crutchcorn?

Christian24 avatar Jan 22 '24 22:01 Christian24

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

codesandbox-ci[bot] avatar Jan 22 '24 22:01 codesandbox-ci[bot]

Codecov Report

Attention: Patch coverage is 67.90123% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 88.84%. Comparing base (c740617) to head (d71df41).

Files Patch % Lines
packages/lit-form/src/tests/simple.ts 56.52% 19 Missing and 1 partial :warning:
packages/lit-form/src/tanstack-form-controller.ts 82.85% 5 Missing and 1 partial :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                       Coverage Diff                       @@
##           array-and-provider-refactor     #577      +/-   ##
===============================================================
- Coverage                        91.18%   88.84%   -2.34%     
===============================================================
  Files                               26       28       +2     
  Lines                              726      807      +81     
  Branches                           172      185      +13     
===============================================================
+ Hits                               662      717      +55     
- Misses                              59       83      +24     
- Partials                             5        7       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jan 23 '24 19:01 codecov-commenter

@Christian24 I just realized that we don't have a Lit adapter for TanStack Store. Is there any way we could build this and then utilize it inside of Form's Lit adapter?

That would fall more in line with other stuff

crutchcorn avatar Feb 11 '24 19:02 crutchcorn

@Christian24 I just realized that we don't have a Lit adapter for TanStack Store. Is there any way we could build this and then utilize it inside of Form's Lit adapter?

That would fall more in line with other stuff

I am not sure where it would be needed honestly. Where exactly are you thinking about?

Christian24 avatar Feb 14 '24 18:02 Christian24

☁️ Nx Cloud Report

CI is running/has finished running commands for commit a561827e8fcdb68315f72f648195de3cf58fd3b6. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

nx-cloud[bot] avatar Mar 09 '24 12:03 nx-cloud[bot]

I did not close this PR or delete the upstream branch. Instead, I merged this PR:

https://github.com/TanStack/form/pull/588

Which this PR was supposed to be based off of.

I don't know what's happened - I've pinged GH (thru private channels). In the meantime, I have a backup somewhere, luckily

EDIT: I figured out what happened and have fixed the issue manually. GH has been notified.

crutchcorn avatar Mar 13 '24 11:03 crutchcorn