Maniphest T90082

New autoscrolling after renaming in the File Browser works weird
Closed, ResolvedBUG

Assigned To
Philipp Oeser (lichtwerk)
Authored By
Philipp Oeser (lichtwerk)
Jul 23 2021, 4:23 PM
Tags
  • User Interface
  • BF Blender (3.0)
Subscribers
Julian Eisel (Severin)
Philipp Oeser (lichtwerk)
Piero (phoenixart)
Pieter Schiettecatte (Schiette)
Pratik Borhade (PratikPB2123)

Description

System Information
Operating system: Linux-5.13.0-0.rc6.45.fc35.x86_64-x86_64-with-glibc2.33.9000 64 Bits
Graphics card: NVIDIA GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 465.31

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-07-23 07:04, hash: rBf23b14091f60
Was introduced in rB6b0869039a40: File Browser: Select files and directories after renaming like this

Short description of error
New autoscrolling after renamin in the File Browser works weird (does not scroll to the item created/renamed)

Exact steps for others to reproduce the error
in the FileBrowser:

  • go to a directory with many files/folders
  • create a new folder or rename an existing folder
  • watch it scroll somewhere else

Revisions and Commits

rB Blender
D13368

Related Objects

Mentioned In
T93116: Browser scrolls automatically to the end of the list
Mentioned Here
rB6b0869039a40: File Browser: Select files and directories after renaming

Event Timeline

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Jul 23 2021, 4:23 PM
Philipp Oeser (lichtwerk) created this task.
Philipp Oeser (lichtwerk) added a project: User Interface.
Philipp Oeser (lichtwerk) added subscribers: Pieter Schiettecatte (Schiette), Julian Eisel (Severin).

@Julian Eisel (Severin)
@Pieter Schiettecatte (Schiette)

Philipp Oeser (lichtwerk) renamed this task from New autoscrolling after renamin in the File Browser works weird to New autoscrolling after renaming in the File Browser works weird.Jul 23 2021, 4:24 PM
Philipp Oeser (lichtwerk) triaged this task as High priority.Jul 23 2021, 4:27 PM

Since this can get really annoying, I consider this a regression (before the commit - and with sorting by Date Modified you could at least make sure the new/renamed entry and focus would stay on top, now it always scrolls away) and will dare setting this to High prio.

Julian Eisel (Severin) added a comment.Jul 26 2021, 2:13 PM

We didn't change the scrolling logic, which I think was quite broken in master already. At least I know of cases where it didn't work either. This change exposes it much more though.

Julian Eisel (Severin) moved this task from Backlog to Long-Term Scope (Active) on the User Interface board.Aug 9 2021, 3:11 PM
Julian Eisel (Severin) moved this task from Long-Term Scope (Active) to Blender 3.0 on the User Interface board.Aug 9 2021, 3:54 PM
Julian Eisel (Severin) edited projects, added BF Blender (3.0); removed BF Blender.
Aaron Carlisle (Blendify) changed the subtype of this task from "Report" to "Bug".Sep 27 2021, 7:48 PM
Aaron Carlisle (Blendify) moved this task from Backlog to bcon3: Bugs on the BF Blender (3.0) board.
Philipp Oeser (lichtwerk) merged a task: T93116: Browser scrolls automatically to the end of the list.
Philipp Oeser (lichtwerk) added subscribers: Piero (phoenixart), Pratik Borhade (PratikPB2123).
Philipp Oeser (lichtwerk) claimed this task.Nov 25 2021, 9:40 AM

Since I set this to High prio (it is still bugging me every day), will have a look.

Julian Eisel (Severin) added a comment.EditedNov 25 2021, 11:19 AM

The smooth auto scrolling (which isn't new functionality) has always had issues like that. It was entirely reworked at some point to address such issues, but without success. Think one of the main problems is that after actions like renaming, it is executed immediately, but the file list is first cleared and then rebuilt. So there is a moment where the scrolling may operate on an empty list, which messes things up.

So I think at this point we should simply remove the smooth auto scrolling, and just ensure the active file is in view bounds after loading using file_ensure_inside_viewbounds(). We can later port this to use UI_view2d_smooth_view(), and make sure that doesn't have conflicts with rebuilding the file list.

Philipp Oeser (lichtwerk) added a comment.Nov 25 2021, 11:56 AM

I think the problem is the deselection/selection in the code from rB6b0869039a40 [which resorts], not sure if you meant that?
Seems like getting the correct file again after resorting will fix this though, Diff incoming...

Philipp Oeser (lichtwerk) added a comment.Nov 25 2021, 12:10 PM

There might be situations where there is an empty list (havent run into this though I think), but the clear regression from the culprit commit should still be fixed?

Julian Eisel (Severin) closed this task as Resolved by committing rBb2bb3e4b722b: Fix T90082: Autoscrolling after renaming in the File Browser broken.Nov 25 2021, 5:33 PM
Julian Eisel (Severin) added a commit: rBb2bb3e4b722b: Fix T90082: Autoscrolling after renaming in the File Browser broken.