Differentiate between backend not being available and user cancelling the dialog
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 830
- Forks
- 108
- Avg merge
- 6d 33m
- Merged PRs (30d)
- 2
Description
Issue:
Currently, the pick_folder or pick_file functions return an Option, where None represents both the user cancelling the dialog and the dialog failing to load.
While this crate relies on there being a compatible backend, a user of this crate might want to handle incompatible situations separately. As far as I can see by the documentation, there isn't a good way to do this without making some assumptions about the user's system that may be difficult to maintain.
Use case:
I'm currently writing a TUI app for managing a server application. I want this app to be compatible both with user desktops (for home hosting) and SSH servers (for dedicated hosting). On compatible user desktops, I want to use the system file picker to allow the user to use any shortcuts or other useful features that their file picker has, while on incompatible desktops or SSH servers that don't have a desktop, I want to produce my own more minimal file picker as a substitute.
If the user cancels the dialog, this should result in no action from my application. If the user doesn't have a compatible dialog, the substitute should show up instead.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the pick_folder and pick_file entry points and how they represent both dialog cancellation and backend loading failure. Trace the backend failure paths and existing documentation to determine where the outcomes are conflated. Done means callers can distinguish cancellation from an unavailable or incompatible dialog and choose a fallback picker accordingly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100