Open RedstoneWizard08 opened 4 months ago
P.S. Yes, I reviewed my own code. I've found it helps me.
Hey, thanks for for PR! Some quick feedback regarding the ticket for Dokka:
Not sure about the rest, I never used Dokka on my own :<
Okay! I'll move it to a plugin, and maybe I'll find a way to run tests after build (to save time). Otherwise, I'll revert the ARM changes. Thanks for the feedback!
Edit: A plugin might make it easier for me, since I'm deploying it on a private server that's separate from the VM I'm using to develop it, so the build time should be faster for that. xD
Also, yeah, dealing with JS is tricky. I might have to end up making a custom frontend for Dokka that reads its data and renders it. Dokka uses a lot of manifests and json so it shouldn't be too hard.
Dealing with these docs sites is a bit tricky, because we need to run them in sandbox to prevent malicious js content. Maybe it could be a bit easier in 4.x, because we'll move to regular http sessions. Maybe we should even encourage people to host docs on separate subdomains if possible.
Dokka also allows for non-default JS to be loaded at buildtime in the jar, so that might cause issues (but I do think it is important to support, Dokka's whole thing is being super extendible and pretty)
Do we need a custom Dokka frontend and prism styles though? That should be handled by the user with the aforementioned custom CSS/JS in the Dokka jar individually. This feels like some things in this PR are specific to your own use but I'm not sure
Do we need a custom Dokka frontend and prism styles though? That should be handled by the user with the aforementioned custom CSS/JS in the Dokka jar individually. This feels like some things in this PR are specific to your own use but I'm not sure
I'd want to do this, but when I try to load a dokka site, none of the members or classes load when looking at a page. I can't see any issues even in the console. It confuses me. If I find a solution, I'll remove the custom frontend entirely.
I'm also kinda clueless here :p I'm just throwing stuff at the wall and seeing what works
Ok scratch all of that, I found the error.
Hey @dzikoysk I fixed the issues, now I just need to move it into the plugin. How do I do this? I just copy and pasted the directory and references, so I don't actually know how to make a plugin. Is there some documentation I am missing?
Also the error was just a content security policy thing. :p
Also for some reason, there are a bunch of "changes" that I had nothing to do with - I think VS Code is just fricking around with line endings.
Also it still doesn't work outside of the Raw docs
option.
Edit: Nevermind, it totally does! 🎉 Edit 2: Also confirmed that Javadocs still work.
Also it still doesn't work outside of the
Raw docs
option.Edit: Nevermind, it totally does! 🎉 Edit 2: Also confirmed that Javadocs still work.
This is amazing, thank you so much! 🎉 I wonder if security is still a concern... I'm not sure how sanitization would even work here though. Maybe since its a plugin, sanitization wouldn't matter, since it's opt-in, which means users are accepting the risk of a bad actor uploading a dokka jar with unsafe javascript?
Hey @dzikoysk I fixed the issues, now I just need to move it into the plugin. How do I do this? I just copy and pasted the directory and references, so I don't actually know how to make a plugin. Is there some documentation I am missing?
The majority of your code uses the standard plugin API as far as I know. You can look at something like swagger-plugin and just create a new entry for ./reposilite-plugins/dokka-plugin
with a similar build.gradle.kts
, and then try to copy the existing code in the plugin facade structure.
I'm not sure how frontend plugins work though...
Hey @dzikoysk I fixed the issues, now I just need to move it into the plugin. How do I do this? I just copy and pasted the directory and references, so I don't actually know how to make a plugin. Is there some documentation I am missing?
The majority of your code uses the standard plugin API as far as I know. You can look at something like swagger-plugin and just create a new entry for
./reposilite-plugins/dokka-plugin
with a similarbuild.gradle.kts
, and then try to copy the existing code in the plugin facade structure.I'm not sure how frontend plugins work though...
Ok. I got rid of the frontend too, so it shouldn't matter there.
Hi sorry I've been silent on this for a while, I've been doing other stuff and... finals. Hopefully I'll have this done within the next week or so.
No rush, take your time :)
I'm gonna be honest, I use dokka a decent amount and I have basically never seen an *-dokka.jar
archive..?
Are those files actually used in practice? Because afaik, you'll generally publish dokka documentation in a *-javadoc.jar
archive.
Also, since all the code for the dokka shit seems to be literally just identical to the javadoc preview code, imo it should just use the same class.
As for the dom exceptions, I've figured out that you can remove the sandbox
attribute and instead use the new credentialless
attribute for the iframe. However, do note that this is currently not supported in the latest version of firefox.
Until it is supported, from what I can tell there is no safe way to allow local storage to be used.
However, one thing that perhaps can be done is to inject some js into the iframe (possibly: inject it directly into the html file?) that mocks the local storage, like this library here: https://github.com/mattiaocchiuto/iframe-localstorage, creating an ephemeral local storage that doesn't actually save anything.
This adds support for Dokka like Javadoc!
Closes:
2117
Improvements:
A few things, though:
fetch
and that doesn't work with the current access control system. Please help!