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

Store and restore active-project-path explicitly #1472

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Oct 9, 2024

Fixes #1471

  • Save and restore the active (git) project
  • Ensure the project chooser button and the terminal show the active project
  • Active project only changes in response to user choice
  • Global search continues to search in the project associated with the focussed document
  • When other folders are closed with the context menu then the remaining folder becomes the active one
  • [?] The menu option "Open in Terminal Pane" becomes "Set as Active Project" for git repos.

@jeremypw jeremypw marked this pull request as ready for review October 9, 2024 16:00
Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is actually worse because the project isn't updating when I switch project files, so project-wide search will continue to search in the old selection instead of the project that relates to the open files

@jeremypw
Copy link
Collaborator Author

@danirabbit Hmm, OK. I was trying to make the "active project" more stable and avoid conflict between what the terminal build directory is and what the active project is. May have to rethink the global search. It is not clear what to do if the user opens documents in more than one project at a time. I guess the search should be done in the project associated with the currently focussed document? I am reluctant to have the active project keep switching depending on which document is focussed! The active project, in my mind, is the one that is being developed and built. Agreed you might want to have documents from other projects open for reference but that does not change the focus of development.

@jeremypw jeremypw marked this pull request as draft October 13, 2024 16:13
@jeremypw jeremypw marked this pull request as ready for review October 30, 2024 16:51
@jeremypw jeremypw requested a review from danirabbit October 30, 2024 16:52
@jeremypw
Copy link
Collaborator Author

@danirabbit I have tried to address your concerns by decoupling the "active project path" from the "global search path". The main issue now is whether you want to be able to have different active projects in different windows. This could be useful I guess but would require having separate GitManager instances for each window. Only one of the window would be restorable at the moment.

@jeremypw jeremypw marked this pull request as draft October 30, 2024 17:08
@jeremypw
Copy link
Collaborator Author

jeremypw commented Oct 30, 2024

Converting to draft while fixing a bug in choosing active projects with same beginning of name.

@jeremypw jeremypw marked this pull request as ready for review October 30, 2024 19:16
@jeremypw
Copy link
Collaborator Author

jeremypw commented Dec 7, 2024

@danirabbit I would be grateful if you would reconsider the revised version of this PR. The project-wide search now follows the project associated with the focussed document as before, which I believe was you main concern. I have some uncertainty about what to do with "project" folders that are not git repos but this is probably not blocking as it pre-exists. Do we need to distinguish these as far as setting the terminal path or project button for example. At present in this PR the context menu for the project folder does differ but it would be simpler if it didn't so I am happy to revert that.

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.

Active project dropdown sometimes out of sync on restart
3 participants