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.
This pull request introduces drag-and-drop functionality enhancements for the form builder, including improved styling, error handling, and better user experience. Key changes include adding visual placeholders, handling errors during sorting operations, and ensuring smooth interactions across different sortable elements.
Drag-and-Drop Styling Enhancements:
.sort-placeholderclass with dashed borders, background color, and minimum height for better visual feedback during drag-and-drop operations in the form builder. (app/assets/stylesheets/site.scss, app/assets/stylesheets/site.scssR373-R390).drag-handleclass with appropriate cursor styles (move,grab,grabbing) for a more intuitive drag-and-drop experience. (app/assets/stylesheets/site.scss, app/assets/stylesheets/site.scssR373-R390)Improved Sortable Initialization and Error Handling:
.questions,.question-options,.sorting-div) with robust error handling to catch and log failures during setup. (app/views/components/forms/edit/_builder.html.erb, app/views/components/forms/edit/_builder.html.erbR262-R361)app/views/components/forms/edit/_builder.html.erb, app/views/components/forms/edit/_builder.html.erbR262-R361)User Experience Improvements:
app/views/components/forms/edit/_builder.html.erb, app/views/components/forms/edit/_builder.html.erbR262-R361)app/views/components/forms/edit/_builder.html.erb, app/views/components/forms/edit/_builder.html.erbR262-R361)