configuration-as-code-plugin icon indicating copy to clipboard operation
configuration-as-code-plugin copied to clipboard

Look at moving to prism api plugin for view export page

Open timja opened this issue 3 years ago • 9 comments

What feature do you want to see added?

See https://plugins.jenkins.io/prism-api/

It would allow users to pick their own theme and also give us an up to date prism version that we don't need to maintain ourselves

fyi @uhafner 😄

Upstream changes

No response

timja avatar Jan 18 '22 08:01 timja

This would be great! We are way behind 🗡️ We are on 1.16.0 and latest is 1.26.0

jetersen avatar Jan 18 '22 08:01 jetersen

@jetersen I'm curious, what's the signification of "🗡️" in this context?

lemeurherve avatar Jan 18 '22 08:01 lemeurherve

@lemeurherve Thousand Knives or Death by a thousand paper cuts comes to mind.

jetersen avatar Jan 18 '22 08:01 jetersen

Feels like the prism-api-plugin has too many deps. And has custom css wihch applies to analysis plugin?

I would hope that it simply provided prism but it grabs four other plugins 🤔

Perhaps we can have a version with just the script loading and nothing else?

These are the only bits we need but seems like prism api comes with batteries included and much more. https://github.com/jenkinsci/prism-api-plugin/blob/main/src/main/resources/io/jenkins/plugins/prism.jelly

jetersen avatar Jan 18 '22 13:01 jetersen

script loading and theme selection 😄

timja avatar Jan 18 '22 13:01 timja

okay theme selection maybe.

But why depend on bootstrap and font-awesome for theme selection?

Not sure about this plugin-util api I suspect for theme selection it was not needed.

Not sure what it even uses antisamy-markup-formatter for 🤔

jetersen avatar Jan 18 '22 13:01 jetersen

Actually the custom CSS is for markers in the source code that might be useful for other plugins as well.

BS and Font Awesome are used for the details view. All my views use BS5.

You can create additional jelly custom load scripts if required.

antisamy-markup-formatter is used to prevent visualization of source code files that contain unsecured content.

uhafner avatar Jan 18 '22 18:01 uhafner

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 18 '22 19:04 stale[bot]

Looking at the install size of bootstrap plugin and font awesome, I guess it is fine.

https://plugins.jenkins.io/bootstrap5-api/ https://plugins.jenkins.io/font-awesome-api/

jetersen avatar Apr 19 '22 01:04 jetersen