Toggle visibility bug?

Hi!
I am using blocs 4.1.0 to create a website with “show more” and “show less” buttons. I have used them successfully in the past with text, but I think I have found a bug when using columns. I have been giving the buttons the toggle visibility property and assigned them the id’s of a set of columns. After exporting I found that when you clicked the “more” button the first time it created an odd (and undesired) gap between the rows of revealed columns. (The columns were structurally within the same row, but they wrapped around to form multiple visual rows). Clicking the less button and then the more button fixed the problem, but it came back every time the page was refreshed. This problem becomes even more complicated when you elect to have the some visible columns mixed in among the hidden ones. I have attached a sample blocs file where I have isolated the problem. Am I missing something obvious? Or misunderstanding the program? Or have I found a bug? Thank you for your time!

From
Lukas Harvey

moreButtonTest.bloc (200.8 KB)

Hi @Dragonfly. To me that’s definitely a glitch in Blocs. Make sure you report it here: Reporting Bugs – Blocs – User Documents

Hey,

Thats not a bug, just a side effect with the way you are styling those columns. I wouldn’t use min-max percentages to set the width of a column. You really need to use the bootstrap column of 12 to set the columns.

Eg. if you remove the columns class, and then set a width of 4 for each column it works fine.

If you wanted to use percentages, wrap all the videos in a div and use flex.

2 Likes

Hi @PeteSharp, I’m starting to read more and more about Flex - what would be your best ‘go-to’ place for learning more about it (and maybe how to work within Blocs)?

Hey @TrevReav,

I did an overview of using Flex in Blocs when Blocs 4 launched. You can watch it here

2 Likes

Perfect, thank you sir!

1 Like

Thank you for all the responses! It’s really good to have so many viewpoints on this. I hadn’t heard about flex before. I will have to do some research on that.

Good catch Pete :slight_smile:

Hi @PeteSharp!
I had not heard of flex before (I would like to use the min max method). I’ve watched the video you linked to later in this thread but I’m having trouble following through. Could you elaborate on how to incorporate this tool into my website?