Project history api, reopen project menu and command #13046

Merged
merged 1 commit into from Oct 26, 2016

Conversation

Projects
None yet
6 participants
@damieng
Contributor

damieng commented Oct 21, 2016

Implements new

  • atom.history API containing .getProjects(), .clearProjects() and .onDidChangeProjects(callback) public API surface
  • 'Reopen Project' menu that lists the 15 most recently opened projects (configurable via core.reopenProjectMenuCount)
  • application:reopen-project command that provides a search across all projects opened
  • application:clear-project-history command to clear project history

Notes

  • For now you can type atom.history.importProjectHistory() in the debug window to build your initial list from Atom's internal window-state history. Am considering making this happen automatically when you first run Atom with no existing project history state file.
  • Multiple folder projects appear in the menu as the last name in the paths separated by a comma e.g. 'atom, settings-view' for width. They appear in full in the pop-up palette.
  • Reopening a project always appears in a new window as window-state is preserved between projects and it is quite jarring otherwise.
  • 'Clear Project History' appears at the top of the menu instead of ideally at the bottom due to limitations of the MenuManager and how it handles separators. Will be addressed in the future once that is resolved.
  • Setting core.reopenProjectMenuCount does not disable the menu right now because of the same limitations as above (removing at run-time refuses to remove the separator)

Screenshots

Reopen Project menu

image

Reopen Project command list picker

image

@damieng damieng added the enhancement label Oct 21, 2016

@simurai

This comment has been minimized.

Show comment
Hide comment
@simurai

simurai Oct 22, 2016

Member

Nice. 👍

Maybe something to consider: Opening a previous project in the same window by replacing the current project. It would be pretty fast to switch between projects instead of closing and opening a new window.

I've been using project-plus and project-manager for that and quite like it.

Member

simurai commented Oct 22, 2016

Nice. 👍

Maybe something to consider: Opening a previous project in the same window by replacing the current project. It would be pretty fast to switch between projects instead of closing and opening a new window.

I've been using project-plus and project-manager for that and quite like it.

@jerone jerone referenced this pull request in Zren/atom-open-recent Oct 22, 2016

Closed

Atom 'Reopen Project' menu #25

@damieng

This comment has been minimized.

Show comment
Hide comment
@damieng

damieng Oct 24, 2016

Contributor

I looked at project-plus and it seems what it actually does when you switch is close the current project and open a new one. I think that is required because of the current atom api and because the new project has its own window position/location.

I could definitely add a config option to enable similar behavior in this quite easily.

Contributor

damieng commented Oct 24, 2016

I looked at project-plus and it seems what it actually does when you switch is close the current project and open a new one. I think that is required because of the current atom api and because the new project has its own window position/location.

I could definitely add a config option to enable similar behavior in this quite easily.

@jerone

This comment has been minimized.

Show comment
Hide comment
@jerone

jerone Oct 24, 2016

Would it be useful to register if an directory/project was opened in dev-mode...

jerone commented Oct 24, 2016

Would it be useful to register if an directory/project was opened in dev-mode...

@damieng

This comment has been minimized.

Show comment
Hide comment
@damieng

damieng Oct 26, 2016

Contributor

Going to merge this for now and consider those two requests separately.

Contributor

damieng commented Oct 26, 2016

Going to merge this for now and consider those two requests separately.

@damieng damieng merged commit e3e6483 into master Oct 26, 2016

4 of 5 checks passed

ci/circleci Your tests failed on CircleCI
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@damieng damieng deleted the dg-reopen-project branch Oct 26, 2016

@anothernode

This comment has been minimized.

Show comment
Hide comment
@anothernode

anothernode Jan 23, 2017

Thanks a lot for implementing this! I would love it even more if it would be possible to make Atom reopen a project in the same window, like @simurai suggested, instead of in a new one.

Thanks a lot for implementing this! I would love it even more if it would be possible to make Atom reopen a project in the same window, like @simurai suggested, instead of in a new one.

@Ben3eeE

This comment has been minimized.

Show comment
Hide comment
@Ben3eeE

Ben3eeE Jan 23, 2017

Member

@anothernode We have an open issue for adding this that you can subscribe to for updates. #13277

Member

Ben3eeE commented Jan 23, 2017

@anothernode We have an open issue for adding this that you can subscribe to for updates. #13277

@danielbayley

This comment has been minimized.

Show comment
Hide comment
@danielbayley

danielbayley Mar 18, 2017

Contributor

On macOS the convention is to have this kind of functionality under File > Open Recent… I think the implementation of Zren/open-recent is better, as it shows files as well as projects, and lets you set how many to show of each… why not merge that into core?

Would it be useful to register if an directory/project was opened in dev-mode...

@jerone FYI, I opened a seperate issue which mentions this a while ago.

Contributor

danielbayley commented Mar 18, 2017

On macOS the convention is to have this kind of functionality under File > Open Recent… I think the implementation of Zren/open-recent is better, as it shows files as well as projects, and lets you set how many to show of each… why not merge that into core?

Would it be useful to register if an directory/project was opened in dev-mode...

@jerone FYI, I opened a seperate issue which mentions this a while ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment