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(Input): Ability to specify an Input ErrorComponent #3759

Conversation

markrickert
Copy link
Contributor

@markrickert markrickert commented Mar 4, 2023

Motivation

I have this patched locally on rc.7 mainly so that I can animate the text in and out when shown.

I included a component in the example that shows how to animate error messages, which was not possible with the current errorMessage implementation.

BFFEB27C-27FD-4E7C-BA27-3362F7417C0B-86145-0000AEA5CC63DD39

Fixes n/a

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Jest Unit Test
  • Checked with example app

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation using yarn docs-build-api
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional context

I had trouble committing because of the pre-commit hook. yarn lint-staged was failing for me so skipped the hooks. If this doesn't build/run on CI, please let me know what I can do to get it passing.

Locally, with these changes, yarn && yarn lint && yarn typescript && yarn test all run locally.

I have this patched locally on `rc.7` mainly so that I can animate the text in and out when shown.

Here’s how I’m using this enhancement is by animating the error message in and out, which was not possible with the current `errorMessage` implementation.
@codecov
Copy link

codecov bot commented Mar 4, 2023

Codecov Report

Merging #3759 (4839eb2) into next (5a48d33) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 4839eb2 differs from pull request most recent head 35d9c49. Consider uploading reports for the commit 35d9c49 to get more accurate results

@@            Coverage Diff             @@
##             next    #3759      +/-   ##
==========================================
+ Coverage   79.85%   79.86%   +0.01%     
==========================================
  Files          87       87              
  Lines        1822     1823       +1     
  Branches      804      813       +9     
==========================================
+ Hits         1455     1456       +1     
  Misses        362      362              
  Partials        5        5              
Impacted Files Coverage Δ
packages/base/src/Input/Input.tsx 66.66% <100.00%> (+0.87%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@netlify
Copy link

netlify bot commented Mar 23, 2023

Deploy Preview for react-native-elements ready!

Name Link
🔨 Latest commit 35d9c49
🔍 Latest deploy log https://app.netlify.com/sites/react-native-elements/deploys/648ca18fb9a961000885de41
😎 Deploy Preview https://deploy-preview-3759--react-native-elements.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.

@arpitBhalla arpitBhalla merged commit 8a43add into react-native-elements:next Jun 17, 2023
8 of 14 checks passed
@markrickert markrickert deleted the mrickert/input-error-component branch March 6, 2024 15:36
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.

None yet

2 participants