-
Notifications
You must be signed in to change notification settings - Fork 279
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: Bring back the demo #958
Conversation
Codecov Report
@@ Coverage Diff @@
## main #958 +/- ##
==========================================
- Coverage 62.82% 62.75% -0.07%
==========================================
Files 62 62
Lines 7857 7889 +32
Branches 1821 1842 +21
==========================================
+ Hits 4936 4951 +15
- Misses 2797 2814 +17
Partials 124 124
Continue to review full report at Codecov.
|
Deploying with Cloudflare Pages
|
This comment was marked as resolved.
This comment was marked as resolved.
@samestep IIRC, the demo was removed only because it wasn't working at that time and we had to get the docs-site published. So, probably just unfortunate timing. I think, generally, everyone was in favor of an animated demo as long as it worked, loaded fast, and looked nice. |
@cmumatt OK, makes sense! Thanks for the clarification. |
This comment was marked as resolved.
This comment was marked as resolved.
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.
Looks great. Thanks again for going through all the pain to find out what went wrong!!
@wodeni You helped quite a bit too! |
Description
This PR reenables the homepage demo which was added in #882 and then removed in #916. I don't remember the exact reasoning for removing the demo before; @cmumatt could you comment on this? If the problem is simply that the text should be tweaked, I can do that in this PR, I just wasn't sure exactly what needed to change.
In any case, now that #904 has made a
@penrose/examples
package available to@penrose/docs-site
, we can simply use the more sophisticated trio we show in the README as of #955. The animation is pretty fun to watch, in my opinion.Finally, thanks to @wodeni, this PR also adds dark mode support to the demo.
Implementation strategy and design decisions
Docusaurus doesn't seem to correctly handle the spread operator for ES6 iterators. Specifically, given this:
it assigns this to
foo
:And it translates this:
into this:
These are very wrong, and they cause things to break when we use
@penrose/core
or@penrose/components
in@penrose/docs-site
. To fix this, I replaced this pattern withArray.from
throughout our entire codebase.Checklist
diagrams/
folder