Closed cptpiepmatz closed 2 years ago
Can reproduce (though it looks like different visual changes) on this example in the docs: https://rohit-gohri.github.io/redocusaurus/examples/using-spec-yaml/
It looks comparable though.
I have released a beta for v1 where this is fixed (along with bunch of other things!!): https://github.com/rohit-gohri/redocusaurus/discussions/146
It has some breaking changes (mostly simplification of option names). New docs are at redocusaurus-v1.vercel.app/docs
It will be great if you could try it and give some feedback.
So this is till happening in Chrome in v1, it's fixed in Firefox. If javascript is disabled then the page loads correctly, but then react rehydrates and remove the server styles and that causes a flash until the client reapplies the styles.
Hey, I'm sorry I respond so late. I took vacation for a bit.
Thank you for trying to fix my issue. But I think I now have a heap of other issues.
Our Docusaurus is meant to doc a lot of different repos. Also I didn't have the time to really clean up our config.
Sadly now we get the error:
This page crashed. Hook useColorMode is called outside the
. Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.
Upon clicking the "try again" button, well get that console output:
I checked the new documentation but I cannot really find what breaks here.
Hi, I think I am running into a bug related to this. When I navigate to the Redoc page the scrollYOffset works fine, but if I refresh the page the scrollYOffset is ignored so the sidemenu disappears under the navbar.
It seems to me that this is partially related to this line: https://github.com/rohit-gohri/redocusaurus/blob/e81229325921eaa73d60f3914a14570721f583f7/packages/docusaurus-theme-redoc/src/utils/useSpec.ts#L28
I was able to "fix" the issue by commenting out that line in my installed node_modules and setting a number value for the scrollYOffset in my config:
scrollYOffset: 60
Could this maybe be updated to detect if we have a number value configured for the scrollYOffset and not set the scrollYOffset to 0 in this case?
Could this small issue cause the page to crash?
@jeff1010322 That seems like a valid issue but probably unrelated to this ticket. That was added to fix a warning while building the website, but I guess we can remove it. Can you please open a separate issue? ( PR to remove it also works 🙂 )
@cptpiepmatz Are you using the React component directly? Can you post a small reproduction?
I'll see if I can come up with a small implementation that breaks
@cptpiepmatz the issue you were getting was also reported here #174 and is fixed in the latest version.
The original issue is also no longer happening
While reloading the page or building the redoc pages I get the warning:
scrollYOffset value is a selector to non-existing element. Using offset 0 by default
I have not changed anything in the theme configuration.
Maybe this happens because my navbar is not constant but built by reading in a .json file synchronously.
This is how it should look like and is seen if I use the dev server or switch from another page to the api docs:
And this is how it happens to look after reloading: