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

Optional callback to display information for currently highlighted file #166

Closed
crumblingstatue opened this issue Oct 16, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@crumblingstatue
Copy link
Contributor

crumblingstatue commented Oct 16, 2024

The host application might have the means to display more information for a highlighted file.
For example, I would like to display the MIME type for the currently highlighted file.

It could also be used for things like showing image previews in applications that deal with images, etc.

Optionally I could use it to display things like file size (#165) and other properties, but I think that would be a commonly wanted feature on its own, so I made a separate issue for it.

My current idea is that the callback ui could go into an optional right panel inside the picker window.

@fluxxcode
Copy link
Owner

Thanks for the ticket. It should be easy to implement, but I don't have time at the moment

@fluxxcode fluxxcode added the enhancement New feature or request label Oct 17, 2024
@fluxxcode
Copy link
Owner

fluxxcode commented Oct 18, 2024

Hey, just to make sure I understood it correctly.
Your idea is a ui.higlighted_item -> Option<Path> and ui.highlitghted_items -> Option<Vec<Path>> (for multi selection) API to return the currently selected item and a file_dialog.right_panel_ui API to implement a custom UI inside the right panel?

@crumblingstatue
Copy link
Contributor Author

crumblingstatue commented Oct 20, 2024

Hey, just to make sure I understood it correctly.
Your idea is a ui.higlighted_item -> Option<Path> and ui.highlitghted_items -> Option<Vec<Path>> (for multi selection) API to return the currently selected item and a file_dialog.right_panel_ui API to implement a custom UI inside the right panel?

I haven't thought too hard about what the best API would be, but what you suggested sounds good to me.
Currently I'm not working on my hex editor, but I might experiment with this next week, and open up a draft pull request, unless you are feeling motivated to work on this yourself.

@fluxxcode
Copy link
Owner

I'm also working on another project at the moment, so I don't know when I'll get to it. If you have time to work on this, feel free to assign the issue to yourself. If I can work on it sooner, I will simply assign it to myself 👍

@crumblingstatue
Copy link
Contributor Author

I took a shot at this with #170

@fluxxcode
Copy link
Owner

Done with: #170

Thank you for the implementation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants