Skip to content

fix(Block Props): improved implementation of getPropValue#525

Merged
surajshetty3416 merged 6 commits intofrappe:developfrom
stravo1:fix-get-prop-value
Mar 31, 2026
Merged

fix(Block Props): improved implementation of getPropValue#525
surajshetty3416 merged 6 commits intofrappe:developfrom
stravo1:fix-get-prop-value

Conversation

@stravo1
Copy link
Copy Markdown
Member

@stravo1 stravo1 commented Mar 19, 2026

Previously dynamic props which came from other props (not Block Data Script or Page Script) were not resolved properly.

Also, now with blockUidStore, we no more need to pass getDataScriptValue, getBlockDataScriptValue, defaultProps to getPropValue, it can infer those automatically.

getParentProp now provides traceback as to which props come from which parent (grandparent) blocks.

Misc fixes:

  • allResolvedProps would behave unexpectedly if resolved before the BuilderBlock was mounted, fixed that along with the new implementation of getPropValue
  • somehow we deleted the opposite of what was required (BuilderBlock.vue - Line 182)
  • using separate watchEffects for the three properties, keeping all in one sometimes caused loops.

@stravo1 stravo1 requested a review from surajshetty3416 March 19, 2026 07:37
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.52%. Comparing base (476dbf1) to head (b1dab57).
⚠️ Report is 25 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #525   +/-   ##
========================================
  Coverage    63.52%   63.52%           
========================================
  Files           27       27           
  Lines         2794     2794           
========================================
  Hits          1775     1775           
  Misses        1019     1019           

☔ 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 surajshetty3416 merged commit c8cb5fe into frappe:develop Mar 31, 2026
10 checks passed
@surajshetty3416
Copy link
Copy Markdown
Member

@mergify backport master

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 31, 2026

backport master

✅ Backports have been created

Details

Cherry-pick of fcc5ba5 has failed:

On branch mergify/bp/master/pr-525
Your branch is up to date with 'origin/master'.

You are currently cherry-picking commit fcc5ba5.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   frontend/src/components/BlockHTML.vue
	modified:   frontend/src/components/BuilderBlock.vue
	modified:   frontend/src/components/Controls/DynamicValueHandler.vue
	modified:   frontend/src/components/TextBlock.vue
	modified:   frontend/src/utils/helpers.ts

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   frontend/src/components/Controls/CodeMirror/CodeMirrorEditor.vue

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

surajshetty3416 added a commit that referenced this pull request Mar 31, 2026
fix(Block Props): improved implementation of `getPropValue` (backport #525)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants