Skip to content

Allow activating previous position in listing for file picker#440

Closed
theshubhamp wants to merge 2 commits intomicrosoft:mainfrom
theshubhamp:activate-preselected-file-node
Closed

Allow activating previous position in listing for file picker#440
theshubhamp wants to merge 2 commits intomicrosoft:mainfrom
theshubhamp:activate-preselected-file-node

Conversation

@theshubhamp
Copy link
Member

@theshubhamp theshubhamp commented Jun 7, 2025

Selection position is preserved across directory traversal today. Activating at the same position after traversal doesn't work because the current implementation expects a "select" before "activate".

Fixed by setting file_picker_pending_name in the Activated callback to allow users to activate a list item that was pre-selected from a previous screen.

Video:
https://github.com/user-attachments/assets/e2657c77-e66a-428f-a20f-91815daa58ba

An alternative fix could be to reset the selection to default or the first node (i.e. ..)

#347

Selection position is preserved across directory traversal today. Activating at the same position after traversal doesn't work because the current implementation expects a "select" before "activate".

Fixed by setting file_picker_pending_name in the Activated callback to allow users to activate a list item that was pre-selected from a previous screen.

An alternative fix could be to reset the selection to default or the first node (i.e. `..`)
@lhecker
Copy link
Member

lhecker commented Jun 10, 2025

While this fixes the immediate issue described in #347, this doesn't fix that the selection carries over between navigations. If you navigate into a directory and it's the 3rd item, the selection should then go back to the 1st item (".."). #454 fixes this. Closing it in favor of the other PR. 🙂

@lhecker lhecker closed this Jun 10, 2025
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 this pull request may close these issues.

2 participants