-
Notifications
You must be signed in to change notification settings - Fork 250
Hide command input field better #777
Hide command input field better #777
Conversation
Tested to work with |
Looks great, but I kinda miss the blue outline telling me it's waiting for a key. :) First merge this, then maybe someone can think of an unobtrusive way of making the modes more visible...? |
I'm thinking about that. Plus, I use a whole different set of cursors, with an empty rectangle cursor for inactive (which is triggered on
|
I see you use a light colorscheme! I really like the rectangle operator-pending cursor. Seems like it merits its own PR. I couldn't manage to get it working with my dark colorscheme though, the cursor just disappears when going operator pending. Gotta fiddle with it later. |
Just opened a speculative operator-pending PR in #779. |
I'd like to just not add the panel at all if the input is meant to be hidden. The problem is that the editor needs to be somewhere on the DOM in order to be focused. Maybe could just make it |
ec565cd
to
26ef11b
Compare
@maxbrunsfeld this new and updated version does that - for a hidden input, the editor is invisible, added to the main text editor's parent element. Do you like this better? |
26ef11b
to
381e56a
Compare
Also removed the seemingly unnecessary editorContainer, which may affect people’s personal styles if anybody has applied styles to that container element. The change in spec-helper makes sure that the new code’s expectations are met when testing.
381e56a
to
1a064a0
Compare
if @panel? | ||
@panel.destroy() | ||
else | ||
this.parentNode.removeChild(this) if this.parentNode? |
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.
I think you can avoid a conditional by using this.remove()
.
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.
I keep forgetting about that one...
Really glad to see this fixed. I left some very minor feedback. |
All done, thank you. |
👌 Great! |
Hide command input field better
Also removed the seemingly unnecessary editorContainer; this may
affect people’s personal styles if anybody has applied styles to that
container element.
The change in spec-helper makes sure that the new code’s expectations
are met when testing.
This is an alternative solution to PR #776.