wire-elements / wire-spy

WireSpy—a sleek new debug bar for Livewire
https://wire-elements.dev/blog/announcing-wirespy-a-sleek-new-debug-bar-for-livewire
MIT License
301 stars 8 forks source link

Keybinding is not supported in all browsers #1

Closed PhiloNL closed 1 week ago

PhiloNL commented 1 week ago

The keybinding CMD/CTRL + L seems to work in browsers like Chrome but not in browsers like Arc. The keybinding should be configurable.

Horttcore commented 1 week ago

@PhiloNL CMD + SHIFT + L works for Arc Browser (Mac) CMD + L works in Chrome (Mac) CMD + L works in Firefox (Mac) CMD + L works in Safari (Mac)

I have to click somewhere on the page but then it works

FortuneV13 commented 1 week ago

Nothing is popping up for me in Chrome. composer package is installed and using CMD+L

valpuia604 commented 1 week ago

Would also love to have a floating icon/button to toggle, like Nuxt Devtools or Debugger

PhiloNL commented 1 week ago

@PhiloNL CMD + SHIFT + L works for Arc Browser (Mac) CMD + L works in Chrome (Mac) CMD + L works in Firefox (Mac) CMD + L works in Safari (Mac)

I have to click somewhere on the page but then it works

Thanks! It seems to vary a bit per person. I'll make it configurable though :)

Nothing is popping up for me in Chrome. composer package is installed and using CMD+L

Can you check the page source and see if the devbar is there? (it only renders if there are Livewire components on the page.

Would also love to have a floating icon/button to toggle, like Nuxt Devtools or Debugger

Thanks! I'll look into adding this an optional option (so it doesn't conflict with other debug bars for example)

MarioPerini commented 1 week ago

"Ctrl + L" does focus on the address bar and does not open WireSpy for me.

https://support.google.com/chrome/answer/157179#zippy=%2Caddress-bar-shortcuts

Edit: Also in Firefox https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly

PhiloNL commented 1 week ago

"Ctrl + L" does focus on the address bar and does not open WireSpy for me.

https://support.google.com/chrome/answer/157179#zippy=%2Caddress-bar-shortcuts

Edit: Also in Firefox https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly

Yeah, sometimes it works if you click on the page first but it's not ideal so I'll be updating this shortly

joffreypersia commented 1 week ago

You're great @PhiloNL, love your initiative ! One day I'll be rich enough to sponsor you ahah

ismaail commented 1 week ago

in case you clicked on Wire-Spy Close button, to show it again:

Alpine.$data(document.querySelector(('div[x-data="wireSpy"]'))).show = true;
PhiloNL commented 1 week ago

You can now define your own keybinding:

php artisan vendor:publish --tag=wire-spy-config

And adjust the config to your preferred binding:

<?php

return [
    /**
    * The keybinding configuration option allows you to define a keyboard shortcut
    * using AlpineJS syntax. It accepts a string representing the desired key combination.
    *
    * Syntax:
    * - 'super' corresponds to the 'Cmd' key on macOS and the 'Ctrl' key on Windows/Linux.
    * - Combine with other keys using dot notation, like 'super.l' for 'Cmd+L' or 'Ctrl+L'.
    */
    'keybinding' => 'super.l',
];