Repository navigation
feat: add a Checkbox template - #997
SmrutiSawant wants to merge 8 commits into
Conversation
Input, textarea and select fields now show Name and Required in Input Options, so you no longer have to set them in HTML Attributes. These settings read customAttributes first, where the form templates keep them, and keep both copies in sync when edited, since published pages let customAttributes win. Type is hidden on textareas and selects, and Placeholder on selects, where they do nothing. The Label template's input now has the id its label points at.
[Medium impact] The PR appears safe to merge, with a non-blocking issue around hidden dynamic values. Reviews (2) · Last reviewed commit: "fix: let labels that wrap blocks accept ..." · Reviewed by Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #997 +/- ##
===========================================
+ Coverage 76.07% 76.19% +0.12%
===========================================
Files 131 131
Lines 13405 13435 +30
===========================================
+ Hits 10198 10237 +39
+ Misses 3207 3198 -9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| if (!blockController.isBlockSelected()) return false; | ||
| // null marks an inherited attribute the instance removed, so it gets no row | ||
| const customAttributes = blockController.getFirstSelectedBlock().getCustomAttributes(); | ||
| return Object.fromEntries(Object.entries(customAttributes).filter(([, value]) => value !== null)); |
There was a problem hiding this comment.
Hidden attributes still use data
Clearing an inherited attribute with a dynamic value now hides its row from HTML Attributes, but leaves that value active. The renderer can add the attribute back, while the panel no longer shows why. Remove the dynamic value before hiding the row, or keep bound rows visible.
Knowledge Base Used: Property and style editing
Prompt To Fix With AI
This is a comment left during a code review.
Path: frontend/src/utils/blockController.ts
Line: 203
Comment:
**Hidden attributes still use data**
Clearing an inherited attribute with a dynamic value now hides its row from HTML Attributes, but leaves that value active. The renderer can add the attribute back, while the panel no longer shows why. Remove the dynamic value before hiding the row, or keep bound rows visible.
**Knowledge Base Used:** [Property and style editing](https://app.greptile.com/frappe/-/custom-context/knowledge-base/frappe/builder/-/docs/property-and-style-editing.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Tick the box to add this pull request to the merge queue (same as
|
What
Adds a Checkbox to Form parts.
When you select the checkbox, you can set:
Demo:
checkbox.mp4