fantasycalendar / kobold-plus-fight-club

A ground-up rewrite of Kobold Fight Club
MIT License
37 stars 17 forks source link

Search bar keybaord shortcut tip indicates cmd-k but only ctrl-k works #27

Closed philiprenich closed 11 months ago

philiprenich commented 1 year ago

The indicator for what shortcut to use on Mac is incorrect. Probably an automatic conversion from ctrl to cmd when Mac is detected? The modal of Keyboard Shortcuts correctly says ctrl

image

philiprenich commented 1 year ago

Oops, ignore the bad alignment in my screenshot. I think I was mucking around with Dev Tools trying to understand how the crap Tailwind works to solve the other issue I filed. (why can't it just be CSS? 😅 )

V13Axel commented 11 months ago

Sorry, I don't have a Mac to test with, but you're almost certainly correct! It looks like we're just registering ctrl+k: https://github.com/fantasycalendar/kobold-plus-fight-club/blob/dc931af2f13a3932832a3d4045522082500c6648/src/components/SearchBox.vue#L17

I'll look into having our hotkey library use command instead, for some reason I thought it already did.

As for the latter question, regarding Tailwind, we use Tailwind because it offers a ton of benefits over traditional semantic classes and CSS; Especially in the context of an app that has a lot of small one-off components rather than a ton of constantly reused ones. There's never any question what styles are applied to a given element - they are all right there, inline, doing very concise and consistent things. I highly recommend this talk by its creator, it'll hopefully help answer that question better than I could: https://www.youtube.com/watch?v=TNXM4bqGqek