« get me outta code hell

tui-lib - Pure Node.js library for making visual command-line programs (ala vim, ncdu)
about summary refs log tree commit diff
path: root/ui/Root.js
AgeCommit message (Collapse)Author
2019-09-15(!!) Only render when draw-dependency props changeFlorrie
This is a very large change and probably breaks most applications not built to work with it. (Obviously, I'm not really being that responsible with this sort of thing.) I've tested with mtui and it works fine, but some elements may need tweaks before being 100% adjusted to the new scheduled-render system we're using with this commit. Also, any elements which have custom draw behavior will likely need updating so that they appropriately schedule renders.
2019-07-18Mouse drag support; pass detailed data to handlersFlorrie
...for mouse events. Contains cursor position, modifier keys pressed, etc.
2018-12-08Mouse supportFlorrie
Not exactly the most elegant implementation, but it definitely works and isn't really difficult to code around!
2018-11-23Fix (un)select calls re: consecutive root.select()Florrie
See code comments for explanation.
2018-09-15Fix keyPressed call orderFlorrie
Before: <top>, <bottom>, <second to bottom>, <third to bottom>... Now: <top>, <second to top>, <third to top>, <fourth to top>...
2018-09-12(breaking, very) Fix how text inputs bubble eventsFlorrie
This is extremely super duper very breaking in that it reverses the order that keyboard events are bubbled. This fixes an issue in the following situation: You have a focus element which captures keyboard input. When the X key is pressed, a text input, which is a child (directly or indirectly) of it, is selected and has its value emptied. As the user types into that text input, if they press the X key, the handler on the focus element will detect this, and clear and select the text input - interrupting the user's typing. The situation is fixed in this commit by making the text input avoid bubbling events when text is entered. I'm not sure this is 100% complete, because arrow key events and the like are still bubbled, but those aren't difficult to change later. The breaking fundamental change here is that keyboard events are now bubbled from the top element down. Before, a parent element could deny child elements from responding to the event; now the child can deny the parent.
2018-07-04An assortment of changes to how selected/unselected worksFlorrie
2018-06-29Remove unused iac dependencyFlorrie
Also removed yarn.lock since I don't use yarn for this anymore.
2018-05-31Let-const nitpicksFlorrie
2018-01-19Pass false to firstInput to not select the form if it wasn't already selectedFlorrie
2017-07-03Fix the Act of Evil related to real-cursor visibilityliam4
2017-07-03Improve cursor displayliam4
- Whether the cursor is displayed or not is now based on the cursorVisible property rather than whether cursorX and cursorY are set or not. - The actual shell cursor is now invisible... this is objectively an act of Evil, though! This doesn't look like too hard to fix, thankfully. - A new cleanCursor function has been added to ansi.js.
2017-07-03A long-due cleanup + examples + thingsliam4
..Obviously this breaks old things (particularly, see changes in FocusElement).
2017-01-07Initial commitLiam