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

examples: confrom init #279

Merged
merged 3 commits into from
Mar 26, 2024
Merged

examples: confrom init #279

merged 3 commits into from
Mar 26, 2024

Conversation

AkifumiSato
Copy link
Contributor

@AkifumiSato AkifumiSato commented Mar 26, 2024

  • conformを利用したexampleの作成
  • location-state対応は未対応(後続でAPI含め検討・実装)

Copy link

changeset-bot bot commented Mar 26, 2024

⚠️ No Changeset found

Latest commit: 536cc53

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@AkifumiSato AkifumiSato marked this pull request as ready for review March 26, 2024 02:23
Copy link
Member

@koichik koichik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コメントしたけどただの疑問なので一応LGTM
あとnext.configが見当たらないような?
よく見るとsrcディレクトリが使われてないのはなぜ?他のサンプルは使ってるよね
でもまぁ一応approveしちゃいます(向き先がmainじゃないから不要な気がしつつ)

return (
<form {...getFormProps(form)} action={action} noValidate>
<button
type="submit"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これsubmit? 実際にサーバにリクエストが飛ぶ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

リクエストは飛ばないんですけど、type="button"だとconformが動かなかったんです。。。
内部実装まで追ってないですが、サンプルも大半type省略してるからsubmit前提なのかなと思ってます。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

それはIssueをあげるチャンス?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issueあげました!
edmundhung/conform#543
実は作業途中発見したgetInputPropsがdynamic formで使えないのもあげました。
edmundhung/conform#542

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

メモ: JS Offでも動作するためにtype="submit"である必要がありそうだったことが判明したので、543取り下げ

@AkifumiSato
Copy link
Contributor Author

  • srcディレクトリを使用
  • next.config.jsの追加、scroll restorationなど設定を他と合わせる
  • removeが動作しなかったので修正

@AkifumiSato AkifumiSato merged commit 3a04f10 into conform Mar 26, 2024
@AkifumiSato AkifumiSato deleted the conform-example branch March 26, 2024 06:53
AkifumiSato added a commit that referenced this pull request Mar 28, 2024
* examples: confrom init

* example: conform example: use src directory, add next.config.js

* example: conform example's remove button not working

---------

Co-authored-by: akfm.sato <01047245@CF0286.local>
AkifumiSato added a commit that referenced this pull request Apr 2, 2024
* examples: confrom init

* example: conform example: use src directory, add next.config.js

* example: conform example's remove button not working

---------

Co-authored-by: akfm.sato <01047245@CF0286.local>
AkifumiSato added a commit that referenced this pull request May 13, 2024
* examples: confrom init

* example: conform example: use src directory, add next.config.js

* example: conform example's remove button not working

---------

Co-authored-by: akfm.sato <01047245@CF0286.local>
AkifumiSato added a commit that referenced this pull request May 13, 2024
* examples: confrom init (#279)

* examples: confrom init

* example: conform example: use src directory, add next.config.js

* example: conform example's remove button not working

---------

Co-authored-by: akfm.sato <01047245@CF0286.local>

* Conform example with `useLocationForm` (#286)

* example: confrom wrapper module

* example: restore location state form

* example: refactor useLocationForm type

* example: useLocationForm return with form props

* example: refactor&comment useLocationForm

* example: fix state name

* example: useForm behavoir test

* example: useLocationForm refactor rm typeof window

* example: useLocationForm fix return value

* example: fix useSyncExternalStore 1st arg same ref

* example: dynamic form item restore

* example: useLocationForm with dynamic form

* example: fix effect callback to useEffect

* example: getLocationFormProps memo

* feat: useLocationGetState impl

* example: useLocationForm with getLocationState

* example: fix onChange save location state

* example: @types/lodash.set add

* example: rm (dynamic)

* example: useLocationFrom option add id

* example: fix useLocationFrom checkbox restore

* example: useLocationForm add comment

* example: useLocationForm refactor noop name

* example: rm unused import

* example: (not use location state) conform search form

* example: useLocationForm sync url exmaple

* example: url useLocationForm example

* example: fix useLocationForm onChange default value

* example: refactor package, key

* example: useLocationForm refactor

* example: useLocationForm rendering optimize

* rebase on conform branch, update lock file

* example: useLocationForm callback deps fix

* refactor: useLocationForm option idPrefix rename

* feat: useLocationForm API fix

* fix: useLocationForm type

* refactor: useLocationForm re-render hooks useReducer

* refactor: useLocationForm add ref guard check

* fix: useLocationForm formOption fix

* feat: `filterFormValueWihZodShape` add

* fix: useLocationForm id setting timing

* fix: useLocationForm initial id set

* refactor: filterFormValueWihZodShape no use zod

* fix: useLocationForm inital id set

* fix: useLocationForm schema option add

* refactor: rename useLocationForm inner vars

* test: conform example e2e add

* example: useLocationForm option rm shape

* example: rename static form

* example: simple form with conform

* refactor: vars order fix

* refactor: fix defenition order

* feat: `useLocationKey` impl

* example: refactor rm lodash.set

* refactor: useLocationForm

* refactor: updateWithObjectPath

* example: type spec simple form

* example: simple conform submit redirect

* refactor: declarative order

* refactor: rename inner vars

* refactor: getPaths

* refactor: useLocationKey subscribe

* feat: useLocationKey option

* todo comment

* fix: useLocationKey default args

* fix: useLocationForm support intent

* refactor: useLocationForm console rm

* fix: simple form unnecessary if rm

* example: dynamic form add first button

* example: number's error field

* example: refactor schema

* fix: conform example test

* example: simple-form refactor

* example: static-from refactor

* refactor: useLocationForm

* example: simple/static form content

* example: test comment fix

* example: fix number error message

* example: dynamic form reset button impl

* example: submit/reset button layout

* example: rename schema

* refactor: conform page

---------

Co-authored-by: akfm.sato <01047245@CF0286.local>

* chore: vsc setting update (#309)

Co-authored-by: akfm.sato <01047245@CF0286.local>

* `@location-state/conform` package init (#313)

* feat: @location-state/conform init

* refactor: confrom src directory

* refactor: @location-state/confrom strict check

* refactor: updatedWithObjectPath test

* refactor: updatedWithObjectPath

* refactor: updateWithObjectPath

* refactor: useLocationForm

* refactor: updatedWithObjectPath type assert refactor

* refactor: @repo/utils, @repo/test-utils

* refactor: rename configs to @repo/configs

* refactor: rename test case

* refactor: type utils

* feat: useLocationForm use valibot validation

* refactor: add comment

* fix: @location-state/confrom package.json fix description/dependencies

* refactor: updateWithObjectPath test

* refactor: format

* tsconfig update

* feat: @location-state/conform dependencies/description fix

* refactor: move comment to schema.ts

* refactor: test define member order fix

* refactor: comment fix, AssertError impl

* test: @location-state/conform test

* refactor: @location-state/conform array utils impl

* refactor: update-array test

* refactor: update-array test name fix

---------

Co-authored-by: akfm.sato <01047245@CF0286.local>

* Conform docs (#317)

* docs: `@location-state/conform` README

* docs: `@location-state/conform` API docs

* docs: `@location-state/confrom` docs fix

* docs: `@location-state/conform` fix Quickstart text

* docs: `@location-state/conform` example of Server Actions or nothing.

* docs: `@location-state/conform` useLocationForm type fix

* docs: `@location-state/conform` add conform's `id` link.

* docs: `@location-state/conform` fix useLocationForm return text.

* docs: `@location-state/conform` fix GetLocationFormProps return text.

* docs: `@location-state/conform` fix GetLocationFormProps return text.

* docs: `@location-state/conform` fix feature explain.

* docs: `@location-state/conform` fix API explain.

---------

Co-authored-by: akfm.sato <01047245@CF0286.local>

* fix: conform update error. (#345)

Co-authored-by: akfm.sato <01047245@CF0286.local>

* Conform prepare release (#326)

* docs: add changeset of `@location-state/conform`.

* docs: `useLocationKey`, `useLocationGetState` explain API docs.

* docs: fix changesets.

* docs: split changesets docs

* docs: fix `useLocationKey` / `useLocationGetState`

* docs: fix `useLocationGetState`/``useLocationKey` description word.

* chore: pnpm update version specify

---------

Co-authored-by: akfm.sato <01047245@CF0286.local>

* chore: fix pnpm version, fix rebase diff

* chore: rm apps/example-next-conform dependencies playwright

* fix: vscode setting json nits, `useLocationKey` docs

---------

Co-authored-by: akfm.sato <01047245@CF0286.local>
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

Successfully merging this pull request may close these issues.

None yet

2 participants