Skip to content

Conversation

surajshetty3416
Copy link
Member

@surajshetty3416 surajshetty3416 commented Mar 29, 2025

  • After updating Chrome, canvas zoom suddenly started appearing choppy. This is a Chrome-specific issue since it worked fine in Firefox and used to work fine in the previous Chrome version. After some trial-n-error & investigation, I found that the combination of complex box-shadow + border-radius + scale change is computationally very heavy for Chrome renderer, so for now I chose to remove border-radius to fix the choppy zoom issue.

    Before:
    (on chrome 134+)

    Screen.Recording.2025-03-29.at.2.17.03.PM.mov

    After:

    Screen.Recording.2025-03-29.at.2.15.25.PM.mov
    • Remove throttle for updateDropTarget (it anyway is not making any network call or CPU heavy work and also there is a check to avoid unnecessary DOM updates) because it sometimes used to trigger updateDropTarget after drop event which used leave isDragging: true. This prevented the editor resizer from appearing after the drop.

    Before:

    Screen.Recording.2025-03-29.at.2.43.50.PM.mov

    After:

    Screen.Recording.2025-03-29.at.2.44.38.PM.mov
    • Track index changes of dropTarget to properly update editor position of selected block while dragging a component over selectedBlock.

    Before:

    Screen.Recording.2025-03-29.at.2.57.05.PM.mov

    After:

    Screen.Recording.2025-03-29.at.2.56.38.PM.mov

Other fixes:

  • Fixed code editor and input default. It used to show default value such as false or null. This issue got introduced after refactor(store): Split store into more logical and smaller stores #327
  • Perf: Use raw version on block while resetting with component to avoid unnecessary updates while resetting block
  • Set height of image in hero block template so that on replacing image in it after drop, dimension of the image remains almost same

This fixes zoom lag in new chrome browser. Apparenlty, combination of border-radius + box-shadow + css scale change is computationally very heavy for chrome browser (Although, it works well on Firefox and used to work in old chrome browser)
To avoid unnecesary updates while resetting block
- Since it sometimes used to trigger updateDropTarget after drop event which used leave isDragging: true. This prevented the editor resizer from appearing after the drop.
- Also, refactored code a bit to avoid unnecessary DOM updates
So that on replacing image after drop, dimension of the image remains almost same
@surajshetty3416 surajshetty3416 merged commit 7384481 into develop Mar 29, 2025
3 checks passed
Copy link

codecov bot commented Mar 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.61%. Comparing base (4d7648c) to head (9653931).
Report is 7 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #334   +/-   ##
========================================
  Coverage    41.61%   41.61%           
========================================
  Files           16       16           
  Lines         1139     1139           
========================================
  Hits           474      474           
  Misses         665      665           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@surajshetty3416
Copy link
Member Author

🎉 This PR is included in version 1.16.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@surajshetty3416 surajshetty3416 deleted the misc-fixes-mar-25 branch June 4, 2025 02:26
surajshetty3416 added a commit that referenced this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant