sycamore
sycamore copied to clipboard
Book (website) routing not properly updating
Describe the bug
When navigating to a new page in the Book, there is sometimes what seems to be a race-condition which causes the following visual bug to happen:
Relevant Discord discussion
To Reproduce Steps to reproduce the behavior:
- Go to https://sycamore-rs.netlify.app/docs/getting_started/hello_world
- Click on another page from the sidebar, e.g. "Hello World!"
- (Maybe) observe the visual bug.
Environment
- Sycamore: 0.9.0-beta.2, current master (16acf8e)
- Browser: Edge 119
It seems that the book works normal now. Edge Version 121.0.2277.4 (Official build) stable app, beta channel (64-bit)
The annoying part is that I'm only able to reproduce this sometimes and always when I think I've solved the issue. So I'll leave this open for now until I'm more certain that it's fixed.
I can consistently reproduce on Chromium: 122.0.6261.69:
- navigate to https://sycamore-rs.netlify.app/ (navigating directly to the home page or reloading on the homepage if I come from another page)
- press either
- "Get Started" button in the middle of the page
- "Book" menu at the top
- Navigating within the docs with the links now creates rendering issue, as well as scrolling the left-side menu
- reloading the page while in the docs fixes the rendering
Left side menu scrolling issue:
Also once in the docs (after a reload) clicking on a latest version link ("For up-to-date documentation, see the latest version (v0.8).") restarts the rendering issue, again reloading the page afterwards fixes it.
I can reproduce on Firefox 123.0 for MacOS.
When I clicked 'Get Started', the <div class="flex w-full"> tag was created twice.
The website updates only the second <div class="flex w-full">tag and leaves the others unchanged after I clicked a link on the navigation.
In addition to, right-side menu for 'Getting Started' was overwritten by one for 'Basics'
https://github.com/sycamore-rs/sycamore/assets/29543842/88296866-c9f8-4847-8a38-6e930eb5729c
I can reproduce on Firefox 123.0 for MacOS.
When I clicked 'Get Started', the
<div class="flex w-full">tag was created twice. The website updates only the second<div class="flex w-full">tag and leaves the others unchanged after I clicked a link on the navigation. In addition to, right-side menu for 'Getting Started' was overwritten by one fo
Ah thanks for digging into this. Apologies I've just been really busy with other things lately so haven't even gotten a chance to look at this. But this does make it clearer what went wrong!
Ok another test case, starting on one of the doc pages and clicking on the logo in the top-left doesn't seem to work either.
Clicking on the "News" also works like clicking on the logo.
https://github.com/sycamore-rs/sycamore/assets/29543842/7f004313-798d-4491-803a-bea0eda424e3
Since we now have a new docsite, this issue is no longer relevant.