KSP-SpaceDock / SpaceDock

Current Codebase (Python /Flask)
https://spacedock.info
Other
73 stars 33 forks source link

There is a whole bunch of compiled js in layout.html #292

Open HebaruSan opened 4 years ago

HebaruSan commented 4 years ago

What the fluff?

https://github.com/KSP-SpaceDock/SpaceDock/blob/f2ee58bad7b18223df8d54c2b5dd91f02b4a25be/templates/layout.html#L297-L300

It doesn't look like much here because there are almost no line breaks, but it's several screens full in an editor. Compiled js should be generated on the fly by build/deployment tools, not pasted into source controlled files and committed. Whatever this does, it's effectively undocumented and unmaintainable.

DasSkelett commented 4 years ago

Found that too. Thought this would have something to do with the Piwik, because tracking stuff likes to be unreadable and to hide what it actually does. But I have no idea.

HebaruSan commented 4 years ago

git blame took me here:

https://github.com/KSP-SpaceDock/SpaceDock/commit/0ed61998fc62120a4e2ead68cc762874b3573068

tracking stuff likes to be unreadable and to hide what it actually does

Wouldn't this still belong in a separate .js file?

DasSkelett commented 4 years ago

Wouldn't this still belong in a separate .js file?

Yes, of course. Just wanted to share my line of thoughts how I got the idea that this could be Piwik related code ^^

HebaruSan commented 4 years ago

Yes, you're definitely right about that. :+1:

Xinayder commented 4 years ago

I think we can ask @V1TA5 to provide the actual js file from Matomo (former Piwik) and we should include it properly instead of doing what it's doing right now :P