graphql / graphql-playground

๐ŸŽฎ GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)
MIT License
8.76k stars 731 forks source link

Keyboard shortcuts don't work on windows #513

Closed fabien0102 closed 6 years ago

fabien0102 commented 6 years ago

This issue pertains to the following package(s):

What OS and OS version are you experiencing the issue(s) on?

Windows 10

What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?

1.4.0

What is the expected behavior?

Have all keyboard shortcuts available on windows with Ctrl instead of Cmd

What is the actual behavior?

image

What steps may we take to reproduce the behavior?

Install the 1.4.0 version on windows and try to do any shortcut

BTW, I don't see any shortcut for Prettify ๐Ÿ˜ž (I suggest Shift+Alt+F as VScode ๐Ÿ˜„ )

fabien0102 commented 6 years ago

I have find this for Prettify:

// \src\components\Playground\ConfigEditor.tsx:82
'Shift-Ctrl-P': () => {
          if (this.props.onPrettifyQuery) {
            this.props.onPrettifyQuery()
          }
        },

But it does'nt work too

But Ctrl+F/Ctrl+arrow/Alt+space are working perfectly ๐Ÿ˜‰

fabien0102 commented 6 years ago

It's a really quick fix to do, just replace Cmd by CmdOrCtrl but I can't execute the project locallyโ€ฆ

image

(I'm up to date with master and I have already do a fresh install of dependencies with yarn)

Is it normal? ^^

timsuchanek commented 6 years ago

Hey @fabien0102 no that is not normal! So right now the only environments that I can help you with are Mac & Linux, both are working right now, you can see in Circle that the build is successful. https://circleci.com/gh/graphcool/graphql-playground

So I guess it's a windows issue :/ We recently updated a lot of dependencies, it sounds like the css-loader is not working correctly on windows. The only ideas that I have are: Check if you have the latest node & from the recently updated dependencies css-loader & style-loader: Check if an older version fixes this

fabien0102 commented 6 years ago

@timsuchanek Line 8 is the jsx syntax :wink: I think that is a windows issue for sure, I don't have the time yet to debug this.

For the record, I'm on the last node version, and I have this issue before (it's not new for my part, I have begin to debug on my side, but never finish ^^)

BTW, it can be a good idea to add an appVeyor to have tests on a windows env ๐Ÿ˜‰ , how do you compile the windows release?