docs icon indicating copy to clipboard operation
docs copied to clipboard

Fix links and right section missmatch

Open andreivladbrg opened this issue 1 year ago • 5 comments

If you go to either of these links:

  1. https://docs.sablier.com/concepts/protocol/stream-types#unlock-linear
  2. https://docs.sablier.com/concepts/protocol/stream-types#unlock-cliff

both will direct you to the Exponential or Cliff Exponential shape instead

Unlock Linear Unlock Cliff
Unlock Linear Shape Unlock Cliff Shape

The issue affects all links, as each one simply directs you to the shape above with some levels. I’m not sure what causes this or how to fix it.

andreivladbrg avatar Oct 28 '24 13:10 andreivladbrg

Huh. Interesting.

It might be a bug in Docusaurus. Upgrading to the last version might fix this.

PaulRBerg avatar Oct 28 '24 17:10 PaulRBerg

This issue is linked with the load time of the function plots. Since plots are generated after the page has been loaded, this leads to the page to reset itself, and move the view either up or down.

To fix this, what if we replace the dynamically generated plots with their .webp images? For example, if you visit https://docs.sablier.com/guides/lockup/etherscan#step-1-go-to-contract-page-1, you'll notice that images load very quickly, and you land on the expected section.

smol-ninja avatar Jan 24 '25 16:01 smol-ninja

This issue is linked with the load time of the function plot

nice finding

what if we replace the dynamically generated plots with their .webp images

it would fix this, but doing so would make it harder to make changes as we would need to (i) update the plot code (ii) take a screenshot of it and (iii) upload the new screenshot plot.

if there is no other fix to keep the current method, i guess we should go for images

andreivladbrg avatar Jan 24 '25 16:01 andreivladbrg

it would fix this, but doing so would make it harder to make changes as we would need to (i) update the plot code (ii) take a screenshot of it and (iii) upload the new screenshot plot.

I agree but its a one time job per release. Also, we should still keep the plot code somewhere in the docs to reuse it but avoid publishing it directly on the stream shape page.

smol-ninja avatar Jan 24 '25 16:01 smol-ninja

in Docusaurus, it is possible to have unlisted documents.

PaulRBerg avatar Jan 28 '25 14:01 PaulRBerg