Giter VIP home page Giter VIP logo

Comments (12)

bobbingwide avatar bobbingwide commented on June 23, 2024

OK. I have no idea what I need to do in order to get the ability to choose Wide or Full width and what these Layout settings are.

image

Additionally, the Categories block below Structured Breakdown has encountered an error.

from sb.

bobbingwide avatar bobbingwide commented on June 23, 2024

I give up for tonight. Tomorrow have a look at WordPress/theme-experiments#234. Maybe the Site Editor's hasn't been updated so I'll need to edit the templates and template parts manually.

from sb.

scruffian avatar scruffian commented on June 23, 2024

It looks like you aren't running the latest version of the Gutenberg plugin. You'll need to be using the latest version of trunk to get the new alignments and the "inherit default layout" option.

from sb.

youknowriad avatar youknowriad commented on June 23, 2024

We'll have to write a lot more docs about this functionality, it's still very early and being proved. Judging by your screenshot if you want to define a global "layout" config that is used in the post editor and that can be "inherited" in the site editor containers, you'll have to define it in your experimental-theme.json default settings section, it doesn't look like it's the case in that screenshot.

from sb.

bobbingwide avatar bobbingwide commented on June 23, 2024

I still had "custom" in the experimental-theme.json file. Removing that enabled the toggle.
image

Now I need to understand which blocks are the ones which support the alignwide or alignfull width attribute.

from sb.

bobbingwide avatar bobbingwide commented on June 23, 2024

@scruffian I was using the latest build, just bad JSON. See the second screenshot in #5 (comment)

Here's the latest screenshot for the front end, with the [guts] shortcode expanded.
image

And here's the results with the background colour on the group block removed... the group block wasn't filling the whole of the window width. Is this expected?
But now the columns aren't full width.

image

Structure of this "Footer" template part is

Footer template part - full width with CSS defined background
  Group
    3 Columns
       Tag cloud for S-words
       Tag cloud for B-words
       Info area

Looks like I need guidance on how to set the Layout options for the Template part and Group.
I honestly don't understand the hint. "Customize the width for all elements that are assigned to the center or wide columns."

from sb.

bobbingwide avatar bobbingwide commented on June 23, 2024

So having resolved the Tag cloud problem - a temporary fix applied to stop wpautop() from running on template parts - I've now changed the align attribute on the columns block in the footer, template part page-footer.

image

It's looking better. Here's a diff of the relevant changes.

-<!-- wp:group {"align":"full","layout":{"inherit":true}} -->
-<div class="wp-block-group alignfull"><!-- wp:columns -->
-    <div class="wp-block-columns"><!-- wp:column -->
+<!-- wp:group {"layout":{"inherit":true}} -->
+<div class="wp-block-group"><!-- wp:columns {"align":"full"} -->
+    <div class="wp-block-columns alignfull"><!-- wp:column -->

Interpret this diff output as:

  • Remove "align:full" from the Group block
  • Set "align":"full" on the Columns block

Maybe I don't need the Group block any more!

Note: You can't really tell in the Site Editor whether or not what you want is what you're going to get.

from sb.

youknowriad avatar youknowriad commented on June 23, 2024

I think the problem comes down to understanding the "layout" feature, the documentation is not yet there. If I had to define it it's something like:

  • Assigning a layout to a container (group, template part or post content block) doesn't impact it directly, it impacts its children, its means its children can be aligned wide/full and by default are centered according to its layout config.
  • In theme.json, you can define a layout config that is going to be used by default in post editor but is not going to be used at all in site editor, unless a container decides that it "inherits" that config.

from sb.

bobbingwide avatar bobbingwide commented on June 23, 2024

thanks.

from sb.

bobbingwide avatar bobbingwide commented on June 23, 2024

Well I thought I had it working. My footer columns appeared to have reverted.
image
It turns out this was the customised template part, where the Group wasn't set to Full Width alignfull.

from sb.

bobbingwide avatar bobbingwide commented on June 23, 2024

I'm not going to close this yet.
Some of the templates and template parts are including template parts with what could be unnecessary align and layout attributes.

from sb.

bobbingwide avatar bobbingwide commented on June 23, 2024

Still leaving this open even though I've delivered v0.2.1.

from sb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.