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

[CLOSED] Open Recent Files #10347

Open
core-ai-bot opened this issue Aug 30, 2021 · 30 comments
Open

[CLOSED] Open Recent Files #10347

core-ai-bot opened this issue Aug 30, 2021 · 30 comments

Comments

@core-ai-bot
Copy link
Member

Issue by swmitra
Thursday Dec 17, 2015 at 11:45 GMT
Originally opened as adobe/brackets#12012


This PR is aimed to provide the missing 'Open Recent Files' feature in brackets.
This feature is necessary when a user enables No Distractions mode. The MROF(Most recently opened files) list can be accessed and navigated in multiple ways ( using mouse only , using keyboard only and a mix of both).

Using mouse only

  • Select File->Open Recent to launch the MROF list ( refer to the screen shot below )
    filemenu
    and select(Click) on the file you want to open(refer to the list screen shot ).
    mroflist
  • The list can be closed using the 'X' button located at the top-right corner.
  • The list can be cleared using the 'Clear All' button located at the bottom-right corner.
  • The footer area shows the full path of the file selected/highlighted.

Mouse + Keyboard

  • press Alt+O to launch the MROF list.
  • Select the files using mouse left click or navigate using left/right arrow keys.

Keyboard only

  • Press Alt+Shift+N to navigate next in the file list.
  • Press Alt+Shift+P to navigate previous in the file list.
  • In this mode the MROF list pop over has auto dismissal after 1.5 secs when no navigation is performed.
  • Navigate to the file you want to open ( visual confirmation via MROF list highlight ) and the feature takes care of opening the editor and put the cursor in the last know position.
  • In this mode as the MROF list is for visual confirmation only , close and clear button is hidden in this mode ( refer to the screen shot below).
    mroflist k

NOTE
The file icons appearing in the screen shots is not part of brackets core. If any extension is installed which provides custom styling and icons to WorkingSetView as providers , MROF list borrows the same from WorkingSetView. (refer to the screen shot without icons below )
mroflist_base


swmitra included the following code: https://github.com/adobe/brackets/pull/12012/commits

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Thursday Dec 17, 2015 at 11:46 GMT


Tagging@sprintr@petetnt@zaggino@abose@nethip@ficristo for feedback.

@core-ai-bot
Copy link
Member Author

Comment by petetnt
Thursday Dec 17, 2015 at 12:04 GMT


Great stuff@swmitra, I've been missing for such a feature for a long time!

Things right off the top:

  • Highlights on long filenames don't show correctly
    image
  • When you select an item and click elsewhere on the dialog, the extension loses the highlight color but the filename doesn't (see the above screenshot)
  • Should this be an modal window (with a darkened backdrop). Currently it looks a bit weird because it feels like you could drag it around, but you cannot. Other choice would be a dropdown list, similar to the the quick open bar.
    • If it will be an modal, it should look like the other modals I guess
  • There are some z-index problems with other modal windows
    image

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Thursday Dec 17, 2015 at 13:51 GMT


@petetnt Can you please check the last commit. Fixed all the UI corruption issues.

@core-ai-bot
Copy link
Member Author

Comment by petetnt
Thursday Dec 17, 2015 at 13:56 GMT


@swmitra can confirm, 713a0dd fixed all the UI corruption issues (and the CSS thing I mentioned above) 👍

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Thursday Dec 17, 2015 at 14:30 GMT


@petetnt Thanks a lot for quick confirmation 😄

@core-ai-bot
Copy link
Member Author

Comment by sprintr
Thursday Dec 17, 2015 at 15:29 GMT


👍 For this feature.

The dialog box used for this feature is different from the one used normally e.g (File -> Project Settings or View -> Themes). I believe it would be better to use a single style of dialog boxes.

The dialog boxes used for the Project Settings, Themes and extension manager are modal dialog boxes. I believe in this case we would need a modeless dialog box since it also opens the file in the background.

@core-ai-bot
Copy link
Member Author

Comment by sprintr
Thursday Dec 17, 2015 at 16:10 GMT


When a file has unsaved changes the same behavior occurs that@petetnt pointed out earlier.

2015-12-17 21_08_20- c__users_aminullah_appdata_roaming_brackets_brackets json html - brackets

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Friday Dec 18, 2015 at 05:25 GMT


@sprintr Can you please check with aa5f73e commit. Fixed the UI corruption issue and most of the comments.
@petetnt Addressed comments.

@core-ai-bot
Copy link
Member Author

Comment by petetnt
Friday Dec 18, 2015 at 10:40 GMT


Found another issue while doing further testing against aa5f73e

  • The dialog can be opened multiple times (with ALT+O or File -> Open Recent Files) on top of itself. (After opening the dialog while the dialog is already open, one cannot remove the dialog without restarting Brackets (or removing it manually from the DOM), but that will be fixed automatically after preventing the wrong behavior).

The following is not an issue, more of an question regarding split view use:

  • File has been opened so that it ends up in the MROF-list. User closes the file from the working set. Later the user opens the file again from the MROF-list and it opens to the pane it was in previously:
    • ❓ Should files that have been removed from the working set be opened in the currently active pane instead of contextData.paneId?

Great job as always@swmitra 👍

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Friday Dec 18, 2015 at 13:01 GMT


@petetnt Should be fixed now with 4653810 and 2nd point is also answered in the code. You are right, trusting the persisted pane info alone might land us in trouble.

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Friday Dec 18, 2015 at 13:09 GMT


@larz0 Need your input on the UX

@core-ai-bot
Copy link
Member Author

Comment by abose
Monday Feb 01, 2016 at 04:09 GMT


Tagging@larz0 for UI review.

@core-ai-bot
Copy link
Member Author

Comment by larz0
Monday Feb 01, 2016 at 21:43 GMT


@swmitra@abose How do I get the open recent menu item to show up on Mac?

screen shot 2016-02-01 at 1 42 57 pm

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Wednesday Feb 03, 2016 at 17:02 GMT


@larz0 Sorry for late reply. I had removed the keyboard workflow for some reason. Added it back now.
Short cut to open the panel is Alt+O. You can see a new menu item as well under File menu.

Alternatively there is a keyboard only workflow as well. Alt+N to navigate to next file in the list and Alt+P to navigate to previous file. Leaving the Alt key hides the panel in this workflow.

Requesting to please take ( pull) the code again as there are updates available ( menu item ). Also to navigate between some files to populate items in the list 😄

@core-ai-bot
Copy link
Member Author

Comment by larz0
Thursday Feb 04, 2016 at 03:28 GMT


@swmitra ahh no problem, I'm the worst offender when it comes to replying late :)

UX Feedback:

  1. Change "Most Recently Opened Files" to "Recent Files" (Since the user just came from clicking "Open Recent")
  2. Use the multiplication sign (unicode: http://www.fileformat.info/info/unicode/char/00d7/index.htm) instead of "X" for the close button. It should match our panel's Close icon, just not the color. Make sure it's centered vertically properly.
  3. Maybe we don't need that many files, the recent file list is generally not this long; 20 is more than enough. Instead of putting the second most recent on the right, just fill the first column first then the second column. This is easier to scan in order instead of making eyes zig-zag.
  4. Directory Path could use a smaller font, try 11px (the same size as find-in-files results).
  5. Our dialogs have 4px rounded corners, so we should use the same rounded corners.

Hope this helps and thanks again, this is looking great 👍

(p.s. welcome to the team :D)

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Monday Feb 08, 2016 at 05:04 GMT


Thanks a lot@larz0 👍
I will do the required changes and ping you for a quick confirmation again.

@core-ai-bot
Copy link
Member Author

Comment by nethip
Tuesday May 10, 2016 at 18:18 GMT


@swmitra Did you get a chance to address the above comments? we should target this for 1.7

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Wednesday May 11, 2016 at 05:42 GMT


@nethip I will update it today. Most of the changes suggested by@larz0 are addressed locally. I will push the changes today.

@core-ai-bot
Copy link
Member Author

Comment by nethip
Wednesday May 11, 2016 at 05:50 GMT


thanks@swmitra

@core-ai-bot
Copy link
Member Author

Comment by ingorichter
Wednesday May 11, 2016 at 16:53 GMT


It looks good so far. I think that a couple of unit tests would be good for the new code.

@core-ai-bot
Copy link
Member Author

Comment by nethip
Wednesday May 11, 2016 at 19:13 GMT


👍 for unit tests. And thanks@ingorichter for taking time in reviewing this PR.

@swmitra I have couple of comments. I will post the comments tomorrow, once I get to the office.

@core-ai-bot
Copy link
Member Author

Comment by nethip
Thursday May 12, 2016 at 05:57 GMT


@swmitra I am done reviewing the code. Here are my comments after using your extension.

  • Dismiss the window once the user has selection the file in the recent files window
  • I don't see a reason why we don't have to hook Ctrl + Tab to this workflow. We might want to externalize the logic in our core, where extension can override Ctrl+Tab
  • I would love to have this working on the basis of Alt/Cmd + Tab OS task switching. So your window comes up on Alt/Cmd + Tab. With key held on Alt/Cmd key, the user can go forward/backward using tab or shift+tab key respectively. Upon releasing all the fingers from keys, the window should dismiss.
  • Make changes to UI to differentiate Panes, if split view is on.
  • I saw a bug, where upon doing a Ctrl+O, the list in the recent files window, is not up to date with the WorkingSetView. May be you might want to look at that.

Otherwise, this is exactly what I have been missing for a long time. Great Job! 👍

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Thursday May 12, 2016 at 06:28 GMT


Thanks a lot@nethip for the detailed review 👍 and using the feature as well 👍

The last point you mentioned is indeed a bug as what we are doing now is, check the new view state ( which will be undefined for the first time) or initialize with empty array. I guess instead of empty we should start with the mru list.

Let me try to integrate the same shortcuts as you mentioned as that really sounds more intuitive 💯

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Monday May 16, 2016 at 15:03 GMT


With the current commits , the shortcut and the workflow is changed a bit.

Mouse & Keyboard workflow

  • Alt + o or 'File->Open Recent' - to bring up the recent file list for mouse workflow.
  • Up/Down key to navigate or use pointer to select
  • On enter or selection, the entry is opened and pop over gets hidden
  • Popover can be dismissed by clicking the close 'x' link as well

KeyBoard Only workflow

  • Ctrl/Cmd + Tab to navigate next
  • Ctrl/Cmd + Shift + Tab to navigate previous
  • In this mode the popover hide is tied to Ctrl/Cmd key up or window blur

Additional features

  • Non-working set entries will have a dimmed look to separate them from working set entries.
  • If split view is on, recent file list will also show a split list but with MRU list navigation across.
  • Once split view is merged , even the recent files entries will be merged to first-pane
  • Clear button in the pop over , clears only the unlisted entries/ dimmed entries which are not part of working set.

NOTE
Existing command shortcuts for navigating in MRU list has been associated with this new feature as this is a super set of the current MRU list. But the current menu items for MRU list navigation has been retained with working set navigation.

Tagging@nethip@petetnt@ingorichter@abose@sprintr@zaggino@larz0@MarcelGerber for more feedback. Please use this feature and let me know what you guys think.

@core-ai-bot
Copy link
Member Author

Comment by MarcelGerber
Monday May 16, 2016 at 15:49 GMT


Ah, haven't seen this before.
An immediate first thought: I really think the dialog should be dismissable via Esc.

@core-ai-bot
Copy link
Member Author

Comment by MarcelGerber
Monday May 16, 2016 at 16:03 GMT


When pressing Up/Down arrows to select an item, and the list has enough items so it scrolls, the arrow keys scroll the list, which makes for a strange feeling (hope you can repro it, as it's kind of hard to explain)

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Monday May 16, 2016 at 17:21 GMT


Thanks a lot@MarcelGerber for reviewing this feature 👍 .
I am addressing some of the comments specially the keyboard shortcut handling and making all strings translatable.
Also , I am adding escape key handling and will try to see the scrolling comment with arrow up/down.

@core-ai-bot
Copy link
Member Author

Comment by swmitra
Monday May 16, 2016 at 18:18 GMT


@MarcelGerber I have addressed most of the comments and fixed the scroll issue(had to navigate to a lot of files to simulate 😄 ) . Can you please have a look?
Thanks again for reviewing this feature 👍

@core-ai-bot
Copy link
Member Author

Comment by MarcelGerber
Monday May 16, 2016 at 19:06 GMT


Thank you! Looks good from my side now (I didn't have a thorough look at the code, though)

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Tuesday May 17, 2016 at 19:54 GMT


I gave a try, a couple of questions:

  • why doesn't match the current modal styles (view/Themes, Extension Manager)? I like the thin header and footer but since I use a light theme seems odd at first
  • if I delete a file which is in the list and then I click on it, on the recent list, it says An error occured when trying to open the file <filename>. The file/directory could not be found. This 'error' is kind of expected. Maybe is fine as is, I don't know, but Notepad++ says that the file doesn't exists and ask to create it.
  • what is the behaviour of the clear button? To me it redorders in some ways the list; should remove all the files from the list?

By the way good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant