-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Conversation
…ra/NavigationHistory
…ra/NavigationHistory
Open the list using File-> Open Recent (Alt+O) Navigate using keyboard only - Next (Alt+Shift+N), Prev (Alt+Shift+P)
Great stuff @swmitra, I've been missing for such a feature for a long time! Things right off the top:
|
@@ -0,0 +1,165 @@ | |||
<style> |
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.
The styles should probably be in its own CSS file and then loaded with ExtensionUtils.loadStyleSheet(module, "styles/recent-files.css");
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 kept it purposefully in the template as it affects the DOM only when appended, to minimize any unintentional style override.
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.
As all the selectors are prepended with mrof
(or start with #mrof-container
ID) I don't think there should be anything that touches anything outside of the MROF-list 📝
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.
Done @petetnt
@petetnt Can you please check the last commit. Fixed all the UI corruption issues. |
@petetnt Thanks a lot for quick confirmation 😄 |
👍 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. |
@@ -0,0 +1,402 @@ | |||
/* | |||
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. |
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.
Update the copyright year to 2015 or maybe 2016 just to be on the safe side.
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.
@sprintr The theme used for this dialog is inline with the theme used in the project panel (side bar). That is why this dialog has a different look than the rest of the dialogs.
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.
When a file has unsaved changes the same behavior occurs that @petetnt pointed out earlier. |
* Shows the current MROF list | ||
* @private | ||
*/ | ||
function _createMROFDisplayList() { |
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 function spans almost 100 lines. Most likely could use some refactoring ✏️
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.
Done.
Minor refactoring
Found another issue while doing further testing against aa5f73e
The following is not an issue, more of an question regarding split view use:
Great job as always @swmitra 👍 |
@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? |
Thank you! Looks good from my side now (I didn't have a thorough look at the code, though) |
I gave a try, a couple of questions:
By the way good job! |
Good catch 👍 and good feedback as well. |
Thanks a lot @ficristo for trying this feature out. Really appreciated 👍
EDIT
Basically existence check is done on all entries before showing the list, but once shown we don't really check for existence.
|
Trying to clarifing my issue: I only think the message is a bit misleading. I think I'll be a bit confused about the clear button until I'll get accustomed 😛. I don't have strong opinions about what to do (I didn't check the last commit...) |
@ficristo The entry for non-existing files will not be shown in the list so that we can avoid clicking on a link pointing to an unreachable file entry(as per last commit). Thanks a ton for using the feature and providing us good feedback 👍 |
// Sorry closed it by accident while pressing 'comment'. |
Added "recent.files.navigation" preference to enable/disable (true/false) recent files navigation. |
@swmitra Does it make sense it have something like |
@swmitra One last change. I think when changing preference for this, you need to rebuild the MRU by removing the non workspace items and by syncing your MRU with the workspace one. |
Thanks a lot @nethip for actively using the feature for review 👍 |
Ping @nethip for a final check (hopefully 😄 ) |
Awesome!! |
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
and select(Click) on the file you want to open(refer to the list screen shot ).
Mouse + Keyboard
Keyboard only
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 )