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(textfield): add 'u' flag to keep consistency with native input el… #1427

Merged
merged 2 commits into from
May 4, 2021

Conversation

OpportunityLiu
Copy link
Contributor

@OpportunityLiu OpportunityLiu commented May 2, 2021

…ement

Description

  1. Add 'u' flag for both "pattern" and "allowedKeys"
  2. Add boundary-type assertions (^ and $) for pattern testing
  3. Add related tests
  4. Add pathToFileURL for css generation script, see Absolute Windows paths are handled as invalid URL path in ESM import() nodejs/node#34765

Related Issue

fixes #1388

Motivation and Context

This change updates the behavior of multiline textfield pattern, to be consistant with native input element.

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@OpportunityLiu
Copy link
Contributor Author

The scripts still not working on Windows, so I'm testing with CI.

image

@Westbrook
Copy link
Contributor

Thanks for the contribution! This looks great and I'm very happy to see the exhaustive testing on this 🚀

Sorry, you're having trouble building in Windows. Would you be able to confirm whether updating the package.json at line 17 with the following supports building in that environment?

"build": "yarn build:css && tsc --build ./packages/*/tsconfig.json && tsc --build ./projects/story-decorator/tsconfig.json && tsc --build ./projects/vrt-compare/tsconfig.json",   

If not, we can find a path toward testing this more rigorously on our end, but I'd love it if this cleared up the situation.

@OpportunityLiu
Copy link
Contributor Author

Thanks for the contribution! This looks great and I'm very happy to see the exhaustive testing on this 🚀

Sorry, you're having trouble building in Windows. Would you be able to confirm whether updating the package.json at line 17 with the following supports building in that environment?

"build": "yarn build:css && tsc --build ./packages/*/tsconfig.json && tsc --build ./projects/story-decorator/tsconfig.json && tsc --build ./projects/vrt-compare/tsconfig.json",   

If not, we can find a path toward testing this more rigorously on our end, but I'd love it if this cleared up the situation.

Not working. It is the responsibility of application to explain glob patterns, not the shell, as in *nix.

Copy link
Contributor

@Westbrook Westbrook left a comment

Choose a reason for hiding this comment

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

LGTM.

Thanks for the contribution. We'll work on trying to get things working in Windows as per #909 but it may be a while.

@Westbrook Westbrook merged commit 89d0e31 into adobe:main May 4, 2021
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.

Add 'u' flag to be consistent with "pattern" attribute of <input> element
2 participants