-
Notifications
You must be signed in to change notification settings - Fork 12
feat: multi-column form layout with column stacking #119
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1ddf208
feat(FormField): add row_index and column_index for multi-column layout
harshtandiya 0d07966
feat(store): add layout helpers and useGroupedRows composable
harshtandiya 6196777
fix(store): guard addFieldFromDoctype, validate membership in move he…
harshtandiya fe603e5
feat(builder): row-based canvas render using groupedRows
harshtandiya dc26994
fix(builder): stable v-for keys and restore row vertical spacing
harshtandiya c86f145
feat(builder): restore drag-and-drop with nested vuedraggable
harshtandiya ed581cd
feat(FormBuilder): row drop zones, eject-to-row, and layout fixes
harshtandiya a70f607
feat(FormBuilder): hover highlight on drop zones, hide bottom zone wh…
harshtandiya 8c549c4
feat(FormRenderer): row-based render with mobile stacking
harshtandiya e604184
feat(layout): column stacking via cell_index third axis
harshtandiya 63f9774
fix(FormBuilder): preserve last-row drag, polish drop zones
harshtandiya 0a08d09
fix(FormBuilder): sleek drop zones, no layout shift on drag
harshtandiya 5ac526b
fix(FormBuilder): scope drop zone transitions, respect reduced-motion
harshtandiya 5fa91cf
fix(FormBuilder): smooth drag reorder via SortableJS animation
harshtandiya daea882
feat(FormBuilder): add data-* test hooks and force pointer-event fall…
harshtandiya ac3969f
test(e2e): cover row/column/cell layout flows
harshtandiya 8b769bd
docs(patch): note backfill predicate handles Int NOT NULL DEFAULT 0
harshtandiya 5f179c4
fix(FormBuilder): address review feedback on layout edges
harshtandiya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import frappe | ||
|
|
||
|
|
||
| def execute(): | ||
| """ | ||
| Backfill row_index / column_index on existing FormField records. | ||
| Each field becomes its own single-column row, preserving vertical order. | ||
| Uses direct SQL to avoid triggering Form.on_update / set_doctype_fields(). | ||
| Idempotent: WHERE clause skips already-correct rows. | ||
| """ | ||
| # row_index / column_index on `tabForm Field` are Int NOT NULL DEFAULT 0 | ||
| # (Frappe's schema sync). Legacy rows pre-dating these columns therefore | ||
| # land on 0 after migration, not NULL — so a plain `!=` predicate is | ||
| # enough. No IS NULL branch needed. | ||
| frappe.db.sql(""" | ||
| UPDATE `tabForm Field` | ||
| SET row_index = idx - 1, column_index = 0 | ||
| WHERE row_index != idx - 1 OR column_index != 0 | ||
| """) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.