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

Add strange-forms examples and GitHub pages #10

Merged
merged 18 commits into from
Jul 16, 2021
Merged

Add strange-forms examples and GitHub pages #10

merged 18 commits into from
Jul 16, 2021

Conversation

devinivy
Copy link
Contributor

@devinivy devinivy commented May 5, 2021

The intention of this work is to document clearly how strange-forms works and how one might use it in various situations, through example. The provided examples are:

  • Uncontrolled - an uncontrolled form.
  • Controlled - a controlled form.
  • Complex Value - an uncontrolled form with a complex form value for WYSIWYG input state.
  • Nested - composing the controlled form from the Controlled example into a new controlled form with an additional field.
  • Constraints - applying constraints on user input.
  • List - composing arbitrarily many copies of the controlled form from the Controlled example into a list of independent forms, acting as a single controlled form.

These are deployed to GitHub pages here: https://bigroomstudios.github.io/strange-forms. Each page also contains a short explainer, mentioning general pitfalls that may arise when implementing this example.

In order to illustrate the inner-workings of strange-forms, there is also a concise reference implementation using hooks, which is used to re-implement versions of the Controlled and Uncontrolled examples.

@coveralls
Copy link

coveralls commented May 5, 2021

Coverage Status

Coverage remained the same at 100.0% when pulling 6c494c3 on examples into 9760f70 on master.

@devinivy devinivy merged commit b386a6b into master Jul 16, 2021
@devinivy devinivy deleted the examples branch July 16, 2021 13:12
Copy link
Contributor

@bmleight bmleight left a comment

Choose a reason for hiding this comment

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

Sorry for the delayed review (and for submitting this right after you merge it in...)! I started this earlier in the week, and then it got lost in my sea of tabs. I just made a few suggestions on the install instructions for the examples. Thanks for the great examples, it was nice to checkout some strangeluv code again.

Click the green "Use this template" button above or install manually using git:

```bash
$ git clone --depth=1 --origin=strangeluv --branch=strangeluv git@github.com:bigroomstudios/strangeluv.git my-project
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$ git clone --depth=1 --origin=strangeluv --branch=strangeluv git@github.com:bigroomstudios/strangeluv.git my-project
$ git clone git@github.com:BigRoomStudios/strange-forms.git


```bash
$ git clone --depth=1 --origin=strangeluv --branch=strangeluv git@github.com:bigroomstudios/strangeluv.git my-project
$ cd my-project
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$ cd my-project
$ cd strange-forms/examples

```bash
$ git clone --depth=1 --origin=strangeluv --branch=strangeluv git@github.com:bigroomstudios/strangeluv.git my-project
$ cd my-project
$ git checkout --orphan master # New branch without history
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$ git checkout --orphan master # New branch without history

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.

3 participants