Repository navigation
feat: FileButton, the system's file picker, and Blitz's leaf as it is now - #31
Merged
Merged
Conversation
… now - FileButton: the renderer's own <input type=file>, unseen, over a face drawn as a button's (a span, so that neither presses, Tab nor assistive tech find anything but the input). A press, a tap, Tab, Return and Space reach the input; a browser opens its picker, and Blitz the platform's (diaryx-org/blitz's leaf: macOS, Windows, Linux's portal, iOS, the web). accept, multiple, directory; onchoose gets Dioxus's FileData, oncancel a picker dismissed. Its keys are the renderer's (Kind::Text), as a text field's are. - The gallery's Buttons card has one (Choose Pictures..., image/*, multiple); a Blitz test presses it, checks the input covers the face, and gives it the system's answer, of which what accept does not take is left out. The Tab test passes through it. - Cargo: Blitz from leaf as it is now (password input, file input), and dioxus-native-dom from the same fork, which leaf's events need; the gallery's dioxus-native with file-dialog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P3EBi4NUiH6dAfkRnuv9cz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FileButton(src/components/file_button.rs): a button that opens the system's file picker, in a browser and on Blitz alike.<input type=file>, transparent, laid over a face drawn as a button's. The face is aspan, so presses, Tab and assistive tech only ever find the input.leaf: macOS, Windows, Linux's portal, iOS and the web.label(shown, and the accessible name),icon,variant,disabled;accept,multiple,directory;onchoosegets Dioxus'sFileData(name, size, type, and the contents read when asked);oncancelfires when the picker is dismissed.image/*, multiple) in the Buttons card.Moving to the current Blitz
leaf.Cargo.locknow takes the fork's currentleaf, which includes the password input and the file input.[patch.crates-io]gainsdioxus-native-domfrom the same fork.leaf's new events don't compile with the published crate. It needsversion = "0.8.0-alpha.3", because the fork also holds an older 0.7 crate of the same name.file-dialog.Tests
span;accept,webkitdirectory, the disabled face).onchoose, with the fileacceptdoesn't take left out;.config/ship.figl, run by hand (shipisn't installed here): fmt, clippy-D warnings, the wasm web lint, 79 library tests, 80 Blitz tests in light and in dark, the audit (unchanged baseline), and docs.Generated by Claude Code