Commit Graph

520 Commits

Author SHA1 Message Date
eight
37e1f43f75 Fix: minor 2018-10-10 15:04:03 +08:00
eight
d26ce3238e Add: codemirror-factory 2018-10-10 14:49:37 +08:00
eight
15a1f552f6 WIP: kill getSection 2018-10-10 12:08:35 +08:00
eight
ba6159e067 WIP: edit page 2018-10-10 02:43:09 +08:00
eight
fd9ab5d6e5 Fix: switch to editor 2018-10-10 00:41:07 +08:00
eight
06e22d0d18 Change: add sections-editor 2018-10-09 23:38:29 +08:00
eight
30e8662946 Add: preview error 2018-10-08 20:12:39 +08:00
eight
47b2b4fc49 Add: livePreview.show 2018-10-08 18:38:01 +08:00
eight
7b5e7c96d5 Hook up live preview 2018-10-08 18:16:45 +08:00
eight
15efafff3c Add: live preview 2018-10-08 17:49:57 +08:00
eight
057111b171 Update usercss API 2018-10-07 22:59:31 +08:00
eight
095998f07c Change: switch to msg.js 2018-10-06 13:27:58 +08:00
eight
fa3127d988 Change: switch to msg.js 2018-10-06 13:02:45 +08:00
eight
34497ebe16 WIP: switch to API 2018-10-05 18:47:52 +08:00
eight
24b1eea8a4 Merge branch 'master' of https://github.com/openstyles/stylus into dev-exclusions 2018-10-03 15:00:07 +08:00
eight
5cbe8a8d78
Add: fetch style object from DB directly in the editor (#507) 2018-10-02 20:22:18 +08:00
eight
2fd531e253 Rewrite linter system (#487)
* Add: implement new linter system

* Refactor: pull out editor worker

* Switch to new linter and worker

* Enable eslint cache

* Fix: undefined error

* Windows compatibility

* Fix: refresh linter if the editor.linter changes

* Add: stylelint

* Add: getStylelintRules, getCsslintRules

* Fix: logic to get correct linter

* WIP: linter-report

* Fix: toggle hidden state

* Add: matain the order of lint report for section editor

* Add: unhook event

* Add: gotoLintIssue

* Fix: shouldn't delete rule.init

* Add: linter-help-dialog

* Drop linterConfig

* Add: linter-config-dialog, cacheFn

* Add: use cacheFn

* Drop lint.js

* Add: refresh. Fix report order

* Fix: hide empty table

* Add: updateCount. Fix table caption

* Switch to new linter/worker

* Fix: remove unneeded comment

* Fix: cacheFn -> cacheFirstCall

* Fix: use cacheFirstCall

* Fix: cache metaIndex

* Fix: i < trs.length

* Fix: drop isEmpty

* Fix: expose some simple states to global

* Fix: return object code style

* Fix: use proxy to reflect API

* Fix: eslint-disable-line -> eslint-disable-next-line

* Fix: requestId -> id

* Fix: one-liner

* Fix: one-liner

* Fix: move dom event block to top

* Fix: pending -> pendingResponse

* Fix: onSuccess -> onUpdated

* Fix: optimize row removing when i === 0

* Fix: hook/unhook -> enableForEditor/disableForEditor

* Fix: linter.refresh -> linter.run

* Fix: some shadowing

* Fix: simplify getAnnotations

* Fix: cacheFirstCall -> memoize

* Fix: table.update -> table.updateCaption

* Fix: unneeded reassign

* Fix: callbacks -> listeners

* Fix: don't compose but extend

* Refactor: replace linter modules with linter-defaults and linter-engines

* Fix: implement linter fallbacks

* Fix: linter.onChange -> linter.onLintingUpdated

* Fix: cms -> tables

* Fix: parseMozFormat is not called correctly

* Move csslint-loader to background

* Fix: watch config changes

* Fix: switch to LINTER_DEFAULTS

* Fix: csslint-loader -> parserlib-loader
2018-10-01 09:03:17 -05:00
tophf
c49f4dd11e don't hook auxiliary CMs
fixes #491
2018-09-03 20:54:25 +03:00
tophf
681176ce31 use showHelp.close when it's defined
fixes #485
2018-08-29 15:39:18 +03:00
tophf
2ac9a9db29 fix headerOnScroll 2018-08-24 14:31:29 +03:00
tophf
c0c5f1dbcc avoid overwriting existing usercss on saving a new one 2018-08-18 23:17:20 +03:00
tophf
adc165723c actually run restoreWindowScrollPos in a microtask 2018-08-16 18:09:50 +03:00
tophf
92d6530c8f simplify listener registration
since the function reference is constant, only one listener will be registered
2018-08-07 20:11:11 +03:00
tophf
eff0a7030c display only style name in the editor tab title
"Edit Style" was redundant and made the title unreadable when many tabs were opened.
"Add Style" is still displayed for the new styles.
2018-08-07 19:59:16 +03:00
tophf
bfb35e77b8 strip more trailing spaces in a custom usercss template 2018-08-06 20:56:33 +03:00
tophf
2db52c9e2d code cosmetics 2018-08-06 15:11:27 +03:00
tophf
f6a90ad166 suppress stylelint warning for stylus-lang's @css block
fixes #459
2018-08-06 15:10:42 +03:00
tophf
5f623f2f0e fill an empty @name with the default placeholder
fixes #462
2018-08-06 13:35:33 +03:00
tophf
e27636b93d preserve linebreaks in live-preview error text
fixes #460
2018-08-06 13:13:15 +03:00
tophf
5da1e0fb9b set onbeforeunload only when dirty
https://developers.google.com/web/updates/2018/07/page-lifecycle-api#legacy-lifecycle-apis-to-avoid
2018-08-02 20:54:40 +03:00
tophf
d3c8812e51 listen on newly added section's CodeMirror too 2018-08-02 01:44:10 +03:00
tophf
9cebf91e28 don't call updatePreview twice for the same input event 2018-08-02 00:46:14 +03:00
tophf
68cc033942 trigger live preview also for changes in applies-to 2018-08-01 23:29:21 +03:00
tophf
0c58783a6c add buttons to restore, clone, move a section 2018-07-23 21:24:35 +03:00
tophf
0a3ffb0bc8 show an empty applies-to URL-prefix in manually added sections
because global sections are less frequently used.
2018-07-23 21:24:35 +03:00
tophf
47c4b8157a expose 'preserve_newlines' in beautifier; dehtmlize
fixes #435
2018-07-23 00:28:11 +03:00
tophf
7d1bf4119a show "close" button in beautifier dialog
fixes #436
2018-07-22 20:12:42 +03:00
tophf
4283cc53a7 use the global line wrapping option in moz-export popup 2018-07-22 20:08:13 +03:00
tophf
662b4f8e49 don't show "saved" note in linter config
* because we don't show it anywhere else
* disabling the save button is a sufficient indicator used by lots of apps
2018-07-22 19:58:40 +03:00
tophf
126d909ca7 use a typical OS order for #help-popup buttons
* horizontally centered in Windows
* right-aligned otherwise
2018-07-22 19:55:27 +03:00
tophf
87da06037f make showCodeMirrorPopup modal
closes #437
2018-07-22 19:37:49 +03:00
Rob Garrison
bfe54ab4c4 Add tab communication 2018-07-22 11:21:45 -05:00
Rob Garrison
2b4a1a5635 Modify input method 2018-07-22 11:21:44 -05:00
Rob Garrison
68dfa0153c Add style exclusions. Closes #113 2018-07-22 11:21:43 -05:00
tophf
67f48d5e60 make a copy of the applies-to template
fixes #442
2018-07-22 16:36:50 +03:00
Rob Garrison
c61d34d053 Update libraries (#440) 2018-07-21 20:58:54 +03:00
tophf
6f64bd840c code cosmetics: strip trailing spaces 2018-07-17 11:24:13 +03:00
narcolepticinsomniac
70b8a1172f Responsive layout (#410) 2018-07-16 19:37:01 +03:00
tophf
e51c632db6 fixup 74ef2f6f: 'editors' is a const 2018-07-10 11:45:52 +03:00
tophf
26f673f30d move linter worker loaders to edit/ 2018-07-10 11:35:19 +03:00