stylus/js
narcolepticinsomniac 793dc20722
linter and compact layout improvements (#749)
* linter and compact layout improvements

Closes #748

While investigating the best way to fix linter scrolling, when I double-checked the compact layout, an old bug I meant to fix a long time ago was immediately apparent. Basically, the linter adds/removes errors as you type, causing the editor to bounce up and down, making it practically unusable. 

This PR fixes scrolling, and also collapses options and the linter in the compact layout, but always shows the collapsed linter so you're aware of the error count without the content jumping. It also collapses options in the non-compact layout if the viewport is too short to accommodate them, factoring in the min-height of the linter. All automatic collapsing factors in whether a linter is active so they can adjust accordingly, and disables the setting of collapsed state prefs, since we're deciding the pref anyway, and this allows for re-expanding on resize based on the previous pref.

It's quite possible I failed to account for certain scenarios, so try to break it. Also think it's problematic for the linter to not always be visible if enabled, so I hooked up a 40px fixed header on scroll with just the linter in it for the compact layout.

A few other little details are included. I removed redundant line and column numbers spelled out at the end of lint messages to prevent horizontal overflow. I noticed that the expand/collapse prefs do not toggle correctly when clicking directly on the details-marker arrow. Simplest solution was covering them with the `h2` (we may wanna hook up the manager as well). Also, unrelated, but I switched to opacity to hide resizing sectioned editors, because `visibility: hidden;` breaks editor auto-focus.

If either of you guys wanna fix any bugs, or improve any code, feel free to just commit to this PR directly.

* linter and compact layout improvements

* linter and compact layout improvements

* No usercss scroll listener and delay header check

* Some code tweaks
2019-08-04 13:09:50 -04:00
..
cache.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
dom.js linter and compact layout improvements (#749) 2019-08-04 13:09:50 -04:00
localization.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
messaging.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
meta-parser.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
moz-parser.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
msg.js Prevent JS error in messages 2019-01-27 18:37:12 -06:00
polyfill.js Fix: db initializing error, polyfill localStorage/sessionStorage (#616) 2019-06-20 15:35:41 -04:00
prefs.js Revert expose iframes by default 2019-01-09 23:43:28 -05:00
promisify.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
script-loader.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
sections-util.js Prevent importing styles with no section. Fixes #687 (#697) 2019-04-16 07:32:06 -05:00
storage-util.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
usercss.js Add: enable usercss updateURL (#661) 2019-02-13 19:09:18 -06:00
worker-util.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00