niryariv / opentaba-client

BSD 3-Clause "New" or "Revised" License
8 stars 15 forks source link

Plan status tooltip #96

Closed florpor closed 9 years ago

florpor commented 9 years ago

well, i can go for a dictionary. but i think a seperate file is too much, this function is not big and i feel seperating this will be more confusing than helpful..

niryariv commented 9 years ago

the reason for separating is that this is really data or config (kind of like munis.js) rather than core code - ie, I expect to edit this now and then to change/fix/translate the texts - so it should be in a different place than our actual core code

florpor commented 9 years ago

so how bout i put it at top of the file out of the function? another file = another http request every time someone loads the site, which all go through our poor proxy.

niryariv commented 9 years ago

how many requests go through the proxy now in a typical page? perhaps we should explicitly use the github.io domain when all the non-index.html files

florpor commented 9 years ago

right now we have (if i counted right) 26 http requests through our proxy per page load. after the first load (per municipality) many of them are 304 unchanged which doesn't strain us so much. we can use full github.io urls for scripts and such, but that will make some cors problems and would make the code much harder to debug (we had this with the spa idea if i remember right). thing is - javascript resources that have different dev and production environments can afford to be super seperated and structured, such as jquery, which in development has tens of js files, but when is made for production is all crammed into one. we don't seperate our dev and prod, and so i think this is just an overkill and unnecessary. it takes 2 minutes to find where this is in our code if you know our basic structure with handlebars, and (for now) this is just one dictionary which is coupled with one function.

niryariv commented 9 years ago

ok, please create a PR with the dictionary and we'll merge

florpor commented 9 years ago

done