oskari-frontend
oskari-frontend copied to clipboard
Styling changes for making UI-layout more manageable
The purpose is making upcoming layout changes easier and clean up some of the dead CSS/code regarding sizing/layout.
Goals:
- Use one root element for app that is assigned at startup (or currently tries to find an element with id
oskarias root) - If there is no root element, assign required style changes to body-tag assuming fullscreen app.
- Remove most of DOM-structure and CSS from JSP/base HTML at server and move them to client side code.
- Try keeping required changes to minimum/mostly functional as is
- Remove usage of hardcoded ids for assumed elements from code (
#mapdiv,#contentMap,#maptoolsetc). Use getters from code to get references to elements. - Remove dead code that was used for removed functionalities to calculate sizes of elements etc.
TODO/broken things:
- Mapmodule mobile <> desktop mode change is broken (starting on either mode works, changing from mode to another doesn't)
- Exiting publisher after previewing map on non-default size doesn't reset the map size to full size
- UI during initial loading/app startup looks broken -> Maybe show a spinner instead of an empty navigation bar while starting up
Note: Current JSP/HTML changes: https://github.com/oskariorg/sample-server-extension/compare/develop...ZakarFin:styling?expand=1
Tthe geoportal_white.jsp can be used to see what the geoportal looks like without touching the HTML. It's mostly working like before. Differences are:
- size of the navigation bar is actually the one set on the HTML-style (153px instead of 170px that was enforced by frontend code without these changes).
- Scrollbar shows for the whole page instead of the navigation bar if the window is too small to show the whole nav bar.