Closed emcniece closed 8 years ago
@kh90909 test, suggest and merge at will!
I ran into a few issues with this...
particle subscribe mine
). Does JS support interpretation of escape sequences like these in strings, or do we need to manually replace with 0x0d / 0x0a?Can we remove the horizontal scroll bar? The spec says everything in the terminal should wrap, so I don't think it's necessary. Also, I think the scroll bar on the sidebar should show only if the content doesn't fit on the screen. Is it possible to change the scroll bar colors or is it system controlled? The light grey bar messes with the dark color scheme!
Also, maybe it would be better to move the 'Visible Scroll Bars' row in the modal up above the Show/Hide section. Since the toggle is the same size as the one for "Submit on Enter", I think it will fit in better there.
Did some research.
_.extend()
is creating a duplicate setting during get_settings()
, which is then double-processed when the button toggle labels are updated during restore_settings()
. This behavior is due to the settings being an array instead of an object, so save_settings()
will need to serializeArray into an object (easy transform). The surrounding settings handlers will need to be updated to work with an object as well.terminal_print()
by comparing window height, scroll position, and document height. The jitter problem happens when the user tries to scroll while the jQuery scrollTop
animation is still executing, and the current scroll "greed" is set to 50px which seems to not be enough to use a single scrollbar click to escape. The jitter fix is to reduce the animation time (from 1000ms to 250ms), and the greed can be reduced safely to 30px.Other issues:
overflow
to overflow-y
.Ready for demo: https://rawgit.com/emcniece/OakTerm/feat/i23-user-settings/index.html
Be sure to clear localStorage before testing!
Hope you don't mind. I was working through the error handling and came across the line end escaping code and fixed it. I haven't had a chance to test the other updates yet. Once I do I'll merge it along with the escaping fix. Hopefully tomorrow.
This commit adds the final user settings functions: Autoscroll, Line endings, Submit-on-enter, and visible scroll bars.
Other major changes:
terminal_print()
for simplicityconsole.log
statements to move away from debug clutter as we approach MVP