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

Feat: add a new control PathPicker, add PathPickerDemo #533

Merged
merged 6 commits into from
Jan 15, 2025

Conversation

WCKYWCKF
Copy link
Contributor

PathPicker aggregates file selection functionality and provides a Command property. When a button is pressed or Enter is pressed while the focus is on PathPicker, the Command is triggered and a Task<IReadOnlyList> is passed to the Command.

…hanged`SelectedPath`to`SelectedPathsText`and supported two-way conversion with`SelectedPaths`;modified the parsing method of`FileFilter`so that it can override the`Name`parameter of the`FilePickerFileType`constructor and can define multiple`FilePickerFileType`instances;added support for`FilePickerFileTypes`in`FileFilter`;and added a new PathPicker style`PathPickerForMultipleText`.
@rabbitism
Copy link
Member

Command is still processed before picking finished...

@WCKYWCKF
Copy link
Contributor Author

I didn't fully understand what you meant. Was the Command triggered incorrectly?

@WCKYWCKF
Copy link
Contributor Author

Command is still processed before picking finished...

Unable to reproduce the issue; more information is needed.
Are you using the latest commit?

@rabbitism
Copy link
Member

Command is still processed before picking finished...

Unable to reproduce the issue; more information is needed. Are you using the latest commit?

Sorry I was using github cli and it's not updating from source....

</Setter>
</ControlTheme>

<ControlTheme x:Key="PathPickerForListView" TargetType="ursa:PathPicker">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow, I think triggering command with expander header leads to a lot of mis-clicking here... After this PR I will try to redesign this theme.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about redesigning it to enhance its visual prominence? This way, you would only need to modify the style of the Expander.

Copy link
Member

@rabbitism rabbitism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments.

@rabbitism
Copy link
Member

One more thing, we should add a property to control what to do when user cancelled a selection. Sometimes I just want to keep the original selection.

@WCKYWCKF
Copy link
Contributor Author

One more thing, we should add a property to control what to do when user cancelled a selection. Sometimes I just want to keep the original selection.

Agreed. It has been added.

add:Maybe we can add a command demo here to show how to trigger the bound command.
change:I think these two themes should be merged, and the "AcceptReturn" should just be controlled by "AllowMultiple"
add:One more thing, we should add a property to control what to do when user cancelled a selection. Sometimes I just want to keep the original selection.
@WCKYWCKF WCKYWCKF requested a review from rabbitism January 13, 2025 11:11
feat:add property ClearSelectionOnCancel. support for not clearing the selection if the file picker is canceled.
@rabbitism rabbitism merged commit 8651ae3 into irihitech:main Jan 15, 2025
2 checks passed
@WCKYWCKF WCKYWCKF deleted the pr1 branch January 17, 2025 04:55
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