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

Solve Document Field Problems with the blockDocument property #143

Open
wants to merge 3 commits into
base: 3.x
Choose a base branch
from

Conversation

TiagoGranelli
Copy link

@TiagoGranelli TiagoGranelli commented Feb 7, 2022

What is the purpose of this pull request?

Solve the problems of the document field (CPF). This fix also fixes the problem that this PR is fixing Solve the problem of the document field (CPF) blocking even with the empty document.

What problem is this solving?

This pull request is for fixing bugs, currently, this block document property has two issues that have been resolved in this PR:

  1. The field is blocked as soon as the user enters 1 digit
  2. The field remains blocked if someone removes the document from that account

How should this be manually tested?

  1. link the branch feature/blockDocument
  2. link the MyAccount and store-theme repositories passing the blockDocument prop

If the blockDocument prop is active, the field should only block when there is a valid document saved

Field should not lock while typing
Field must not block if value is an empty string

WS to test

Workspace

Related to / Depends on?

vtex-apps/my-account#252
vtex-apps/my-account-commons#60

Screenshots or example usage

1st bugfix

Before

image
image

cpf.blocked.with.1.digit.mp4

After

image
image
field only block after submit
image

bugfix-cpf.blocked.after.submit.mp4

2nd bugfix

Before

image

After

image

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

fixed issue with blockDocument prop blocking field even when there was no document

fixed issue with blockDocument prop blocking field before document is filled completely
added new "changing" property so we know when a field has changed
@vtex-io-ci-cd
Copy link

vtex-io-ci-cd bot commented Feb 7, 2022

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@TiagoGranelli TiagoGranelli changed the base branch from master to 3.x February 7, 2022 20:33
@TiagoGranelli TiagoGranelli marked this pull request as ready for review February 8, 2022 19:23
@TiagoGranelli TiagoGranelli changed the title Feature/block document Solve Document Field Problems with the blockDocument property Feb 8, 2022
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