The discount edit form works some dark magic to render the offer type selection radio buttons element and get the offer's fields to appear to the right of the radio buttons list. This aggressive floating causes issues for offer types that have a large number of fields, such as the BOGO offers enabled by https://www.drupal.org/project/commerce_discount_extra. It's also just unnecessary.

Instead, we can wrap all offer fields in a div and float that to the left to ensure proper positioning alongside the offer type selection radio buttons. Unfortunately, IEF currently depends on field elements being in the top level of the entity form, so we can't just attach the fields to a container. Instead we have to use a bit of a hack to wrap them using markup elements with appropriate weights.

Comments

rszrama’s picture

Status: Active » Needs review
StatusFileSize
new3.44 KB

Patch attached.

rszrama’s picture

Status: Needs review » Fixed

Thought I might wait to give the testbot a chance to fail again, but I'm just going to commit this. ; )

rszrama’s picture

(Ok, fwiw, I'm waiting on a confirmation at #2099277-5: Move git services to new git servers before I reset my keys and push the commit up.)

  • rszrama committed 6daa5c0 on 7.x-1.x
    Issue #2532554 by rszrama: Remove aggressive floating on inline offer...

  • rszrama committed bc561d1 on
    Issue #2532554 follow-up by rszrama: make the styling of the offer type...
joelpittet’s picture

@rszrama there is a scss folder. I'm going to have to transpose your fixes back to sass.

joelpittet’s picture

Status: Fixed » Active

Re-opening this and will post and commit the fixes.

joelpittet’s picture

Status: Active » Needs review
StatusFileSize
new18.21 KB

Here's the same effective CSS output through SASS. Put in a readme.md for how to compile the CSS.

And still that SASS needs some love still, there is way too much nesting going on.

  • joelpittet committed ab81c08 on 7.x-1.x
    Issue #2532554 by rszrama, joelpittet: Remove aggressive floating on...

Status: Needs review » Needs work

The last submitted patch, 8: remove_aggressive-2532554-8.patch, failed testing.

joelpittet’s picture

Status: Needs work » Fixed
rszrama’s picture

Shoot, I had no clue. Thanks for the assist!

  • joelpittet committed d78e3eb on 7.x-1.x
    Issue #2532554 by joelpittet: Remove aggressive floating on inline offer...

The last submitted patch, 1: 2532554.offer_fields_wrapper.patch, failed testing.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.