Skip to content

fix: remove clientScript from page's block json - #663

Merged
surajshetty3416 merged 2 commits into
frappe:developfrom
stravo1:component-client-script-fix
Jul 11, 2026
Merged

fix: remove clientScript from page's block json#663
surajshetty3416 merged 2 commits into
frappe:developfrom
stravo1:component-client-script-fix

Conversation

@stravo1

@stravo1 stravo1 commented Jul 10, 2026

Copy link
Copy Markdown
Member

Before this the component's clientScripts would be duplicated in the page's block JSON instead of being extended from the component block itself.

This PR fixes that and makes the clientScript attribute behave similar to how all other block attributes behave when extended from a component — not present in block JSON unless overridden.

@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5

Logic is correct and the migration path handles both legacy and new data formats safely.

The clientScript reset + conditional merge in extend_block correctly mirrors how other attributes are handled. The legacy migration uses a falsy check so an empty {} still triggers it. No data-loss or incorrect-merge path identified.

No files require special attention.

Reviews (2): Last reviewed commit: "fix: handle case where both legacy and c..." | Re-trigger Greptile

Comment thread builder/builder/doctype/builder_page/builder_page.py
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.54%. Comparing base (518e9e7) to head (5880b22).

Files with missing lines Patch % Lines
...ilder/builder/doctype/builder_page/builder_page.py 60.00% 4 Missing ⚠️
...der/doctype/builder_component/builder_component.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #663   +/-   ##
========================================
  Coverage    56.53%   56.54%           
========================================
  Files           34       34           
  Lines         4109     4119   +10     
========================================
+ Hits          2323     2329    +6     
- Misses        1786     1790    +4     

☔ View full report in Codecov by Harness.
📢 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.

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@stravo1
stravo1 requested a review from surajshetty3416 July 10, 2026 18:53
@surajshetty3416
surajshetty3416 merged commit 7798234 into frappe:develop Jul 11, 2026
9 of 11 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.30.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants