-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow all special characters in IDs, except whitespace. #2231
Conversation
🦋 Changeset detectedLatest commit: e384dff The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
Size Change: -32 B (-0.03%) Total Size: 96.5 kB
ℹ️ View Unchanged
|
npm Snapshot: Published🎉 Good news!! We've packaged up the latest commit from this PR (7952cc3) and published all packages with changesets to npm. You can install the packages in webapp by running: ./services/static/dev/tools/deploy_wonder_blocks.js --tag="PR2231" Packages can also be installed manually by running: yarn add @khanacademy/wonder-blocks-<package-name>@PR2231 |
A new build was pushed to Chromatic! 🚀https://5e1bf4b385e3fb0020b7073c-uqhacvoiae.chromatic.com/ Chromatic results:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2231 +/- ##
==========================================
+ Coverage 94.43% 95.09% +0.66%
==========================================
Files 248 248
Lines 29238 29237 -1
Branches 1643 2329 +686
==========================================
+ Hits 27611 27804 +193
+ Misses 1623 1429 -194
Partials 4 4
... and 27 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great and nice catch!
@@ -33,14 +33,13 @@ export default class UniqueIDFactory implements IIdentifierFactory { | |||
* identifier. It does not assert that a string IS a valid identifier (for | |||
* example, that it doesn't start with numbers). We don't need to do that | |||
* here because all identifiers are prefixed to avoid needing that check. | |||
* | |||
* According to this post: | |||
* https://stackoverflow.com/questions/70579/html-valid-id-attribute-values/31773673#31773673 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this link!
Summary:
This came up with the Perseus team, where they had some Unicode characters in an ID and that was throwing errors. I did some more research and learned that only whitespace is considered to be invalid, so I updated our logic around this.
Issue: WB-1704
Test plan:
I ran the tests and they passed.