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

[DOCS]: errors in the console, search doesn't work #433

Open
1 task done
dimaqq opened this issue May 23, 2024 · 15 comments
Open
1 task done

[DOCS]: errors in the console, search doesn't work #433

dimaqq opened this issue May 23, 2024 · 15 comments
Assignees
Labels
Type: Documentation Improvements or additions to documentation

Comments

@dimaqq
Copy link

dimaqq commented May 23, 2024

Describe the need

I'm unable to use search at https://octokit.github.io/rest.js/v20

There are also following errors in the console:

Screenshot 2024-05-23 at 13 50 13

production-app.js:283 TypeError: x is not a function
    at n.render (endpoint.js:44:10)
    at Ho (react-dom.production.min.js:187:188)
    at $o (react-dom.production.min.js:186:173)
    at Ku (react-dom.production.min.js:269:427)
    at Li (react-dom.production.min.js:250:347)
    at Ni (react-dom.production.min.js:250:278)
    at Pi (react-dom.production.min.js:250:138)
    at bi (react-dom.production.min.js:243:163)
    at hi (react-dom.production.min.js:237:175)
    at Ji (react-dom.production.min.js:285:27)

SDK Version

v20

API Version

No response

Relevant log output

production-app.js:283 TypeError: x is not a function
    at n.render (endpoint.js:44:10)
    at Ho (react-dom.production.min.js:187:188)
    at $o (react-dom.production.min.js:186:173)
    at Ku (react-dom.production.min.js:269:427)
    at Li (react-dom.production.min.js:250:347)
    at Ni (react-dom.production.min.js:250:278)
    at Pi (react-dom.production.min.js:250:138)
    at bi (react-dom.production.min.js:243:163)
    at hi (react-dom.production.min.js:237:175)
    at Ji (react-dom.production.min.js:285:27)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@dimaqq dimaqq added Status: Triage This is being looked at and prioritized Type: Documentation Improvements or additions to documentation labels May 23, 2024
Copy link
Contributor

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@hunxjunedo
Copy link

@dimaqq kindly assign this issue to me.

@gr2m
Copy link
Contributor

gr2m commented May 23, 2024

All yours @hunxjunedo 👍 Thanks for looking into it

@hunxjunedo
Copy link

hunxjunedo commented May 23, 2024

it's weird that the search is working absolutely fine on my system, however I noticed a small difference, the live version doesn't show the favicon, while the local one does. Will take some time identifying the problem

EDIT: I looked into it, when it is served with HMR its fine, but when I build and then serve it, it shows the same error. prolly some issue with the plugins.

THE ISSUE: it's related to how Gatsby performs hydration and re-rendering in production mode: gatsbyjs/gatsby#17914

EDIT: after trying almost everything, it's still not working. the main issue is that it's allowing to change the state, whether it be through useState or react Contexts. This is explained by the fact the the menu toggle icon has been disabled as well, I assume some other dev had looked into that and just disabled the option.

@hunxjunedo
Copy link

I'm pretty sure an issue of this type is not new in this repo, the disabled menu button despite the complete functionality in code clearly shows that it was once written to work, but was disabled due to the exact same problem with Gatsby. Now we have to decide the severity of this issue: do we need to migrate from Gatsby or just leave it as it is.

@gr2m
Copy link
Contributor

gr2m commented May 23, 2024

I assume that problem existed for a long while. And @octokit/rest is an Octokit SDK variant that exists for legacy reasons. We recommend to use https://github.com/octokit/octokit.js instead. All this to say, this is not urgent. I also think that Gatsby is overkill for this documentation page

@hunxjunedo
Copy link

Will be happy contribute to the new docs, just lemme know when you guys are looking to do it, this can be done in really simpler way other than Gatsby. Today was real hectic.

@wolfy1339
Copy link
Member

Feel free to contribute to a new docs page. There isn't a set timeline

@hunxjunedo
Copy link

Alr, will look into it in the near future.

@nickfloyd nickfloyd moved this from 🆕 Triage to 🔥 Backlog in 🧰 Octokit Active May 24, 2024
@AbandonedCart
Copy link

AbandonedCart commented May 26, 2024

I assume that problem existed for a long while. And @octokit/rest is an Octokit SDK variant that exists for legacy reasons. We recommend to use https://github.com/octokit/octokit.js instead. All this to say, this is not urgent. I also think that Gatsby is overkill for this documentation page

I'd like to make a counterpoint to this. I forked a project that was using this instead of the newer version you linked. Unfortunately, I am unable to search in the documentation to make sure I understand what they were trying to accomplish before hastily attempting to rewrite it. The documentation of an obsolete project is perhaps the most important thing to leave in a working state.

TypeError: x is not a function
    render endpoint.js:44
    React 13
    v production-app.js:283
    5824 production-app.js:294
react-dom.production.min.js:216:199
    React 5
    unstable_runWithPriority scheduler.production.min.js:18
    React 9
    v production-app.js:283
    5824 production-app.js:294
TypeError: x is not a function
    render endpoint.js:44
    React 13
    v production-app.js:283
    5824 production-app.js:294
react-dom.production.min.js:216:199
    React 5
    unstable_runWithPriority scheduler.production.min.js:18
    React 4
    unstable_runWithPriority scheduler.production.min.js:18
    React 6
    v production-app.js:283
    5824 production-app.js:294
Uncaught TypeError: x is not a function
    render endpoint.js:44
    React 13
    v production-app.js:283
    5824 production-app.js:294
endpoint.js:44:9
    render endpoint.js:44
    React 13
    v production-app.js:283
    5824 production-app.js:294

@hunxjunedo
Copy link

Yeah it has been understood and acknowledged, and I intend to release a functional and better version of the docs soon Inshallah.

@wolfy1339
Copy link
Member

I'd like to make a counterpoint to this. I forked a project that was using this instead of the newer version you linked.

@octokit/rest is still being updated, and the same endpoints are available in octokit. The only difference is that the endpoints methods are prefixed with rest. in the octokit package, while here they are available both unprefixed and prefixed.

If you only need the REST endpoints, then this is much more minimal then octokit.

@AbandonedCart
Copy link

AbandonedCart commented May 26, 2024

@octokit/rest is still being updated, and the same endpoints are available in octokit. The only difference is that the endpoints methods are prefixed with rest. in the octokit package, while here they are available both unprefixed and prefixed.

If you only need the REST endpoints, then this is much more minimal then octokit.

Unfortunately, what I needed to know were details about code that already made that decision. I found my answers, but the time invested deterred investing more time to convert it, as well. In the end, we dropped the library in favor of a more direct approach.

@wolfy1339 wolfy1339 removed the Status: Triage This is being looked at and prioritized label Jul 21, 2024
@wolfy1339
Copy link
Member

@hunxjunedo Have you made any progress on this issue?

@hunxjunedo
Copy link

Not yet, really busy nowadays, will prolly do it this month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Documentation Improvements or additions to documentation
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

5 participants