Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How use ChangesetForm with template imports? #327

Closed
MichalBryxi opened this issue Nov 25, 2024 · 5 comments
Closed

How use ChangesetForm with template imports? #327

MichalBryxi opened this issue Nov 25, 2024 · 5 comments

Comments

@MichalBryxi
Copy link
Contributor

MichalBryxi commented Nov 25, 2024

  • Other components like Button have a section in documentation called Import so I can just grab: import { Button } from '@frontile/buttons';
  • But for ChangesetForm this is not the case. How do I use it in gjs/gts?
    • How do I import ChangesetForm?
    • How do I import changeset (the helper)? Technically not really the issue of this addon, but would make people's life easier.
@MichalBryxi
Copy link
Contributor Author

I'm more than happy to spawn a PR that would improve the documentation, but I'm writing this after 30+ minutes trying various options, grepping for examples and I'm at a loss, so will need a pointer to an actual example.

@josemarluedke
Copy link
Owner

I believe the published version can be imported using this:

import ChangesetFrom from '@frontile/changeset-form/components/changeset-form';

Please note that I plan to deprecate this pkg after I release a stable version of everything. I mention in a todo list here: #289

We still use this package, so it's not like I will drop it right now. However, I plan to deprecate it after at least stable version 0.17 is released. It should be removed before v1, together with legacy-forms pkg.

This is because Ember Changeset is not where I would like to see it. We had so many issues with it over time that we plan to use something like https://zod.dev/ instead.

@MichalBryxi
Copy link
Contributor Author

Thanks for the explanation. I suspect there is no replacement for changeset-form yet?
If by any chance there is, can I see an example I could steal from?

@josemarluedke
Copy link
Owner

There is no directly replacement, however, you can use the @frontile/froms pkg for basic forms functionality. Unsure if we would create a pkg to integrate with Zod, most likely not.

@MichalBryxi
Copy link
Contributor Author

Thanks for your answer and your hints.

Somehow I missed the label "deprecated" next to ChangesetForm 🤦🏾 My other projects already use Form 🤷🏾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants