-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: add storybook and animated planet component #2
feat: add storybook and animated planet component #2
Conversation
8525ffa
to
6d8ff93
Compare
6d8ff93
to
d08ff78
Compare
d08ff78
to
6765b21
Compare
6765b21
to
4297c9d
Compare
✅ Successfully deployed static |
4297c9d
to
f3ebe15
Compare
f3ebe15
to
0d1bf72
Compare
0d1bf72
to
8dcd33a
Compare
8dcd33a
to
c35f8b5
Compare
c35f8b5
to
00e7462
Compare
00e7462
to
2b3403a
Compare
@@ -60,7 +60,7 @@ const config: Config = { | |||
position: "left", | |||
label: "Tutorial", | |||
}, | |||
{ to: "/blog", label: "Blog", position: "left" }, | |||
{ to: "#", label: "Blog", position: "left" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docusaurus detects broken links. Since we don't have /blog
and other pages yet, it won't build successfully. Changed broken links to #
for now.
scale: number; | ||
} | ||
|
||
export function useResizableSvg( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't adequately resize svg, if you use paths in it as offset-path
(motion path) for other elements. We use trail paths as motion paths for planes, so if svg with trails resizes planes would move along the wrong directory.
There are two ways to circumvent this: use transform scale
with resize observer or re-calculate paths via d3.js with resize observer. Scale seems easier and more lightweight.
This hook provides a transform scale
-based solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we use a hack to keep this planet png size below 20KB, making it extremely lightweight. In order for it to not be blurry on high-res displays we use clip-path to cut a perfect circle contour, so it appears to be high-res.
2b3403a
to
7dfd643
Compare
@shadowusr Super good! I have question about https://storage.yandexcloud.net/testplane-ci/testplane-docs/website-static/8551288637-17-1/index.html — imho there is a bug, page is duplicated. |
Yeah, that's a bug, I mentioned it in the PR description. I'm going to address it in the next PR, because it's not linked to current changes. Still not sure why this is happening. Definitely related to server side rendering (when I turn it off, page renders just fine). But the most weird thing about it is that if I serve the exact same bundle locally, page renders correctly. After uploading to S3, this happens. Not the first time, same thing happened with a different bucket and different docusaurus project. |
What's done
One issue remains — website currently displays incorrectly; page renders twice. That maybe fixed later, maybe in another PR.