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

Close and Open Project Expands other Collapsed Projects #32

Closed
joewheaton opened this issue Jul 6, 2021 · 7 comments
Closed

Close and Open Project Expands other Collapsed Projects #32

joewheaton opened this issue Jul 6, 2021 · 7 comments
Assignees
Labels
🐛 bug Something isn't working 🌐 Viewer QGIS
Milestone

Comments

@joewheaton
Copy link

Version: 0.5.1

Part of keeping the QRAVE tree from being over-whelming is controlling (with businesses logic collapsed tag) whether a project tree is collapsed or not. When a user takes time to control the collapsed state of other open projects, we should NOT mess with that. What is happening is when you open a new project, or close an existing project, then the other projects loose their collapsed state and expand out. It makes it really hard to see the project you just opened, and will annoy users. See video:

Alt-text

@joewheaton joewheaton added the 🐛 bug Something isn't working label Jul 6, 2021
@MattReimer
Copy link
Member

MattReimer commented Jul 6, 2021

Agreed. Not sure if we need to track expand/collapse state of every item but there may be some middle ground here.


Update: Just a note for future Matt

I did explore writing the tree collapsed state as a project setting. I think that's a nice-to-have feature for sure but for now all we need to do is serialize the tree state in an error-correcting way (i.e. Use what you can, ignore stuff that doesn't make sense, fall back to sensible defaults) and store it in-memory so that we can re-apply it after a tree refresh.

@philipbaileynar
Copy link
Contributor

Quick summary: when you open or close a project, no other project tree elements should change. If they were collapsed or expanded before the user opened/closed a project, then that is the state that they should have afterward.

(I'm pretty sure this is how ArcRAVE works. ArcRAVE does not rebuild the entire project tree every time a project is opened or closed. It only affects the project being altered.)

@joewheaton
Copy link
Author

joewheaton commented Oct 25, 2021

Perfect summary @philipbaileynar. One minor clarification. Newly opened projects should also get added to the TOP of the project explorer tree so if tree is busy, we stand chance of seeing them.

I suppose this brings up a minor issue you and I did not discuss @philipbaileynar on #19, which is when adding items from a project to the map for a project that does not yet exist in TOC, where does new layer group for that project get added. I'm guessing at top makes sense? Ignoring order of projects within the RAVE tree? Thoughts @philipbaileynar

@MattReimer
Copy link
Member

Yeah, rebuilding the whole tree every time was a bit of a hack to get it out quickly without having to figure out how to edit an existing tree.

While it might seem easy this is not necessarily a trivial fix since that rebuild is triggered in a few places. Just FYI

@joewheaton
Copy link
Author

Thanks @philipbaileynar for capturing below in #59

I suppose this brings up a minor issue you and I did not discuss @philipbaileynar on #19, which is when adding items from a project to the map for a project that does not yet exist in TOC, where does new layer group for that project get added. I'm guessing at top makes sense? Ignoring order of projects within the RAVE tree? Thoughts @philipbaileynar

@KellyMWhitehead
Copy link
Contributor

QRave updated to remember each items collapsed state in the tree before reloading the tree.

e8667b5

@joewheaton
Copy link
Author

I am so excited to have this functionality back. This will be huge. Thanks @KellyMWhitehead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🌐 Viewer QGIS
Projects
None yet
Development

No branches or pull requests

4 participants