phntxx/dashboard

Remove external dependancies

jtagcat opened this issue · 5 comments

Why do you need 20 cookies set to google.com, and apis.google.com script?

You need to enable JavaScript to run this app.

It's a god-damn static website, it shouldn't be usable without js‽

Unfortunately this site is not really static, although it looks like it. It dynamically reads the content of JSON files. I'd also love it to be 100% static, but that would require server-side rendering, a technology that wasn't chosen here: the rendering is done browser-side

You can do small client-side JS, but that doesn't mean you should be using several external dependencies.

small client-side JS

I'm not a JavaScript developer. Can you explain me what do you mean with "small client-side JS" please ?

Hi!

While I do understand the argument for removing external dependencies, the ones that are present now are about as minimal as they're going to get. This project is written in TypeScript using React and it uses styled-components for CSS, so removing them is not an option. The other dependencies (for production) are mainly just type declarations, and removing them is a non-option either.

I also went ahead and double-checked the amount of cookies set by this dashboard. I found 0 cookies, only 1 LocalStorage Item for theming. Searching for "Google" or "gstatic" in the entire codebase also didn't reveal any abnormalities, so I'd appreciate it if you could elaborate there.

I do agree that this project could theoretically be done in one neat pile of JavaScript, but doing so would require the entire project architecture to essentially be overthrown in my opinion.

Kind regards

It seems that the mentioned Google/gstatic don't appear there any more, it's been a few months, something might've changed by then.