Skip to content
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

Update dependency react-scan to ^0.1.0 #5506

Merged
merged 1 commit into from
Jan 21, 2025
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 19, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-scan (source) ^0.0.54 -> ^0.1.0 age adoption passing confidence

Release Notes

aidenybai/react-scan (react-scan)

v0.1.0: React Scan v0.1.0

Compare Source

React Scan 0.1.0

React scan 0.1.0 has arrived, with it comes new features, performance improvements, and stability improvements:

  • Re-architected outline drawing w/ Offscreen Canvas to eliminate cases react-scan would appear choppy under high cpu load
  • Introduces an improved "whats changed" view to component inspector, which provides exactly what data changed inside a component that caused a re-render
  • Added the ability to copy the props and state of a component you are inspecting to clipboard
  • When enabling/disabling react-scan through the toolbar, the selection will persist across page reloads, preventing react-scan from unintentionally re-enabling
  • No longer draw outlines around the part of the component that is not visible
    • This change is noticeable when components re-render inside of scroll areas
  • Reduced time spent by react scan to detect renders by 2x
  • Condensed react-scan toolbar UI to lower footprint on websites
  • Improved UI and animation consistency of toolbar

Removals:

Options:
  • playAudio
  • maxRenders
  • renderCountThreshold
  • resetCountTimeout
  • report
  • alwaysShowLabels
  • smoothlyAnimateOutlines
  • trackUnnecessaryRenders
To be added back in a future release
  • withScan
  • playAudio

Offscreen canvas

On the previous version of react-scan, we would draw all outlines on the main thread when we detected component renders. When the main thread became blocked due to large tasks (for example, lots of components re-rendering), we would not be able to complete ongoing render outline animations, giving the appearance of the outlines "freezing".

We now perform all drawing and animations on a separate thread using the Offscreen Canvas worker API. This allows us to smoothly complete our animations even if the main thread is completely blocked.

Whats changed

Our new version of what's changed will allow you to track all changes happening inside a component when selected using the component selector tool on the toolbar.

After detecting the state/props/context changes, we will tell you exactly what part of the data changed, and if the previous and current states are structurally the same. image

Copying props/state to clipboard

Hover over the value you want to copy in the component inspector and click the copy icon, the value will be copied to your clipboard

Enabling disabling persisting

We don't want react-scan to get in your way, so we will persist the toolbar enabled/disable state of the react-scan outlines to your local storage, and always give that precedence over your local react-scan configuration when using the toolbar

Improved react scan render detection

We've modified our render detection logic to run less code unrelated to tracking if a component instance re-rendered, and instead deferring the unrelated computation to when the browser is under less load. This, along with minor lower level optimizations, results in a ~2x speed up in the code react scan runs every time your components re-render.


Configuration

📅 Schedule: Branch creation - "on sunday before 6:00am" in timezone UTC, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Jan 19, 2025
Copy link

vercel bot commented Jan 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-database ✅ Ready (Inspect) Visit Preview Jan 19, 2025 1:13am
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 19, 2025 1:13am

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jan 19, 2025
@lobehubbot
Copy link
Member

👍 @renovate[bot]

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

Copy link

codecov bot commented Jan 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.63%. Comparing base (8c02412) to head (bc34a12).
Report is 29 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main    #5506     +/-   ##
=========================================
  Coverage   92.63%   92.63%             
=========================================
  Files         639      639             
  Lines       56065    56065             
  Branches     2892     4246   +1354     
=========================================
  Hits        51936    51936             
  Misses       4129     4129             
Flag Coverage Δ
app 92.63% <ø> (ø)
server 97.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lobehubbot
Copy link
Member

❤️ Great PR @renovate[bot] ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.47.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

gecsp pushed a commit to gecsp/lobe-chat that referenced this pull request Jan 22, 2025
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file released size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants