Write synced settings to localstorage.
move settings and webpush init to init.js
stub for server sending clientsettings
get very basic setting sync working
Also update client.config.clientSettings on settings:set
Full setting sync with mandatory and excluded sync options
Actually check client preferences.
Further settings restructuring.
Refactor options.js make storage act in a sane manner.
Add new parameter to applySetting
Do not sync if the setting is stored as a result of syncing
General clean up, commenting and restructing.
sync from server on checking "sync"
offer initial sync
Better deal with DOM being ready and instances of inital sync showing
Don't try to disable autocompletion when not enabled.
Restructure option.js to seperate functions from settings.
More consistency in naming options vs settings
Switch processSetting and applySetting names reflecting their functionality better.
move options init back to configuration.
simplify how settings are synced around.
move options init after template building.
Remove unneeded hasOwnProperty
Use global for #theme and only apply theme in applySetting
Return when no server side clientsettings excist.
Autocompletion options to options.settings
Make nocss param in url work again.
Actually filter out empty highlight values.
Clarify alwaysSync comment.
Remove manual step for initial sync
change attr to prop in options.js
replace unbind with off in autocompletion.js
Do not sync settings when the lounge is set to public.
fix eslint error
Fix merge error
Do not show sync warning after page refresh when sync is enabled
Move setting sync label in actual label.
Improve server setting sync handling performance and failure potential.
Don't give impression that the desktop notificiation is off when the browser permission is denied.
Refine showing and hiding of notification warnings.
rename all setting socket events to singular setting.
add experimental note and icon to settingsync.
fix css linting error
Despite being a bit gross to look at, this brings a few advantages:
- Tests are now closer to what actually runs, so more likely to find broken stuff.
- We can start using things that were so far Webpack-only or browser-only, like ES6 imports, loading Handlebars templates, etc.
- We open ourselves to browser testing (there is some work to do, but that would be a necessary step).
- We improve the client/server separation, by making it possible to run them independently
I do some extra steps around coverage: now we have 2 reports (client + server), so I have an extra step to combine them (the `nyc report` part). This is strictly to keep feature parity (the coverage report of this code is effectively the same as before), but in the near future, we might want to keep both reports separate, for example to continue separating client/server. Another reason would be to use something like Codecov, which I believe has the ability to have multiple reports. This is down the road though, our coverage is not good enough to make hosting them somewhere be useful (I think).
A few extras with this commit:
- Coverage summary is displayed when tests are run (this is not slowing down tests)
- Tests check for leaks (see https://mochajs.org/#--check-leaks)
- Tests now output with the `dot` reporter. This is nice as `npm test` runs in parallel, the whole output holds in a few lines instead of spanning over multiple screens.
This is a Node v6+ only fix.
`irc-framework` upper-cases the first argument, and we were sending everything as a string in first argument. This correctly splits.