Picture of Niall Deighan
Authoring tool multiple components in one block
by Niall Deighan - Monday, 15 January 2018, 10:01 AM
 

Hi all,
We are in the process of moving from the Adapt Framework to using the Adapt Authoring tool. One issue that I cannot seem to solve is that I cannot add a second component to the same block if layout for the first component is 'full'. if I copy a component I can only paste it into another empty block, or the same block if the original component is oriented to the left or right.
Is there a way I can add a second component to the same block when the layout is set to 'full', in essence stacking the components one above another in the same block?

Picture of Helen Bailey
Re: Authoring tool multiple components in one block
by Helen Bailey - Monday, 15 January 2018, 10:19 AM
 

Unfortunately a block can only contain 1 full or 2 half width components, so you'll need to give it it's own block or have it half width i'm afraid.

Picture of John Niezen
Re: Authoring tool multiple components in one block
by John Niezen - Monday, 15 January 2018, 10:44 AM
 

Hi Niall,

In the latest AT, it is very easy to switch the components in a block, or even if you already had a full width, to add another at the left or right, making them both half width.

Picture of Niall Deighan
Re: Authoring tool multiple components in one block
by Niall Deighan - Monday, 15 January 2018, 1:49 PM
 

Thanks for the responses, however this is not an ideal situation for us. What was easily achievable in the Adapt Framework is now impossible in the Authoring tool; I cannot stack two full width components in the same block. Suppose I'll have to come up with a work around. 

Picture of Helen Bailey
Re: Authoring tool multiple components in one block
by Helen Bailey - Monday, 15 January 2018, 5:20 PM
 

I can't imagine that this was even possible in the Framework (as the Authoring Tool mimics all its behaviour), but you clearly managed it - can a framework guru put me right?

Picture of Matt Leathes
Re: Authoring tool multiple components in one block
by Matt Leathes - Monday, 15 January 2018, 6:38 PM
 

Hi Helen

I think you probably can do this in the framework because, on the whole, the framework doesn't try to prevent you from doing things you shouldn't do.

The design of Adapt is very much set up around each block containing either two half-width components or one full-width, so, whilst you might be able to get away with putting two full-width components in a block under certain circumstances, I would say it's best avoided since I'm sure that in other circumstances you'd run into problems.

Picture of Niall Deighan
Re: Authoring tool multiple components in one block
by Niall Deighan - Tuesday, 16 January 2018, 11:44 AM
 

We would regularly combine two full-width components together in the same block with little trouble. With a little added css it would give the effect of showing two components as one object e.g. a graphic or video with a question below it. 
I've been working on a similar effect in the Authoring tool. Even with being limited to one component per block it was just a matter of adding some custom classes in the theme/less/src/block.less, and some clever manipulation of the pageLevelProgress and Trickle settings. It now appears to the user as a single experience.


Picture of John Niezen
Re: Authoring tool multiple components in one block
by John Niezen - Tuesday, 16 January 2018, 12:06 PM
 

Ahh, now I see where you are going.

Our team did this with our own theme, where the padding was removed if you keep the Display title of the Block or Article empty.

So more or less the same as you describe, but then in the AT.

Picture of Niall Deighan
Re: Authoring tool multiple components in one block
by Niall Deighan - Tuesday, 16 January 2018, 12:16 PM
 

Yes John, this screenshot is the css workaround I applied to the authoring tool. I spent longer trying to figure out a way to go with the 'framework method' we used before, when all it needed was a decrease in padding and a unified background colour. Ta-daa!

Picture of Barry Jenkin
Re: Authoring tool multiple components in one block
by Barry Jenkin - Wednesday, 24 January 2018, 2:31 AM
 

In the authoring tool I've been able to create 2 vertical-stacked components in a single block by opening the same page editor in two browser tabs (in Chrome at least).

Open an empty block and make sure it's appearing in both browser tabs. Add a component to the block in one tab, then without refreshing add your second component to the empty block in the 2nd tab. Hit refresh (on either) and the components should appear vertically stacked in the block.