feat: embeddable calculator widgets with postMessage resize (issue #121) - #170
Open
yy1142274323 wants to merge 1 commit into
Open
feat: embeddable calculator widgets with postMessage resize (issue #121)#170yy1142274323 wants to merge 1 commit into
yy1142274323 wants to merge 1 commit into
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Contributor
|
@yy1142274323 is attempting to deploy a commit to the milieninyv's projects Team on Vercel. A member of the Team first needs to authorize it. |
Author
|
/claim #121 |
|
😅 Ups... the issue does not have any reward yet! |
This file contains hidden or 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
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.
Bounty #121 — Embeddable calculator widgets for external sites
Closes #121
Acceptance criteria
/embed/blind-flange-calculator/and/embed/pressure-vessel-dished-end-calc/build/embed/*/index.htmlboth generated)postMessage-based resize handling; no third-party cookies requiredEmbedUtilityPagemeasures the same-origin tool iframe content height, sizes the frame to it, and posts{source: 'cadautoscript-embed', type: 'resize', height, slug}to the embedding parentdocs/utilities/embed-calculators.mdrewritten: embed URL table, copy-paste iframe + parent-side resize-listener snippet for both calculators, how-it-works sectionImplementation notes
src/components/Utilities/EmbedUtilityPage.tsx(minimal chrome: no navbar/footer, just the tool iframe + powered-by bar)src/pages/embed/<slug>.tsx(3 lines each, factory pattern — easy to extend to other calculators)utilityPageConfigs(appPath,title,iframeAllow), so embed behavior stays in sync with the full shell pages<meta name="robots" content="noindex">to protect search visibility of the main pagespnpm buildpasses; embed routes present in the generated static outputExtending to more calculators