IITC-CE / ingress-intel-total-conversion

intel.ingress.com total conversion user script with some new features. Should allow easier extension of the intel map.
https://iitc.app
ISC License
290 stars 109 forks source link

Dialogs code is a mess #224

Open johnd0e opened 5 years ago

johnd0e commented 5 years ago

There are dialogs that do not fit.

Edit: some issues already fixed in #330

johnd0e commented 5 years ago

So I'd expect it to behave in this way:

All that seems obvious, but still not working out of the box. And it's not enough to just set (max-)height/width for .ui-dialog.

Our dialogs are based on jQueryUI dialog widget, which support theming with jQuery UI CSS framework, using classes option. Additionally we have own wrapper dialog-function: https://github.com/IITC-CE/ingress-intel-total-conversion/blob/master/code/dialog.js Some styling attributes come from defaults, some overridden by our dialog wrapper, some come from function arguments, some are hardcoded in html, some are defined/customized by CSS. As for CSS: we have style.css, smartphone.css, and some styles appended/overridden in runtime.

Perhaps long time ago there was someone who understand how all is working. But today it all appears to me as extreme chaos, so in long term we should rewrite that from scratch.

But in short term it would be enough just to fix some dialogs to fit mobile screens.

johnd0e commented 5 years ago

One more thing: instead of including stock https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css, currently we use our custom css.

It makes things even more complicated..

My guess: initial intention was to pick only necessary styles, and override them to comply with our main theme.

We have to revise that custom css and decide how to solve this best. Maybe better use https://jqueryui.com/themeroller/ for customizing.

BTW, I would like to use https://jqueryui.com/menu/. And I cannot just add jquery-ui.css, 'cause it brakes our dialogs..