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

Sidebar: First select fails to open document after branch change which removes a sidebar item #1403

Open
jeremypw opened this issue Jan 12, 2024 · 4 comments · May be fixed by #1465
Open

Sidebar: First select fails to open document after branch change which removes a sidebar item #1403

jeremypw opened this issue Jan 12, 2024 · 4 comments · May be fixed by #1465

Comments

@jeremypw
Copy link
Collaborator

jeremypw commented Jan 12, 2024

What Happened?

After changing branches (which causes some of the loaded documents to change, selecting another document in the foldermanager failed to open it.

Steps to Reproduce

  1. Open a git project
  2. Prepare (if necessary) a branch that contains a file not existing in another branch and switch to that branch
  3. Change the branch so that the file is removed from the sidebar
  4. Try to open another doc from the sidebar.

An easier way to demonstrate the problem is to create a temporary file item in the sidebar and then delete it. The next select then fails to open a document.

Expected Behavior

Selecting a document in the sidebar should open it under these circumstances

OS Version

7.x (Horus)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

@jeremypw
Copy link
Collaborator Author

This issue is an unfortunate side-effect of the ignore_next_select property of the foldermanager introduced to prevent unwanted docs opening after an item was renamed or removed.

@jeremypw jeremypw transferred this issue from elementary/files Jan 14, 2024
@jeremypw jeremypw linked a pull request Sep 19, 2024 that will close this issue
@zeebok
Copy link
Contributor

zeebok commented Oct 6, 2024

When I change branches on OS8 stable, it does not change what docs are open so I can't reproduce. In fact the radio button doesn't even update:
image

@jeremypw
Copy link
Collaborator Author

jeremypw commented Oct 6, 2024

@zeebok Thanks for having a look at this. Changing branches does not usually change which docs are open but may change which items are present in the sidebar. The issue is about opening another document from the sidebar after changing branch which results in a sidebar item being removed or renamed. I'll rewrite the steps to reproduce.

I can confirm the issue about which branch is selected in the Branch context menu on OS8 but this also occurs in master so will have to be fixed in a separate PR.

@jeremypw
Copy link
Collaborator Author

jeremypw commented Oct 6, 2024

@zeebok I have revised the instructions. It seems a bit of a corner case but this was happening to me annoyingly often during development so there may be another way of triggering it.

@jeremypw jeremypw changed the title Sidebar: First select fails to open document after branch change Sidebar: First select fails to open document after branch change which removes a sidebar item Oct 6, 2024
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 a pull request may close this issue.

2 participants