-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/toggle flags w cmd #2093
base: main
Are you sure you want to change the base?
Feat/toggle flags w cmd #2093
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for kick-starting this @noahonyejese, I think in general it's a really nice idea 🎉
I tried it in Safari on the preview link and it didn't work (cmd + t opens a new tab, and cmd + d adds a site to bookmarks 😅). I think here I'd avoid using cmd or ctrl + XYZ shortcuts exactly due to this reason, that they can be already assigned to some native browser actions.
I think it would probably be safe to simply type e.g. "enabledebug" that would open the debug panel – also we could consider using a third-party library, https://github.com/chris-feist/use-konami worked well in another project (but it's fine if the current code works) :)
@bprusinowski currently it's always |
@noahonyejese I've also tried with ctrl, and it didn't work, maybe it's broken in Safari, or I'm doing something wrong 🥹 I personally feel like it should be something natural to remember, that's why I'd prefer to have a "memorable text" (as I also use debug mode often 😅), but if you can make sure it works across browsers, it's also fine 🤞 |
@bprusinowski I see, generally it's maybe not working because of the enable condition? in The only downside to the text for me is that I never know how much I already typed 😅 |
At the moment I'm not sure why it doesn't work, we'd need to investigate 🔍 |
@bprusinowski I adjusted this to |
@bprusinowski is there still something wrong here? |
@noahonyejese I believe the behavior should be that when user types PS. I think the CHANGELOG is wrong now, it still indicates the shortcut method 🔍 |
What Changes?
This PR adds a keyboard command handler in order to allow users to toggle the debug flag by entering
toggledebug
How to test
toggledebug
?flag__debug=true
ps: @bprusinowski not sure if this the preferred approach, was pretty simple 15 min effort, not sure if it works on preview link