GithubHelp home page GithubHelp logo

Comments (15)

paulwhippey avatar paulwhippey commented on June 11, 2024 2

Thanks for the suggestion, is the issue fixed at https://9930c8a5.drawio-dev.pages.dev/ ?

Hi David,

Yes, looks good! Thanks for fixing this 👍 😃
Screenshot 2024-04-11 at 19 26 28

from drawio.

davidjgraph avatar davidjgraph commented on June 11, 2024 1

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.

davidjgraph avatar davidjgraph commented on June 11, 2024 1

This is a mirror repo. Just raise it, I'll review and apply to the real repo.

from drawio.

paulwhippey avatar paulwhippey commented on June 11, 2024 1

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%:&nbsp;%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%:&nbsp;%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%:&nbsp;%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%:&nbsp;%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.

davidjgraph avatar davidjgraph commented on June 11, 2024 1

Thanks for the suggestion, is the issue fixed at https://9930c8a5.drawio-dev.pages.dev/ ?

from drawio.

JasonBSteele avatar JasonBSteele commented on June 11, 2024 1

@paulwhippey, @davidjgraph, thankyou very much for resolving this guys

from drawio.

Rlexsu avatar Rlexsu commented on June 11, 2024

I just encountered this issue while creating a diagram, removing the placeholder reveal the underlying issue
image
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%.
image
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.

JasonBSteele avatar JasonBSteele commented on June 11, 2024

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.

davidjgraph avatar davidjgraph commented on June 11, 2024

We'll accept a PR, yes.

from drawio.

JasonBSteele avatar JasonBSteele commented on June 11, 2024

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.

Rlexsu avatar Rlexsu commented on June 11, 2024

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.

Rlexsu avatar Rlexsu commented on June 11, 2024

@davidjgraph I've just checked and you already made the fix on v24.2.0 release with commit id 3dbd67a

from drawio.

davidjgraph avatar davidjgraph commented on June 11, 2024

That commit was taken from a PR on this repo. It broke other things.

from drawio.

Rlexsu avatar Rlexsu commented on June 11, 2024

@davidjgraph the dev(main) branch in this repo already contain the code change, so there's nothing I can do now

from drawio.

davidjgraph avatar davidjgraph commented on June 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.