Skip to content

Support position for devtool#80

Merged
bluebill1049 merged 4 commits intoreact-hook-form:masterfrom
jellydn:feature/devtool-ui-position
Apr 29, 2021
Merged

Support position for devtool#80
bluebill1049 merged 4 commits intoreact-hook-form:masterfrom
jellydn:feature/devtool-ui-position

Conversation

@jellydn
Copy link
Copy Markdown
Contributor

@jellydn jellydn commented Apr 28, 2021

WHAT

  • Migrate example from create-react-app to vitejs
  • Support 4 positions for devtool UI: top-left, top-right, bottom-left, bottom-right. And keep top-right as default option
  • Add storybook for easy to test/prototype component
  • Update packages

Storybook:
https://react-hook-form-devtool-ui.vercel.app/?path=/story/devtoolui--default-dev-tool

WHY

  • We should support position as a prop because it's easy to adjust for different UI.

HOW

  • New usage
<DevTool control={control} placement="top-left" />

Screenshots (if appropriate):

https://gyazo.com/002f0f10d215ca3fd33688654cf8a8b2.gif

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Linter
  • Tests
  • Review comments
  • Security

@jellydn jellydn marked this pull request as ready for review April 28, 2021 18:01
@bluebill1049
Copy link
Copy Markdown
Member

oh wow, thanks very much @jellydn this is awesome, I will contribute to the UI as well after this is merged. I will bake those buttons inside the pannel so they look nicer.

@bluebill1049
Copy link
Copy Markdown
Member

Let me know it's ready to be reviewed.

@jellydn
Copy link
Copy Markdown
Contributor Author

jellydn commented Apr 28, 2021

@bluebill1049 Thanks Bill. It's ready. Please take a look. Thanks 😀

Copy link
Copy Markdown
Member

@bluebill1049 bluebill1049 left a comment

Choose a reason for hiding this comment

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

LTGM, let's get it in and i will polish up the UI part.

Comment thread example/package.json
@@ -0,0 +1,24 @@
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice! thanks for the huge improvement!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Great. Thanks. Good to hear that.

@bluebill1049 bluebill1049 merged commit 928fb22 into react-hook-form:master Apr 29, 2021
@bluebill1049
Copy link
Copy Markdown
Member

sorry about the delay, and thanks for your hard work. I am publishing it now.

@bluebill1049
Copy link
Copy Markdown
Member

let me know your twitter acc, i can tag you for the release.

@jellydn
Copy link
Copy Markdown
Contributor Author

jellydn commented May 10, 2021

Thanks @bluebill1049 This is my twitter @jellydn

@bluebill1049
Copy link
Copy Markdown
Member

https://twitter.com/HookForm/status/1391665467329105920 really appreciated your work on the storybook as well!

@bluebill1049
Copy link
Copy Markdown
Member

if i find some more free time, I will do a "setting" icon in the panel as well. so user can switch it around.

@jellydn
Copy link
Copy Markdown
Contributor Author

jellydn commented May 10, 2021

That would be great. Thanks.

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.

2 participants