-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline result overhaul #127
Conversation
please, please yes!!! |
keymaps/ink.cson
Outdated
'atom-text-editor:not([mini])': | ||
'escape': 'inline:clear-current' | ||
|
||
'.platform-darwin atom-text-editor:not([mini])': | ||
'cmd-i cmd-c': 'inline-results:clear-all' | ||
'cmd-t': 'inline-results:toggle' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This opens the file switcher on mac. alt-t is actually not taken (aside from inserting a special character) so that may actually be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, okay. Mac keybindings are always so confusing to me... :D
Good stuff, will have to play around with this branch. Code looks good, my main immediate worry is – where are we listening for resizes? We should be very careful about anything that might impact editor performance. |
I dunno if someone has tried this yet, but what I was thinking about is changing the unfolding behaviour to expanding trees in results by default and focus the result. The latter might enable us to support a completly keyboard based result workflow, if we get keybindings in place for navigating trees etc. |
and copyable TODO: make this work for block results
Some notes from using this:
Not sure I understand your suggestion. Do you mean to have all trees expanded by default once you open the first? |
What I meant by my (somewhat poorly worded) suggestion is that expanding a result will always automatically expand the topmost tree (kinda like what happens now if you click on the tree instead of next to it) and focus the result, so you can't continue typing in the editor etc. Then we could enable Tab navigation through the result. Apart from that the performance impact is pretty big... I've been trying to work around that for the last couple of hours, without too much success. The basic problem here is layout thrashing, i.e. having interleaved reads and writes to the DOM that'll force webkit to update the layout. And since atom core is updating the layout when the editor is resized and we're doing the same afterwards, performance is going down the drain :( |
not really though -.-
(keep tooltip properly positioned no matter what)
This reverts commit 0a12263.
(not sure how well that heuristic works though)
Amazing 🎆 Your reward will be with your comrades in Valhalla, or maybe in the Gitter room, whichever comes first. |
This should make inline results much nicer to work with:
Old behaviour was to limit a result's width to 400px.
Alt-T
-- not sure what a good Mac shortcut would be) will expand it to the full editor width (most uesful for results on/after a long line):Ctrl-C
(orCmd-C
):Context menu copy still has the old behaviour.
All in all this should minimize scrolling and make results a bit more predictable. Let me know what you think! :)
On a related note:
result.coffee
needs an overhaul, which I might get to soonish. That's orthogonal to these improvements though.TODO:
MarkerLayer
for inline results