stylus/edit
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
..
applies-to-line-widget.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
beautify.js Make beautify options persistent. Fixes #630 2018-12-27 07:53:37 -06:00
codemirror-default.css Fix search highlight conflict (#587) 2018-11-27 22:48:45 -06:00
codemirror-default.js CSSLint and parserlib (#646) 2019-03-03 16:55:15 -06:00
codemirror-factory.js Change: modify match-highlighter plugin (#578) 2018-11-25 07:28:37 -06:00
codemirror-themes.js Update vendor libraries 2019-07-08 04:59:28 -05:00
colorpicker-helper.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
edit.css linter and compact layout improvements (#749) 2019-08-04 13:09:50 -04:00
edit.js linter and compact layout improvements (#749) 2019-08-04 13:09:50 -04:00
editor-worker.js Support Chrome 49 (#561) 2018-11-29 19:35:21 -06:00
global-search.css Fix search highlight conflict (#587) 2018-11-27 22:48:45 -06:00
global-search.js Fix search highlight conflict (#587) 2018-11-27 22:48:45 -06:00
linter-config-dialog.js Fix linter config issues. Closes #689 2019-04-05 07:42:37 -05:00
linter-defaults.js Update Stylelint defaults for Stylus-lang at-rules (#695) 2019-04-14 08:39:22 -05:00
linter-engines.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
linter-help-dialog.js Remove duplicate rules in issue modal 2018-11-20 18:57:25 -06:00
linter-meta.js Fix linting issues 2018-12-11 07:28:30 -06:00
linter-report.js linter and compact layout improvements (#749) 2019-08-04 13:09:50 -04:00
linter.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
live-preview.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
refresh-on-view.js Add: auto resize editors on init in section editor (#729) 2019-06-20 15:36:27 -04:00
regexp-tester.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
reroute-hotkeys.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
sections-editor-section.js Add: auto resize editors on init in section editor (#729) 2019-06-20 15:36:27 -04:00
sections-editor.js Add: auto resize editors on init in section editor (#729) 2019-06-20 15:36:27 -04:00
show-keymap-help.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00
source-editor.js Fix linting issues 2018-12-11 07:28:30 -06:00
util.js Refactor the entire storage system and the section editor (#518) 2018-11-07 14:09:29 +08:00