Skip to content
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

Bug: Typing in a file to open file in Preview in full Editor feature is a little off #27

Closed
bronius opened this issue Aug 13, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@bronius
Copy link

bronius commented Aug 13, 2019

When I am previewing a file and click in to type, this should (and does) convert file Preview to open the full Editor mode on the file. However, it seems that as soon as the Preview closes and Editor opens, focus on the editing file is lost, and I am back on Projects pane. The user experience then is:

  1. Preview a file (by click into a filename in Projects or cursoring and down)
  2. Click into the Preview tab where you'd like to start making edits.
  3. Type first letter of your edit: Preview becomes Editor, and focus is back on the file in Project again.
  4. Next thing you type becomes either a Search in Project or, if you happened to hit Delete (which is really a backspace, but that's not anyone's concern.. mac always has a way of doing things differently), thinking you were undoing your typed letter, PhpStorm prompts with a confirmation to delete the now-focused file (!)

The impact from the above is a bit more compounded when (like I first tried it) you double-click a work to select it to start typing: First the word disappears and is replaced by the first one or two letters (depending how quickly you type), then your focus is left on the Project files pane.

I am really enjoying Quick File Preview: It's working so well, it's in fact dropped out of my consciousness-- sign of a great feature!

@SeeSharpSoft
Copy link
Owner

@bronius Thanks for reporting - I didn't notice this kind of behavior yet, but I assume that you most likely noticed it in PhpStorm with .php files? Does the focus switch back to the editor (e.g. if you just type one character) or does it stay in Project View?

I know that editors of some file-types opening slower than others (e.g. the .svg editor), which leads to similar behavior when typing fast, but the newly opened editor gets the focus eventually. I'll investigate how the experience can be improved. However, it is quite hard debugging into PhpStorm as the php related extensions are not open source...

@SeeSharpSoft SeeSharpSoft added the bug Something isn't working label Aug 14, 2019
@bronius
Copy link
Author

bronius commented Aug 14, 2019

No, the focus never switches back to the editor. Note: I have just confirmed that I have neither Autoscroll to nor Autoscroll from Source checked. Actually, PhpStorm focusing into the Projects pane has always been irksome to me since I do rely so much on only things happening that I expect to happen in an editor :D

It doesn't seem to matter what the file type is: it also happens in yml (small text files).

I've got a quick screen recording showing first highlighting and hitting DEL on the keyboard. Then I undo, close the preview-turned-editor tab, click the file for preview again, and then starting typing quickly: Notice the Project pane files jumps from chosen to s3fs based on whatever I typed and it matched.

Here's a lores copy of the screencast: https://imgur.com/a/67YoElH

@SeeSharpSoft
Copy link
Owner

Thanks for sharing your insights. Also with respect to #25, I am currently evaluating a different approach for handling the preview tab which basically keeps the editor intact when switching between preview and editing. That will need some time though as I am also quite occupied the next few days...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants