Closed dabreegster closed 2 years ago
I was going to add a "copy to clipboard" button for convenience, but it's unexpectedly tough in Yew.
Option 1: just have an onclick="someJSFunction()"
. I can't get this to work; The yew HTML macro insists on callbacks being in Rust, and the docs don't talk about any escape hatch to just call JS. I could define the function in JS and make a WASM interface to it, I guess. https://yew.rs/docs/0.18.0/concepts/html/elements#listeners
Option 2: Copy to the clipboard via rust. But the necessary APIs are unstable. https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html
So for now, this tool is helpful and I'll merge. Will still add more options to filter out separators / widths later.
If you want to add a test case to the .yaml today, you have to:
This PR mostly fixes the first. You can use the web app, get the current output, and generate the YAML. You have to manually fix it up -- usually because the expected output is wrong -- but this is much faster workflow.