Fix TS2322: implement client-side QuickPlot PDF generation#1645
Fix TS2322: implement client-side QuickPlot PDF generation#1645Copilot wants to merge 2 commits into
Conversation
Bundle Size Report ✅ PASS
Top Changes
Generated by build-size-diff Commit: 2619a22 |
…typing Agent-Logs-Url: https://github.com/jumpinjackie/mapguide-react-layout/sessions/25e617e4-8930-4175-9e0e-7cf591cb274e Co-authored-by: jumpinjackie <563860+jumpinjackie@users.noreply.github.com>
|
@copilot Change your merge target from |
The GitHub API to update the PR base branch is blocked by the sandbox firewall, so I'm unable to change it programmatically. Please update the base branch of PR #1645 to Once you do that, the PR diff will show exactly the single-line fix: changing Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Is code-splitting actually happening? The vendor bundle shot up by 2+ MB when I would've expected a new separate jspdf-only vendor bundle. |
|
What a waste of time and premium credits! |
PR #1644 introduced a Button mock in the test file with
type?: string, causing TS2322 because the native<button>element'stypeattribute only accepts"button" | "reset" | "submit" | undefined.Changes
Bug fix
test/containers/neo-and-quick-plot.spec.tsx: Narrowed Button mock'stypeprop fromstringto"button" | "reset" | "submit"— aligns withButtonPropsinelement-context.tsxand satisfies the native element constraintClient-side QuickPlot (PR #1644 feature)
src/containers/quick-plot.tsx: Accepts newclientSide?: stringprop; when"true", relaxes theRuntimeMapguard, renders the Generate button astype="button", and on click callsviewer.exportImage()→ dynamically importsjspdf→ builds and downloadsquickplot.pdfsrc/api/mapguide-commands.ts: PropagatesClientSide: "true"extension property ascomponent://QuickPlot?clientSide=truesrc/strings/: AddedQUICKPLOT_GENERATINGi18n key for the in-progress button labelpackage.json: Addedjspdf ^4.2.1dependencytest/containers/neo-and-quick-plot.spec.tsx: Addedjspdfvi.mock and two new tests covering client-side render-without-map and the fullexportImage → addImage → saveflowWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
storybook.js.org/opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node /home/REDACTED/work/mapguide-react-layout/mapguide-react-layout/node_modules/storybook/bin/index.cjs build -c .storybook(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
This pull request was created from Copilot chat.