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

[DDW-173] - Button should be disabled when there is nothing to submit #1998

Conversation

DeeJayElly
Copy link
Contributor

@DeeJayElly DeeJayElly commented Apr 23, 2020

This PR disables button on forms if there is nothing to be submitted (if the input fields are empty)

Screenshots

Screenshot 2020-04-23 15 05 07

Screenshot 2020-04-23 15 03 37

Screenshot 2020-04-23 15 03 29

Screenshot 2020-04-23 15 01 43


Testing Checklist

  • Slack QA thread
  • Test forms on: change password dialog, set password dialog, create wallet dialog & generate new address form

Review Checklist

Basics

  • PR has been assigned and has appropriate labels (feature/bug/chore, release-x.x.x)
  • PR is updated to the most recent version of the target branch (and there are no conflicts)
  • PR has a good description that summarizes all changes
  • PR has default-sized Daedalus window screenshots or animated GIFs of important UI changes:
    • In English
    • In Japanese
  • CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
  • Automated tests: All acceptance and unit tests are passing (yarn test)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn dev)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn package / CI builds)
  • There are no flow errors or warnings (yarn flow:test)
  • There are no lint errors or warnings (yarn lint)
  • There are no prettier errors or warnings (yarn prettier:check)
  • There are no missing translations (running yarn manage:translations produces no changes)
  • Text changes are proofread and approved (Jane Wild / Amy Reeve)
  • Japanese text changes are proofread and approved (Junko Oda)
  • UI changes look good in all themes (Alexander Rukin)
  • Storybook works and no stories are broken (yarn storybook)
  • In case of dependency changes yarn.lock file is updated

Code Quality

  • Important parts of the code are properly commented and documented
  • Code is properly typed with flow
  • React components are split-up enough to avoid unnecessary re-renderings
  • Any code that only works in main process is neatly separated from components

Testing

  • New feature/change is covered by acceptance tests
  • New feature/change is manually tested and approved by QA team
  • All existing acceptance tests are still up-to-date
  • New feature/change is covered by Daedalus Testing scenario
  • All existing Daedalus Testing scenarios are still up-to-date

After Review

  • Merge the PR
  • Delete the source branch
  • Move the ticket to done column on the YouTrack board
  • Update Slack QA thread by marking it with a green checkmark

@alexander-rukin
Copy link
Contributor

alexander-rukin commented Apr 24, 2020

image

I'd say that button should be active when there is no blocking errors on the screen.

cc @nikolaglumac

@alexander-rukin
Copy link
Contributor

image

same here, but this happened after the first submission. So I'd think that button should be blocked till I change the password to a new one.
BTW is it possible to color first input borders in red in this case? As it would be easier to recognize where error is

@alexander-rukin
Copy link
Contributor

image

same here

@nikolaglumac nikolaglumac removed request for thedanheller and a team April 27, 2020 09:12
@nikolaglumac
Copy link
Contributor

@yakovkaravelov @tomothespian please review this PR 🙏

@DeeJayElly DeeJayElly removed the WIP label Apr 27, 2020
@DeeJayElly
Copy link
Contributor Author

image

I'd say that button should be active when there is no blocking errors on the screen.
cc @nikolaglumac

Done

@DeeJayElly
Copy link
Contributor Author

image

same here

Done

@DeeJayElly
Copy link
Contributor Author

image

same here, but this happened after the first submission. So I'd think that button should be blocked till I change the password to a new one.
BTW is it possible to color first input borders in red in this case? As it would be easier to recognize where error is

Done

@ManusMcCole
Copy link

Great job @DeeJayElly . The only outstanding issue I can still see is the paper wallet message being minorly truncated when Daedalus is not set to full screen
image

@nikolaglumac
Copy link
Contributor

Great job @DeeJayElly . The only outstanding issue I can still see is the paper wallet message being minorly truncated when Daedalus is not set to full screen
image

@ManusMcCole this is a known issue which has nothing to do with this PR.
We will be fixing it in the scope of a different task.

cc @gnpf @a-rukin

@ManusMcCole ManusMcCole self-requested a review May 5, 2020 09:31
Copy link

@ManusMcCole ManusMcCole left a comment

Choose a reason for hiding this comment

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

Great work @DeeJayElly

Copy link

@gabriela-ponce gabriela-ponce left a comment

Choose a reason for hiding this comment

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

@DeeJayElly Great work, all fixes look great 🚀

Copy link
Contributor

@tomislavhoracek tomislavhoracek left a comment

Choose a reason for hiding this comment

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

@DeeJayElly Looks good now. 🚀 I just left 3 minor comments related to code cleanup / optimization

Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

@DeeJayElly please remove password format validation on the "Current password" field - here we should only check for length > 0...

Screenshot 2020-05-06 at 20 47 07

@nikolaglumac
Copy link
Contributor

@DeeJayElly on the restore dialog the submit button on 2nd step should remain disabled until user enters all 12/15/27 words:

Screenshot 2020-05-06 at 20 49 12

CHANGELOG.md Outdated
@@ -9,6 +9,7 @@ Changelog

### Fixes

- Disabled button on forms when there is nothing to submit ([PR 1998](https://github.com/input-output-hk/daedalus/pull/1998))
Copy link
Contributor

Choose a reason for hiding this comment

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

@DeeJayElly please move this line under vNext (add it if it is not already there!)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@DeeJayElly
Copy link
Contributor Author

@DeeJayElly on the restore dialog the submit button on 2nd step should remain disabled until user enters all 12/15/27 words:

Screenshot 2020-05-06 at 20 49 12

Fixed

@DeeJayElly
Copy link
Contributor Author

@DeeJayElly please remove password format validation on the "Current password" field - here we should only check for length > 0...

Screenshot 2020-05-06 at 20 47 07

Fixed

Copy link

@gabriela-ponce gabriela-ponce left a comment

Choose a reason for hiding this comment

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

The last fixes look good 👍

Copy link
Contributor

@alexander-rukin alexander-rukin left a comment

Choose a reason for hiding this comment

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

LGTM

…n-there-is-nothing-to-submit

# Conflicts:
#	CHANGELOG.md
Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

Works great @DeeJayElly 🎉

@nikolaglumac nikolaglumac merged commit cac25e8 into develop May 7, 2020
@iohk-bors iohk-bors bot deleted the fix/ddw-173-button-should-be-disabled-when-there-is-nothing-to-submit branch May 7, 2020 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug release-1.0.0-STN1 Daedalus Shelley Testnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants