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

feat: disable create page btn if the page name is missing #857

Merged

Conversation

takanome-dev
Copy link
Contributor

@takanome-dev takanome-dev commented Feb 9, 2023

What type of PR is this? (check all applicable)

  • πŸ• Feature
  • πŸ› Bug Fix
  • πŸ“ Documentation Update
  • 🎨 Style
  • πŸ§‘β€πŸ’» Code Refactor
  • πŸ”₯ Performance Improvements
  • βœ… Test
  • πŸ€– Build
  • πŸ” CI
  • πŸ“¦ Chore (Release)
  • ⏩ Revert

Description

This PR:

  • adds a state to disable the create page button when the page name is not set or less than 3 characters
  • removes the state for tracking if the page name is set and displays an error after the form is submitted (not needed because the form can't be submitted without the page name being set)
  • adds disable classes to the submit button
  • cleanup of some explicit props set in the text-input atom

Related Tickets & Documents

Fixes #852

Mobile & Desktop Screenshots/Recordings

  • Empty state
    Screenshot from 2023-02-09 17-53-56

  • Less than 3 characters
    Screenshot from 2023-02-09 17-54-06

  • Valid
    Screenshot from 2023-02-09 17-58-30

Added tests?

  • πŸ‘ yes
  • πŸ™… no, because they aren't needed
  • πŸ™‹ no, because I need help

Added to documentation?

  • πŸ“œ README.md
  • πŸ““ docs.opensauced.pizza
  • πŸ• dev.to/opensauced
  • πŸ“• storybook
  • πŸ™… no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

@netlify
Copy link

netlify bot commented Feb 9, 2023

βœ… Deploy Preview for design-insights ready!

Name Link
πŸ”¨ Latest commit 1f243ba
πŸ” Latest deploy log https://app.netlify.com/sites/design-insights/deploys/63ebf4a060ecae0008b7c9eb
😎 Deploy Preview https://deploy-preview-857--design-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Feb 10, 2023

βœ… Deploy Preview for oss-insights ready!

Built without sensitive environment variables

Name Link
πŸ”¨ Latest commit 1f243ba
πŸ” Latest deploy log https://app.netlify.com/sites/oss-insights/deploys/63ebf4a08c6615000831dda8
😎 Deploy Preview https://deploy-preview-857--oss-insights.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@brandonroberts
Copy link
Contributor

brandonroberts commented Feb 10, 2023

@takanome-dev it works functionally, but UX wise it feels kind of weird that the button is enabled even if I clear out the name field, but then is disabled when I click on it. It would be better if the button was disabled when I clear it out also

@takanome-dev
Copy link
Contributor Author

@takanome-dev it works functionally, but UX wise it feels kind of weird that the button is enabled even if I clear out the name field, but then is disabled when I click on it. It would be better if the button was disabled when I clear it out also

@brandonroberts yeah πŸ’― I didn't pay attention to that. Thanks for pointing that out.

Copy link
Contributor

@Deadreyo Deadreyo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@0-vortex 0-vortex left a comment

Choose a reason for hiding this comment

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

LGTM! πŸ‘

@brandonroberts can you take a 2nd look? Only doing tooling reviews lately

@brandonroberts brandonroberts merged commit 95da564 into open-sauced:beta Feb 15, 2023
github-actions bot pushed a commit that referenced this pull request Feb 15, 2023
## [1.30.0-beta.1](v1.29.0...v1.30.0-beta.1) (2023-02-15)

### πŸ• Features

* disable create insight page button if the page name is missing ([#857](#857)) ([95da564](95da564)), closes [#852](#852)
@takanome-dev takanome-dev deleted the 852-create-page-required-fields branch February 15, 2023 22:08
github-actions bot pushed a commit that referenced this pull request Feb 17, 2023
## [1.30.0-alpha.2](v1.30.0-alpha.1...v1.30.0-alpha.2) (2023-02-17)

### πŸ• Features

* add  highlights to user profile page ([#859](#859)) ([4b01376](4b01376)), closes [#830](#830)
* add dropdown for topics in Explore ([#877](#877)) ([9579902](9579902)), closes [#533](#533)
* disable create insight page button if the page name is missing ([#857](#857)) ([95da564](95da564)), closes [#852](#852)

### πŸ› Bug Fixes

* enable displaying/editing of insight page repos from API ([f4cc62f](f4cc62f))
* formatting ([065ede0](065ede0))
* reset text input fields when clear button is clicked ([#869](#869)) ([783098d](783098d)), closes [#858](#858)
@github-actions
Copy link

πŸŽ‰ This PR is included in version 1.30.0-alpha.2 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

github-actions bot pushed a commit that referenced this pull request Feb 21, 2023
## [1.30.0](v1.29.0...v1.30.0) (2023-02-21)

### πŸ• Features

* add  highlights to user profile page ([#859](#859)) ([4b01376](4b01376)), closes [#830](#830)
* add dropdown for topics in Explore ([#877](#877)) ([9579902](9579902)), closes [#533](#533)
* disable create insight page button if the page name is missing ([#857](#857)) ([95da564](95da564)), closes [#852](#852)

### πŸ› Bug Fixes

* disable create page button only if insight page name is empty ([#893](#893)) ([ed52399](ed52399)), closes [#892](#892)
* hide non-functional elements in highlights card ([#881](#881)) ([ba1bd5e](ba1bd5e))
* rename 404 image file ([4e5171f](4e5171f))
* replace `PRSocialCard` component with GitHub OpenGraph image ([#889](#889)) ([3bfc5a4](3bfc5a4)), closes [#883](#883)
* reset text input fields when clear button is clicked ([#869](#869)) ([783098d](783098d)), closes [#858](#858)
* user profile interest pill UI fix ([#890](#890)) ([4cbff36](4cbff36))
@github-actions
Copy link

πŸŽ‰ This PR is included in version 1.30.0 πŸŽ‰

The release is available on GitHub release

Your semantic-release bot πŸ“¦πŸš€

ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.30.0-beta.1](open-sauced/app@v1.29.0...v1.30.0-beta.1) (2023-02-15)

### πŸ• Features

* disable create insight page button if the page name is missing ([#857](open-sauced/app#857)) ([95da564](open-sauced/app@95da564)), closes [#852](open-sauced/app#852)
ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.30.0-alpha.2](open-sauced/app@v1.30.0-alpha.1...v1.30.0-alpha.2) (2023-02-17)

### πŸ• Features

* add  highlights to user profile page ([#859](open-sauced/app#859)) ([4b01376](open-sauced/app@4b01376)), closes [#830](open-sauced/app#830)
* add dropdown for topics in Explore ([#877](open-sauced/app#877)) ([9579902](open-sauced/app@9579902)), closes [#533](open-sauced/app#533)
* disable create insight page button if the page name is missing ([#857](open-sauced/app#857)) ([95da564](open-sauced/app@95da564)), closes [#852](open-sauced/app#852)

### πŸ› Bug Fixes

* enable displaying/editing of insight page repos from API ([f4cc62f](open-sauced/app@f4cc62f))
* formatting ([065ede0](open-sauced/app@065ede0))
* reset text input fields when clear button is clicked ([#869](open-sauced/app#869)) ([783098d](open-sauced/app@783098d)), closes [#858](open-sauced/app#858)
ElpisHelle added a commit to ElpisHelle/next.js-tailwindcss that referenced this pull request Aug 17, 2023
## [1.30.0](open-sauced/app@v1.29.0...v1.30.0) (2023-02-21)

### πŸ• Features

* add  highlights to user profile page ([#859](open-sauced/app#859)) ([4b01376](open-sauced/app@4b01376)), closes [#830](open-sauced/app#830)
* add dropdown for topics in Explore ([#877](open-sauced/app#877)) ([9579902](open-sauced/app@9579902)), closes [#533](open-sauced/app#533)
* disable create insight page button if the page name is missing ([#857](open-sauced/app#857)) ([95da564](open-sauced/app@95da564)), closes [#852](open-sauced/app#852)

### πŸ› Bug Fixes

* disable create page button only if insight page name is empty ([#893](open-sauced/app#893)) ([ed52399](open-sauced/app@ed52399)), closes [#892](open-sauced/app#892)
* hide non-functional elements in highlights card ([#881](open-sauced/app#881)) ([ba1bd5e](open-sauced/app@ba1bd5e))
* rename 404 image file ([4e5171f](open-sauced/app@4e5171f))
* replace `PRSocialCard` component with GitHub OpenGraph image ([#889](open-sauced/app#889)) ([3bfc5a4](open-sauced/app@3bfc5a4)), closes [#883](open-sauced/app#883)
* reset text input fields when clear button is clicked ([#869](open-sauced/app#869)) ([783098d](open-sauced/app@783098d)), closes [#858](open-sauced/app#858)
* user profile interest pill UI fix ([#890](open-sauced/app#890)) ([4cbff36](open-sauced/app@4cbff36))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: Validations when creating a page, make the page title required with at least one repo
4 participants