scientist-softserv / webstore

https://webstore-staging.vercel.app
3 stars 0 forks source link

SPIKE: Research Alpaca and React compatibility #27

Closed alishaevn closed 1 year ago

alishaevn commented 1 year ago

initial ticket: https://gitlab.com/notch8/webstore/-/issues/5

Summary

Alpaca is currently used on the dynamic forms. React and Alpaca did not work well together. Steven wrote a translation library that translate alpaca to a React-usable schema, but we probably do not want to continue with the translation layer.

alishaevn commented 1 year ago

potential solutions

alishaevn commented 1 year ago
alishaevn commented 1 year ago

"Latest version: 1.5.27 released on 5/14/2019"

it still doesn't look like alpaca is going to work with react. I created a sandbox and trying to import the alpaca package throws an error asking for jquery.

https://codesandbox.io/s/stoic-sun-3fw4l7?file=/src/App.js

Image

alishaevn commented 1 year ago

alternate option:

Image

alishaevn commented 1 year ago

created another sandbox to test this in. seems pretty straightforward, with lots of options.

https://codesandbox.io/s/fervent-kirch-0r0wq5?file=/src/App.js

Image

alishaevn commented 1 year ago

don't want to have to rewrite the translation layer.

instead use: https://github.com/rjsf-team/react-jsonschema-form

this was done in the rx app years ago, but it's since been ripped out. the code can be found here though.

alishaevn commented 1 year ago

discussion

chris isn't sure if there's a 1:1 path between alpaca and json schema form (jsf)

result

resources

alishaevn commented 1 year ago