-
Notifications
You must be signed in to change notification settings - Fork 89
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: display required indicator only for non-empty labels and Improve test structure #762
Merged
rishabhpoddar
merged 18 commits into
feat/custom-form-fields
from
fix/email-password-label
Nov 20, 2023
Merged
fix: display required indicator only for non-empty labels and Improve test structure #762
rishabhpoddar
merged 18 commits into
feat/custom-form-fields
from
fix/email-password-label
Nov 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size-limit report 📦
|
amitbadala
changed the title
Show required sign only if label is valid
fix: Show required sign only if label is not empty
Nov 15, 2023
amitbadala
changed the title
fix: Show required sign only if label is not empty
fix: display required indicator only for non-empty labels and Improve test structure
Nov 17, 2023
rishabhpoddar
suggested changes
Nov 17, 2023
porcellus
requested changes
Nov 17, 2023
porcellus
approved these changes
Nov 19, 2023
rishabhpoddar
suggested changes
Nov 20, 2023
rishabhpoddar
merged commit Nov 20, 2023
45dd28c
into
feat/custom-form-fields
22 of 23 checks passed
rishabhpoddar
added a commit
that referenced
this pull request
Nov 23, 2023
* feat: add input component as types, simplify event handlers - emailpassword recipe (#752) * Add inputComponent to exposed types * Add inputComponent to normalised fields * For testing only - use custom type definition for inputComponent * Input component already present in FormFieldThemeProps * Testing if git package is getting installed correctly * Run build for previous commits * Remove inputComp from NormalizedFormField * Add tests for custom fields * Remove testing ele * Move the custom fields tests into existing describe * Update dropdown values to avoid confusion * Add helper func to set dropdown, better test title, use existing describe hooks * Use strict equal * Update request * A seperate func to fetch custom comp not required * Move inputComponent to signup types * Cleanup unwanted imports * Move inputComponent to signup types * Clean types * Update build files * Use explicit values in validate func * Minor cleanup of types * Better type names * Props suggestions working for inputComponent * Enforce strict string check on form values, now onChange function for fields only needs value, no need to supply name or id * Update based on the new onChange func * Ability to add default value with getDefaultValue prop * Handle if getDefaultValue is not a function * instead of form submit apply type test within onChange function itself * Add tests for default value * Remove unwanted abort * Testing email-verification workflow * Reverting onChange changes * onChange function to accept only values * Initialize fieldstates at the start * Remove useEffect * Fix race conditions when setting default value * Add custom default fields to typescript example, plus add tests to show custom error message * Add tests for incorrect default props in formFields * Add tests for incorrect usage of onChange prop * Add change log * Wrap ternary opeators into seperate func for better readibility * Wrap inputComponent in a serperate component to avoid unecessary rerenders * Add change log feedbacks * Better variable names, include formfields directly in typescript example * Add more tests for default & onChange func, updated typescript file to show the latest changes * Add more test, which intercepts request payload * Cleanup comments * Minor formatting * Minor fix * Clean up helper * Update change log & versions * feat: add getDefaultValue to signin & signup form fields (#756) * Add getDefaultValue to signin, hence shuffle the existing types * Add tests for default signin feature * Add default feature to typescript * Fix failed test * Reset password now supports getDefaultValue * Add tests for resetPassword email field * Revert "Add tests for resetPassword email field" This reverts commit 363b575. * Revert "Reset password now supports getDefaultValue" This reverts commit be4c00a. * feat: add nonOptionalErrorMsg props (#757) * Add nonOptionalErr types * Now supports nonOptionalErrorMsg attribute * Add tests and fix signin types to include nonOptionalMsg * Enforce no api request are made on blank forms * Clean up signup * Throw error if invalid nonOptionalErrorMsg, add tests for the same * Better error message * Handle incorrect optional flag * fixes redundant normalisation --------- Co-authored-by: rishabhpoddar <[email protected]> * Add test for thirdparty signup - new features * Add tests for thirdparty signin - new features * Run build-pretty * Set correct flag * fix: display required indicator only for non-empty labels and Improve test structure (#762) * Show required sign only if label is valid * Better func names & consistent return type * Use assert instead of throw error * Consistent tests description * Remove unecessary code * Add correct version number * Update changelog, add thirdparty example * Minor fox * Read from testContext * Refactor tests to ensure its easy to maintain different configurations * Update third party tests * Clean up * Minor copy update * Trim the label text * Add build * Handle if label is not supplied * Highlight var in changelog, minor update * Update custom payload to test for trimmed-version label * Use page.select for changing dropdown values * Handle react 16 tests for new features (#764) --------- Co-authored-by: Amit Badala <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of change
Fixes and feedbacks from this PR
Related issues
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)
Documentation changes
(If relevant, please create a PR in our docs repo, or create a checklist here highlighting the necessary changes)
Checklist for important updates
frontendDriverInterfaceSupported.json
file has been updated (if needed)package.json
package-lock.json
lib/ts/version.ts
npm run build-pretty
git tag
) in the formatvX.Y.Z
, and then find the latest branch (git branch --all
) whoseX.Y
is greater than the latest released tag.someFunc: function () {..}
).size-limit
section ofpackage.json
with the size limit set to the current size rounded up.rollup.config.mjs
Remaining TODOs for this PR