When an element is defined in a stencil XML file but not declared in the corresponding JS shape file, it causes redundant loading of the JS file even when using minified bundles.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 8.2k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Preflight Checklist
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for a feature request that matches the one I want to file, without success.
You must search the issue tracker and agree to the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.
If you are technical, you should report bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.
Describe the bug
When an element is defined in a stencil XML file but not declared in the corresponding JS shape file, it causes redundant loading of the JS file even when using minified bundles. Specifically:
mxgraph.aws4.folderexists insrc/main/webapp/stencils/aws4.xml- No corresponding declaration exists in
src/main/webapp/shapes/mxAWS4.js - Minified bundles
shapes-14-6-5.min.jsandstencils.min.jsare loaded - Browser network tab shows redundant request to
/drawio-viewer/mxAWS4.js
To Reproduce
Steps to reproduce the behavior:
(see the attachment file :
)
- Create diagram with
mxgraph.aws4.folderelement - Load minified bundles:
viewer.min.js,shapes-14-6-5.min.js,stencils.min.js - Monitor network requests in browser dev tools
- Observe failed request to
mxAWS4.js(404 error)
Expected behavior
When using the minified bundles viewer.min.js, shapes-14-6-5.min.js, and stencils.min.js to render diagrams:
Shape definitions already included in shapes-14-6-5.min.js (e.g., AWS4 shapes) should not trigger separate requests for their original source files (e.g., mxAWS4.js).
Screenshots
draw.io version (In the Help->About menu of the draw.io editor):
- draw.io version 28.1.2
Desktop (please complete the following information):
- OS: [Windows 10]
- Browser [chrome]
- Browser Version [139.0.7258.128]
Smartphone (please complete the following information):
- Device: [not tested in smart phone
- OS: [not tested in smart phone]
- Browser [not tested in smart phone]
- Version [not tested in smart phone]
I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:
- yes
Additional context
Add any other context about the problem here.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/main/webapp/stencils/aws4.xml and src/main/webapp/shapes/mxAWS4.js, then reproduce the diagram using viewer.min.js, shapes-14-6-5.min.js, and stencils.min.js while monitoring the browser network tab. Confirm that mxgraph.aws4.folder is covered by the minified bundles without a separate mxAWS4.js request or 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100