themovation / th-widget-pack

Theme Widget Pack
19 stars 6 forks source link

New wrapper div for our custom styling for all our custom widgets. #20

Closed ryanlabelle closed 7 years ago

ryanlabelle commented 8 years ago

Can we inject a container above 1st panel-grid-cell and below, panel-row-style?

It would look like this:

<div class=’th-so-container’>

adiraoco commented 8 years ago

Is this the format you would like?

<div class='th-so-container'>
    <div class='panel-grid-cell'>
        <!-- Some themovation widgets -->
    </div>
</div>
ryanlabelle commented 8 years ago

That's right, how you have it is perfect.

adiraoco commented 8 years ago

Implemented in ee999634e85278a5bb34f87151f5983c033ba832

ryanlabelle commented 8 years ago

@teaganm When you are in there next can you confirm this is working as you need it to? Cheers.

teaganm commented 8 years ago

Hi Adi, I just had a look and the placement of the element is good.

What I'm seeing though is the .th-so-container element is being output once for each Themovation widget that is present in a row, so if there are 3 widgets, it's added 3 times: http://grab.by/RlkQ - we'd just like it to appear once only in each row.

Also, right now it looks like the .th-so-container element is only output if a Themovation widget is present in the row. We would like it to always be output once regardless.

Let me know if you have any questions about that. Thank you!

adiraoco commented 8 years ago

@teaganm thanks for pointing out the bug. I'll fix it.

adiraoco commented 8 years ago

@teaganm I have fixed the bugs. Please have a look and let me know if everything is fine now. Thanks.

teaganm commented 8 years ago

Thanks Adi. This is what I'm seeing now:

<div class="panel-grid">
    <div class='th-so-container'>
        <div class='panel-grid-cell'>
            <!-- widget 1 -->
        </div>
    </div>
    <div class='th-so-container'>
        <div class='panel-grid-cell'>
            <!-- widget 2 -->
        </div>
    </div>
</div>

We would like it just once wrapping all columns instead:

<div class="panel-grid">
    <div class='th-so-container'>
        <div class='panel-grid-cell'>
            <!-- widget 1 -->
        </div>
        <div class='panel-grid-cell'>
            <!-- widget 2 -->
        </div>
    </div>
</div>
adiraoco commented 8 years ago

Oh Ok. I thought it was for each .panel-grid-cell. I'll make the change. :)

adiraoco commented 8 years ago

@teaganm fixed it. Please have a look and let me know. Thanks

teaganm commented 8 years ago

Thanks Adi. Looks good, there's just one last thing. We want the container to be inside the panel row style element.

Right now I'm seeing this:

<div class="panel-grid">
    <div class='th-so-container'>
        <div class="th-full-width panel-row-style">
            <div class='panel-grid-cell'>
                <!-- widget 1 -->
            </div>
            <div class='panel-grid-cell'>
                <!-- widget 2 -->
            </div>
        </div>
    </div>
</div>

What we would like is this:

<div class="panel-grid">
    <div class='th-full-width panel-row-style'>
        <div class="th-so-container">
            <div class='panel-grid-cell'>
                <!-- widget 1 -->
            </div>
            <div class='panel-grid-cell'>
                <!-- widget 2 -->
            </div>
        </div>
    </div>
</div>
ryanlabelle commented 8 years ago

Fixed https://github.com/ryanlabelle/themovation-so-widgets-bundle/commit/4dc7baac2b3d8cc45a46a62b602a161cf4384a70

teaganm commented 8 years ago

Hi Adi, in my testing recently I noticed that there is an issue to do with how the 'th-so-container' element is added on sections that are full width (versus full width stretched).

Since it's added with JS, when the page loads initially there is a flash where the content appears totally full width: example

And then it corrects itself to appear how it should: example

Also we're thinking that if there happens to be a JS issue elsewhere on the page it could prevent the container from being added. Do we have another option for this? It would be ideal if we could add it in via PHP.

teaganm commented 8 years ago

I am also seeing another issue which is somewhat related: when I create a page and add a row, the default should be that it shows up 'full width' inside the container, instead of 'full width stretched'. So the elements 'panel-row-style' and 'th-so-container' should be output but are not: example

In order for it to appear that way, I have to go Edit Row, and then under Layout, change the Row Layout select box to "Full Width Stretched", then click Done, and then go back and set it to "Full Width", and then click Done and save the page.

Then the elements show up: example

Can we change that?

adiraoco commented 8 years ago

@teaganm adding elements with PHP would be ideal. I'll try to get it done.