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

Outline exporer items auto expands to follow cursor position in latest 4.x #13896

Closed
jnsebgosselin opened this issue Sep 30, 2020 · 17 comments
Closed
Assignees
Milestone

Comments

@jnsebgosselin
Copy link
Member

Problem Description

After PR #13109, the outline explorer is expanded automatically to follow where the cursor is in the editor. I think this is a UX regression to what was done in PR #7962.

I think that it is ok that the highlight in the Outline explorer follows the cursor position if the item is already visible, but it should not expand items automatically. That is why we have the Go to cursor position button.

outline_explorer_navig

Versions

  • Spyder version: 4.2.0.dev0 2b8b7f6
  • Python version: 3.7.6 64-bit
  • Qt version: 5.12.5
  • PyQt5 version: 5.12.3
  • Operating System: Windows 10
@dalthviz
Copy link
Member

Thanks @jnsebgosselin for checking into this with the latest changes done! @ccordoba12 @andfoy what do you guys think?

@andfoy
Copy link
Member

andfoy commented Sep 30, 2020

I think we can add an option to disable cursor following on the editor

@jnsebgosselin
Copy link
Member Author

I think we can add an option to disable cursor following on the editor

Is auto-expanding the outline explorer's item to actively follow the cursor position something that was requested by the users?

@andfoy
Copy link
Member

andfoy commented Sep 30, 2020

I migrated that function since it was already on the tests and on the previous codebase

@andfoy
Copy link
Member

andfoy commented Sep 30, 2020

Also, I think it makes sense to actively navigate the symbols while the editor cursor is moved

@jnsebgosselin
Copy link
Member Author

Ah ok, so you can activate/disable it as you whish? It is just a matter of exposing it in the UI? If that is the case, that would be great then. Because the way I'm using the Outline explorer in my workflow, the new behaviour is a real deal breaker for me.

@andfoy
Copy link
Member

andfoy commented Sep 30, 2020

Yes, don't worry, I can add an option on PR #13885

@jnsebgosselin
Copy link
Member Author

Thanks! 👍

@andfoy andfoy self-assigned this Sep 30, 2020
@jnsebgosselin
Copy link
Member Author

jnsebgosselin commented Sep 30, 2020

Also, this is only a suggestion, but in order to preserve UX experience across the 4.x series, I would disable the auto-follow/auto-expand feature by default.

Just to clarify, before the changes, the cursor position was reflected in the outline explorer down to the lowest visible item in the tree. The tree would not get auto-expended though.

The animation below show the previous behaviour:

outline_explorer_autofollow

@ccordoba12 ccordoba12 added this to the v4.2.0 milestone Sep 30, 2020
@ccordoba12
Copy link
Member

I think we should preserve the behavior @andfoy added of automatically following the cursor (I find it more useful), but with an option to revert back to the previous behavior.

@jnsebgosselin
Copy link
Member Author

That is ok, I think it really depends how and for what you use the outline explorer. I use it to navigate between files and class/methods within a file. So if I end up with the items expanded automatically, it becomes impossible to do that, especially if the variables and attributes are shown, since this adds a lot of clutter to the explorer.

@ccordoba12
Copy link
Member

Ok, glad you agreed with my idea!

@jnsebgosselin
Copy link
Member Author

I would have personally tried to preserve UX consistency in the 4.x series and introduce the new behaviour as default in spyder 5 instead, but that is not a big deal really, especially since you are adding an option. I'm happy with that.

@jitseniesen
Copy link
Member

I agree with @jnsebgosselin , the auto-expand does not look like an improvement for me, and it makes sense not to change the UX in a minor update if it's a change that some users will like and some won't. Just to iterate what he said, the issue is not so much that the outline explorer follows the cursor, but that it expands everything. If the outline explorer would follow the cursor but not expand anything, or it would auto-collapse what it auto-expanded after you move out, it would in my opinion be much less of an issue.

@ccordoba12
Copy link
Member

This was fixed by #13885 by adding an option that prevents following the cursor, so users need to expand the tree automatically.

it makes sense not to change the UX in a minor update if it's a change that some users will like and some won't. Just to iterate what he said, the issue is not so much that the outline explorer follows the cursor, but that it expands everything.

Unfortunately, it seems that the Outline is broken if we leave that option deactivated (especially if there are cells in the file). So it was my decision to leave it on by default.

@jnsebgosselin
Copy link
Member Author

Unfortunately, it seems that the Outline is broken if we leave that option deactivated (especially if there are cells in the file). So it was my decision to leave it on by default.

What do you mean by "broken"? What is broken exactly. That would help me to know this in my testings.

@ccordoba12
Copy link
Member

If you have at least one cell in the file, the Outline will appear with its tree collapsed by that cell and it doesn't display any other content.

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

No branches or pull requests

5 participants