Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
User experience
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
17 Mar 2016 at 16:28 UTC
Updated:
23 Apr 2016 at 16:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
bojanz commentedRelated core issue: #2675464: Margin on form-items in table rows (Classy)
Comment #3
mglamanComment #4
mglamanPR https://github.com/drupalcommerce/commerce/pull/3
Comment #5
bojanz commentedNeeds its own library, we have no need to reuse/abuse the product add/edit form CSS here, it's unrelated.
We also need an IEF patch to improve the margins between elements, as detailed in the #2 core issue.
Comment #6
mglamanUpdated patch
Comment #8
bojanz commentedYour comment in #2675464: Margin on form-items in table rows (Classy) led me to the right path. You said:
And you're right. I expected the drag handle to be in its own td, but it's not.
Looking into the core code I realized that the handle is always added to the first existing cell, a new cell is not created.
Sharing a cell works only if the existing content fits in one line. Ours doesn't.
WidgetBase accounts for this by adding an empty cell to each row, which then receives only the tabledrag, keeping the widget form in its own cell.
I've replicated the same approach here:
https://github.com/drupalcommerce/commerce/commit/e52fbfe03e305421905243...
Attaching a screenshot.