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

fix: codeInput implement specs, code improvement and new readme examples #1538

Conversation

ghost
Copy link

@ghost ghost commented May 11, 2020

fix: #1488
fix: codeInput accessibility, a few code improvements and readme examples added

@commit-lint
Copy link

commit-lint bot commented May 11, 2020

Bug Fixes

  • codeInput accessibility, a few code improvements and readme examples added (053b560)
  • labelId prop types definition (a00572d)
  • removed accessibility integration due to we have a couple of gray areas on it, will be on stand by (3520c69)
  • margin-bottom offset updated to 12px (0bf8de0)
  • uncomment temporarily disabled integration tests (c9fb5bc)
  • name prop removed; one integration test removed, one test spec updated (onChange) (f8c8181)
  • spec tests and integration tests update (4e5ebfe)
  • codeInput spec method rename and styled updates for readOnly inputs (9a64726)
  • styles improvement; negative margin removed; readme example removed (592f558)
  • removed margins under input elements to close the gap between them as much as possible due to margin-bottom style for inputs (fdeaeca)
  • spec updates needed (119a800)
  • some tests (3dde628)
  • update specs and tests (8be6e96)
  • click and focus handler events update, and a few changes (a70000e)

Features

Styles

Contributors

@blakmetall, @TahimiLeonBravo, @LeandroTorresSicilia

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

@ghost ghost requested review from yvmunayev and LeandroTorresSicilia May 11, 2020 19:30
@ghost ghost changed the title fix: codeInput accessibility, a few code improvements and readme examples added fix: codeInput implement specs, code improvement and new readme examples May 13, 2020
* margin bottom added to single inputs for responsive
* id assignation based on baseID
* readme -- example components renamed accordingly and fixes
* react library hooks installation
@ghost ghost requested a review from LeandroTorresSicilia May 13, 2020 06:06
* added handler for focus and click to be able to blur inputs when codeInput is readOnly or disabled
* added disabled and error examples into readme file
…pdated (onChange)

* getNormalizedValue improved to be use his result for to validate updated value
* unnecessary click handler removed, it was needed for focus action on click for disabled and readOnly items. Is not necessary anymore.
* removed manual await
* change how we type automatically letters and numbers from .key(['','2']) to .key('2')
* extra specs added
* return undefined instead of -1 flag for not found elements
* removed unnecessary specs for now: input id specs
* hook spec for usePreviousIndex definition changed (it was not right before)
* name prop removed
* input id's removed
@TahimiLeonBravo TahimiLeonBravo self-requested a review May 15, 2020 04:16
@TahimiLeonBravo
Copy link
Collaborator

@blakmetall I added a design for readOnly appearance, let's follow these styles
https://zpl.io/bPjBNym
Also, add the value to the example when it is readOnly

src/components/CodeInput/readme.md Outdated Show resolved Hide resolved
src/components/CodeInput/styled/index.js Outdated Show resolved Hide resolved
src/components/CodeInput/inputItems.js Outdated Show resolved Hide resolved
@TahimiLeonBravo TahimiLeonBravo self-requested a review May 15, 2020 16:36
@TahimiLeonBravo
Copy link
Collaborator

@blakmetall we need fix some tests here in order to merge this PR

* typeKey method added to PageObject to manage key event
* integration test added for the testing over the disabled component
* onClick handler added to allow to blur when readOnly is true;
* improved the detection of the current focused index; controls added for the hook useFocusedIndexState: disabled and readOnly f
* specs updated for useFocusedIndexState hook
* removed .select() for selection on setFocus method, not needed anymore and to avoid visual selection over a readOnly CodeInput
* type method from pageObject updated
* spec removed for readOnly verification (not needed anymore)
* readOnly styled configuration update
* update over onClick event
* removal of unnecessary condition related to readOnly (not needed anymore)
@ghost
Copy link
Author

ghost commented May 21, 2020

  • type method from pageObject updated
  • spec removed for readOnly verification (not needed anymore)
  • readOnly styled configuration update
  • update over onClick event
  • removal of unnecessary condition related to readOnly (not needed anymore)

@ghost
Copy link
Author

ghost commented May 21, 2020

Note: integration tests failed over another Component unrelated tu CodeInput

Screen Shot 2020-05-21 at 14 10 28

@LeandroTorresSicilia LeandroTorresSicilia merged commit 6a365b8 into master May 22, 2020
@LeandroTorresSicilia LeandroTorresSicilia deleted the fix-codeinput-component-improve-accesibility-and-a-few-improvements branch May 22, 2020 02:53
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.

feat: implement CodeInput component
3 participants