Skip to content

Separated files and folders in the "Open Recent" sub-menu #2039

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

atsrus
Copy link

@atsrus atsrus commented May 5, 2025

Description

Added additional Defaults key to store recent file paths as well as recent project/folder paths. I 'think' I've understand the contribution guidelines but since this is my first go please be gentle! n.b. Seems there is probably an existing issue that means clearing the menu only shows cleared if you click on another window and back on CodeEdit. My change did not introduce this issue, I tested with the downloaded pre built 'PRE' version to be sure.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Screenshot 2025-05-04 at 11 33 27
Screenshot 2025-05-05 at 16 16 11

@austincondiff austincondiff changed the title Issue 1061 Separated files and folders in the "Open Recent" sub-menu May 5, 2025
@austincondiff
Copy link
Collaborator

austincondiff commented May 5, 2025

Nice work! We probably want to keep individual files in the welcome windows recents list. They should be interspersed together with the folders sorted by date.

@atsrus
Copy link
Author

atsrus commented May 5, 2025

Ok I can take a look at that as well (assuming it's not above my pay grade). I had made a poor assumption that it was also limited length list ,but I see it scrolls . Should I look at this as part of this same issue, and just carry on where I left off ? (Off on holiday tomorrow, I'll try and take look while away (if Im allowed !).

@austincondiff
Copy link
Collaborator

austincondiff commented May 5, 2025

Not sure I completely understand the limit/scroll issue, but each of the following lists should be limited to 10 items:

  • Recent Folders Menu
  • Recent Files Menu
  • Welcome Window Recent Files and Folders

@thecoolwinter
Copy link
Collaborator

I like this change! Thanks for getting started on it.

We haven't limited the welcome window's length to ten in the past, you can leave that out in this PR since we're limiting it to 100 items in the data model anyways (and scope creep).

One suggestion, it might be easier to keep the single array of past items, and in the menu item just filter for a list of directories and a list of single files. That'd leave the welcome window intact with no changes, and wouldn't require some of the duplicated logic in the model (eg where you had to duplicate the de-duplication code).

Since we're always limiting history to 100 items, I doubt a simple filter like that would be problematic performance-wise.

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

Successfully merging this pull request may close these issues.

3 participants