generated from Open-Attestation/react-component-template
-
Notifications
You must be signed in to change notification settings - Fork 3
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/add w3c svg render method shiyu proposal #133
Merged
phanshiyu
merged 20 commits into
feat/add-w3c-svg-render-method
from
feat/add-w3c-svg-render-method-shiyu-proposal
Apr 23, 2024
Merged
Feat/add w3c svg render method shiyu proposal #133
phanshiyu
merged 20 commits into
feat/add-w3c-svg-render-method
from
feat/add-w3c-svg-render-method-shiyu-proposal
Apr 23, 2024
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
yapyuyou
approved these changes
Apr 22, 2024
yapyuyou
approved these changes
Apr 23, 2024
yapyuyou
added a commit
that referenced
this pull request
Apr 24, 2024
* feat: initial commit * fix: a couple of lint issues * fix: lint * test: add SvgRenderer test * test: temporarily ignore lint * test: try dynamic import * test: try dynamic import again * chore: upgrade jest to v29.7.0 * test: change base58 lib and add svg renderer tests * chore: clean up and handle no template case * fix: lint * fix: install jest-environment-jsdom * feat: add SvgModifiedTemplate and test * chore: clean up * chore: downgrade OA until v4 is ready * fix: build * chore: fix some issues and clean up * fix: lint * test: add demo svg template * docs: update README with svgRenderer * fix: make url test pattern less strict * chore: add examples for v2 svg renderering * fix: README not displaying raw svg * fix: aws-crypto/sha256-browser instead * fix: use React.forwardRef instead * fix: lint * fix: clean up props and change onConnected to onResult * fix: use let for source instead * fix: take out fetch method and add temporary typing for v4 * fix: add v2adapter component * fix: add AbortController * fix: example applicationsvg sample * fix: use img instead of iframe and update README * chore: include error in onResult, change enums to string, and update tests * chore: update README * fix: add TODO comment Co-authored-by: Kyle Huang Junyuan <[email protected]> * fix: set forwarded ref directly * fix: lint * Feat/add w3c svg render method shiyu proposal (#133) * refactor: new discrimated union typings for display results * fix: use new display results and new higher level methods to update display results * refactor: shift render svg method out of the render fn * fix: ignoring of exhuastive deps eslint * fix: handle state where svg is malformed * fix: handle loading state * refactor: remove explict handle of default case * refactor: make adaptor props extends from svg renderer directly * test: fix tests and added a new test for malformed svg * chore: use onResult and loading component in example application * fix: should reset state on document change * fix: hide img until it is resolved * chore: use new interface and show malformed as an example * refactor: remove one unnecessary dep * chore: use type import to prevent importing crypto module * fix: typings in adapter * fix: should not alter svg width * chore: remove crypto fallback to avoid bundling it in the future * refactor: use imports instead * fix: load error can also be caused by cors --------- Co-authored-by: Phan Shi Yu <[email protected]> * fix: remove unnecessary renderMethod properties * fix: handle case when renderMethod is present but none of type SvgRenderingTemplate2023 --------- Co-authored-by: Kyle Huang Junyuan <[email protected]> Co-authored-by: Phan Shi Yu <[email protected]> Co-authored-by: Phan Shi Yu <[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.
What
displayResult
crypto
stuff again, reducing build size from 2mb to 600kbmake sure we handle these scenarios