files icon indicating copy to clipboard operation
files copied to clipboard

Filemanager1 scroll to item

Open jeremypw opened this issue 2 years ago • 4 comments

Fixes #2214

In order to make the behaviour that expected and the same regardless of whether Files is already running or not when the request is made it was necessary to fix several problems, in particular some races occurring when Files was starting up.

  • [x] Fix identifying whether a requested location was a child of a tab
  • [x] Fix AbstractDirectory function selecting files race with ffocus file on startup
  • [x] ViewContainer function focusing a location waits for loading to complete if called at startup

To test:

Call Files from the command line with a non-directory file parameter that is a child of one of the tabs that is restored on startup, on that contains a lot of files and requires scrolling to view the requested child.

Do similar where requested tab is not restored.

Do similar when Files is already running and is/is not showing the requested tab.

Use "Open in Folder" function of browser or other app with similar function.

In each case Files should show the requested item selected and visible.

Check for regressions where the requested item is a folder. The requested folder should open in a new tab if it is not already open, even if it is a child of an existing tab.

jeremypw avatar Aug 09 '23 11:08 jeremypw

Needs further testing following change to async adding tabs.

jeremypw avatar Sep 28 '23 10:09 jeremypw

There is some uncertainty about when Files should create duplicate a tab when the requested folder is already showing (has been restored). At the moment duplicates are created on startup but not if Files is already running.

jeremypw avatar Sep 28 '23 11:09 jeremypw

The code itself looks fine to me. I can try to fit in time to test this over the weekend, but if you feel you tested enough already I don't mind approving

zeebok avatar Apr 12 '24 21:04 zeebok

I am testing on eOS7:

Call Files from the command line with a non-directory file parameter that is a child of one of the tabs that is restored on startup, on that contains a lot of files and requires scrolling to view the requested child. Do similar where requested tab is not restored.

Both seem to always open a new tab, but it does scroll to the correct file with it already selected. Is it creating the tab before restoring or something?

Do similar when Files is already running and is/is not showing the requested tab.

This behaves as expected. Creates a tab if needed or switches to an existing one of the correct directory with desired file selected

Use "Open in Folder" function of browser or other app with similar function.

Works as expected I think. Only situation of note is that if Files is closed, Open in will open a new tab even if the correct folder is a restored tab. (ie Downloads/ tab will be restored and a new Downloads/ tab will open from the browser) similar to the issue I saw from terminal.

Check for regressions where the requested item is a folder. The requested folder should open in a new tab if it is not already open, even if it is a child of an existing tab.

This looks to work alright

zeebok avatar Apr 19 '24 00:04 zeebok