Comments (15)
Thanks for the suggestion, is the issue fixed at https://9930c8a5.drawio-dev.pages.dev/ ?
Hi David,
Yes, looks good! Thanks for fixing this 👍 😃
from drawio.
The problem with C4 is we're getting one PR to fix some issue. That PR breaks something else, and round and round. Now we're at another apparent issue.
The C4 users in drawio need to work out exactly what the C4 shapes should show, collectively. We don't use C4, so have no idea what they are or what they should show.
from drawio.
This is a mirror repo. Just raise it, I'll review and apply to the real repo.
from drawio.
On the surface this should be a simple case of making these changes:
In file: https://github.com/jgraph/drawio/blob/dev/src/main/webapp/js/diagramly/sidebar/Sidebar-C4.js
Change Line 95 to:
bg.setAttribute('label', '<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%: %c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
Change Line 110 to:
bg.setAttribute('label', '<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%: %c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
Change Line 125 to:
bg.setAttribute('label', '<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%: %c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
Change Line 140 to:
bg.setAttribute('label', '<font style="font-size: 16px"><b>%c4Name%</b></font><div>[%c4Type%: %c4Technology%]</div><br><div><font style="font-size: 11px"><font color="#E6E6E6">%c4Description%</font></div>');
I can raise a PR for just these changes if that is of help? Please don't remove the C4 shapes, I use them quite a lot in my work.
Many thanks.
from drawio.
Thanks for the suggestion, is the issue fixed at https://9930c8a5.drawio-dev.pages.dev/ ?
from drawio.
@paulwhippey, @davidjgraph, thankyou very much for resolving this guys
from drawio.
I just encountered this issue while creating a diagram, removing the placeholder reveal the underlying issue
Note that for person the %c4Name% is at the top, but for Web Browser Container, Message Bus Container, Microservice Container, Data Container it is %c4Type% at the top instead of %c4Name%.
So this effectively means that although we can key in c4Name as seen from picture above but it will not get displayed when it is being rendered.
from drawio.
I agree with @Rlexsu, it is simply because the wrong template value (c4Type) has been used where c4Name should have been used. Can we please have a fix for this as it makes those shapes unusable?
If a PR were raised that addressed just this issue, surely this wouldn't cause the breaking problems referred to by @davidjgraph ?
from drawio.
We'll accept a PR, yes.
from drawio.
Ok, I have found where I think the fixes need to happen:
https://github.com/jgraph/drawio-app-engine/blob/f835e71d41970521143892d5bb5d8aaa9f60686f/src/main/webapp/js/diagramly/sidebar/Sidebar-C4.js#L136
We can see that several shapes in here don't have c4Name added to them and that seems to correlate with the shapes that have missing Names. Is there anyone here with experience with raising PRs for this project and better familiarity with the code that could fix this?
from drawio.
I can raise a PR but the readme on the main page stated that it is not open for contribution, so not sure what to do at this point
from drawio.
@davidjgraph I've just checked and you already made the fix on v24.2.0 release with commit id 3dbd67a
from drawio.
That commit was taken from a PR on this repo. It broke other things.
from drawio.
@davidjgraph the dev(main) branch in this repo already contain the code change, so there's nothing I can do now
from drawio.
OK, but the problem is the changes weren't tested at all. They broke other things, this is why we don't accept PRs.
from drawio.
Related Issues (20)
- Color picker sends cursor to left side when exits right while pressing down
- Please change Increase/decrease font size shortcut
- Just a question request
- Add URL parameter to the viewer to select elements with specific tags
- Excess event listeners affecting the performance
- Sharepoint folder picker - search or better organization HOT 2
- Feature: Allow embedding one page in another HOT 5
- Most themes has been removed in self-hosted environment
- Kubernetes Shapes do not show any labels correctly - 20240507 HOT 1
- Unable to download entire diagram in single page as PDF in v24.3.1 online or local app | Working on version v24.2.5 HOT 4
- Move PDF from Export to Save HOT 2
- how to open mermaid2drawio function?
- Character error on Ubuntu 24.04 HOT 2
- Confluence attachments files to be renamed when you rename the drawing file
- Math is not rendered consistently HOT 1
- Project name wrong on integrations page HOT 2
- Allows changing text case
- Using freeform drawing on an iPad can cause the canvas to scale and result in misaligned drawing positions
- Application (diagrams.net) is disabled HOT 1
- Allow disabling draw.io default templates
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drawio.