Click spark Updated#961
Closed
R1SH4BH81 wants to merge 13 commits into
Closed
Conversation
|
@R1SH4BH81 is attempting to deploy a commit to the product-studio Team on Vercel. A member of the Team first needs to authorize it. |
* feat: add kinetic-text component * fix: address pr feedback * fix: correct component source * fix: undo backlight sidebar move * fix(kinetic-text): forward native props and allow style variable overrides * docs(kinetic-text): align as prop type docs with implementation * fix(kinetic-text): prevent rest props from overriding internal styles * docs(kinetic-text): align as prop type docs and format mdx --------- Co-authored-by: Abdimajid Shire <abdimajid.ms99.com> Co-authored-by: Jinho Yeom <pwlsghq@naver.com>
Member
|
@R1SH4BH81
Happy to re-review 🙏 |
…to Click-Spark
Member
|
Looks like the rebase wasn't clean — this PR contains unrelated changes (kinetic-text). I'll close it for now and reopen with only the click-spark changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses recent code review feedback for the
click-sparkcomponent. It significantly optimizes the animation loop to prevent unnecessary CPU/battery usage, fixes registry dependency imports, and completely modernizes the component's interactive demo.Changes
requestAnimationFrameloop inclick-spark.tsxwhen there are no active sparks to save CPU and battery, automatically resuming on new clicks.click-spark-demo.tsxaesthetic. Removed the basic button and replaced it with a premium, sleek silver gradient typography (Interactive Spark) to better showcase the effect.@magicui/dot-patternfrom theregistryDependenciesinclick-spark-demo.jsonandregistry-examples.ts.click-spark.mdxto correctly point toadd @magicui/click-spark.useRefto remove unnecessary re-renders and fixuseEffectexhaustive-deps warnings.Motivation
The previous implementation kept
requestAnimationFramerunning infinitely at 60fps even when the screen was empty, causing unnecessary background processing and battery drain. The demo component was also visually basic and didn't align with the premium aesthetic of the library. Lastly, the registry dependencies and docs contained minor inaccuracies that would confuse users during installation.Breaking Changes
None. The component's props and usage remain entirely backwards compatible.
Screenshots