Giter Site home page Giter Site logo

Corrupted icons about azure-plantuml HOT 8 CLOSED

phatcher avatar phatcher commented on May 18, 2024
Corrupted icons

from azure-plantuml.

Comments (8)

travisnielsen avatar travisnielsen commented on May 18, 2024 1

Sounds good! And I agree that standardizing on Playwright could help other projects that use different languages. I'll work through the implementation and will create a PR.

from azure-plantuml.

Potherca avatar Potherca commented on May 18, 2024 1

AWE.SOME. This is just awesome! 🤩

If this is too much effort, well settle for one big MR, but if at all possible, I'd prefer 3 separate oMRs.
One for the code change, one for the SVG fixes, and one adding missing icons.

To avoid extra rebasing hassles, you can open MRs on consecutive branches, like this:

o = Merge Request

 master branch  . . . . . . ---+--------o------o------o----
    1st branch  . . . . . . . . \----A-/      /      /
    2nd branch  . . . . . . . . . . . \----B-/      / 
    3rd branch  . . . . . . . . . . . . . . \----C-/ 

Just open each MR pointing the previous branch (so only the first MR points to master) and GitHub will neatly fold each MR into the main branch, as long as we merge them in the right order.

Again:Great work @travisnielsen!

from azure-plantuml.

Potherca avatar Potherca commented on May 18, 2024 1

I concur. Closing. Thank you @phatcher for reporting the issue and @travisnielsen for fixing it. 🏅

from azure-plantuml.

travisnielsen avatar travisnielsen commented on May 18, 2024

I see a few more:

  • AzureDevOpsOrganisation
  • AzureServiceBusQueue
  • AzureServiceBusTopic
  • AzureIPAddressSpace
  • AzureAdvancedTools
  • AzureContainerSettings
  • AzureCORS
  • AzureQuota

from azure-plantuml.

travisnielsen avatar travisnielsen commented on May 18, 2024

After a bit of research, I suspect the issue is due to the complexity of converting SVGs and it will be difficult to find a library that is able to transform these files consistently. I wonder folks would be open to taking an alternative approach. I found one that uses Playwright to screenshot the SVG and write out the image to a PNG file. From what I see, this offers complete fidelity to the original SVG and it should be straightforward to integrate into the current build scripts.

I created a sample application that uses this technique and was able to convert all the problematic icons.
VNet-Subnets_COLOR
Power-BI-Embedded_COLOR

from azure-plantuml.

Potherca avatar Potherca commented on May 18, 2024

@travisnielsen Thank you for looking into this!

it will be difficult to find a library that is able to transform these files consistently

Yeah, I concur. Its one of those things thats been bugging me, but I've not got time to address.

Using Playwright might actually be more desireable than our current approach, as it could also be run from other platforms/language than .NET (i.e. for non-windows developers).

The most important thing is that things work (which the current convertion script does not), so I am all for something that fixes this!

Is it possible that you open an MR with the suggested changes?

from azure-plantuml.

travisnielsen avatar travisnielsen commented on May 18, 2024

I'm close to wrapping up my update to the build process: feature/svgupdate

You can find a sample diagram here

A few highlights:

  • All icons captured in this issue are now render correctly. SVGs are converted to PNG via Playwright.
  • Code has been re-platformed to a .NET6 project. This is mainly because Playwright requires a .csproj file but I also wasn't a big fan of the C# script approach (personal opinion).
  • Code has been re-factored somewhat. Possibility to add unit tests, if desired.
  • Build process now works fully on MacOS, Linux, and (of course) Windows. I see potential for automated builds.
  • Removed dependencies on rsvg and inkscape
  • Added a code dependency on svg-net but this could be eliminated in the future.
  • Updated build documentation
  • Externalized config settings (file paths), which addresses #9
  • Fixed some older icons in the manual folder that were not rendering well: Genomics, Stream Analytics, and Blob Storage (which isn't really a thing anymore....but I suppose that's a topic for another day).

It's a larger change than I anticipated, but it should be easier to manage going forward.

If we'd like to move forward with a PR, I can include icons from #34.

from azure-plantuml.

travisnielsen avatar travisnielsen commented on May 18, 2024

@Potherca - I believe this issue can be closed based on the recent merges.

from azure-plantuml.

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.