Skip to content
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

Use keyboards.qmk.fm to fetch metadata #927

Merged
merged 7 commits into from
Jun 1, 2021
Merged

Conversation

skullydazed
Copy link
Member

Description

Now that we have keyboards.qmk.fm updating regularly using github actions we should use that so we can stop generating duplicate metadata in the API. This PR adds support for doing that. This should help to improve the responsiveness of the UI when the API is under load.

I don't know if this is the best approach, I just sorta changed things around until I stopped getting errors. Happy to change anything about this PR.

Copy link
Member

@noroadsleft noroadsleft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This builds for me locally, but doesn't work at all (results in a completely blank page):

19:44:21.554 Uncaught Keyboard Metadata URL has not been specified constants.js:9
    <anonymous> constants.js:9
    js app.js:4544
    __webpack_require__ app.js:849
    fn app.js:151
    <anonymous> cjs.js:31
    ./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/ControllerTop.vue?vue&type=script&lang=js& app.js:1077
    __webpack_require__ app.js:849
    fn app.js:151
    <anonymous> ControllerTop.vue:1
    ./src/components/ControllerTop.vue?vue&type=script&lang=js& app.js:2565
    __webpack_require__ app.js:849
    fn app.js:151
    <anonymous> ControllerTop.vue:1
    vue app.js:2553
    __webpack_require__ app.js:849
    fn app.js:151
    <anonymous> cjs.js:18
    ./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/Main.vue?vue&type=script&lang=js& app.js:1173
    __webpack_require__ app.js:849
    fn app.js:151
    <anonymous> Main.vue:1
    ./src/components/Main.vue?vue&type=script&lang=js& app.js:2913
    __webpack_require__ app.js:849
    fn app.js:151
    <anonymous> Main.vue:1
    vue app.js:2901
    __webpack_require__ app.js:849
    fn app.js:151
    <anonymous> cjs.js:2
    ./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Home.vue?vue&type=script&lang=js& app.js:1328
    __webpack_require__ app.js:849
    fn app.js:151
    <anonymous> Home.vue:1
    ./src/views/Home.vue?vue&type=script&lang=js& app.js:4724
    __webpack_require__ app.js:849
    fn app.js:151
    <anonymous> Home.vue:1
    vue app.js:4712
    __webpack_require__ app.js:849
    fn app.js:151
    <anonymous> index.js:1
    js app.js:4437
    __webpack_require__ app.js:849
    fn app.js:151
    <anonymous> main.js:18
    js app.js:4413
    __webpack_require__ app.js:849
    fn app.js:151
    1 app.js:4845
    __webpack_require__ app.js:849
    checkDeferredModules app.js:46
    <anonymous> app.js:925
    <anonymous> app.js:928

@skullydazed
Copy link
Member Author

Do you have a different .env file you're using? It seems like you don't have VUE_APP_KEYBOARDS_URL=https://keyboards.qmk.fm set.

@noroadsleft
Copy link
Member

noroadsleft commented May 24, 2021

Okay apparently I needed to restart yarn serve.

New issue:

readme.md doesn't load if the readme is in a parent directory from the keyboard.

image

@skullydazed
Copy link
Member Author

readme.md doesn't load if the readme is in a parent directory from the keyboard.

This is an issue in the generated api data, which I'll have to address in qmk_firmware. I'll get a PR for that done soon.

Copy link
Member

@noroadsleft noroadsleft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a big speed improvement over current. ❤️

@skullydazed
Copy link
Member Author

readme.md doesn't load if the readme is in a parent directory from the keyboard.

This will be fixed by qmk/qmk_firmware#12997.

@noroadsleft
Copy link
Member

This will be fixed by qmk/qmk_firmware#12997.

Uhhh... so I may be dumb (probably no "may be" about it), but the "readme in parent directory" is still an issue even though that PR was merged.

@skullydazed
Copy link
Member Author

The data isn't actually regenerated until a keyboard is merged.

@noroadsleft
Copy link
Member

The data isn't actually regenerated until a keyboard is merged.

Yep. Definitely no "may be" about it.

@skullydazed
Copy link
Member Author

The API data should be updated and all feedback has been addressed. Please let me know if there's anything else we need here.

Copy link
Collaborator

@yanfali yanfali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry took too long to review this. My hub config broke when I switched laptop. Finally got it working again today. Much faster as @noroadsleft mentioned

@yanfali yanfali merged commit a45736f into master Jun 1, 2021
@yanfali yanfali deleted the use_keyboards_qmk_fm branch June 1, 2021 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants