• Resolved Floris

    (@florismk)


    My site design has white text on a dark background.

    I’m trying to see if Content Randomizer can create a random-order bulleted list. I’ve added the block to one of my pages.

    In admin, the plugin seems to respect the selected font color –> white, but not the bg color –> also white. The result is that CR presents as a smooth white rectangle, in which I cannot see what I’m doing when I add blocks. In the test page, you can see I managed to add some test bullets, but I cannot read what I typed in the editor.

    How can I get the CR block to respect my styling, so I can actually see what I’m doing?

    The page I need help with: [log in to see the link]

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Slava Abakumov

    (@slaffik)

    Hm, my plugin can’t randomize all the list item inside the ordered list – it can randomize the lists (if you have multiple).

    For this to work, you will need to create like 5 ordered blocks, each having 1 item in the list. And then on the front-end Block Randomizer will pick one list (which has 1 list item within) and display it. I hope this makes sense.

    And regarding the styling – I’m not sure I understand what you. Is it possible to ask you to create screencast (video demostrantion) of what you see and/or want to achieve?

    Content Randomizer (CR) plugin itself does not apply any styling to the items on the front-end (it’s invisible at all, no traces in HTML too), but it does have some basic styling applied in the Block Editor to the container where you add all your blocks.

    Thread Starter Floris

    (@florismk)

    Hi Slava, thanks for your quick response. What you describe is what I plan to do: add separate ul blocks to your randomiser block to see how that looks. But in the backend/admin, your randomiser block is entirely white:

    Everything works as expected: I can add blocks to the randomizer collection, and these show up in the frontend. It’s just in the backend that the randomizer block is unworkable because of the white background.

    Plugin Author Slava Abakumov

    (@slaffik)

    I see! Thank you for the screenshot, I will try to push the fix in a new version as fast as possible after some testing.

    Plugin Author Slava Abakumov

    (@slaffik)

    Hey @florismk,

    I’ve just released 1.2.1 with a fix. Does it work for you now correctly?

    Thread Starter Floris

    (@florismk)

    Hi Slava,

    That was it! Thanks for the lightspeed fix!

    Floris

    • This reply was modified 1 month, 2 weeks ago by Floris. Reason: Forgot to mark as solved
    Plugin Author Slava Abakumov

    (@slaffik)

    Great it works now properly for you!

    Let me know if you need some other features in the plugin. I have a list, but a feedback from outside is always valuable.

    Also, if you like the plugin – I would really appreciate a review here on WP.org. Thanks!

    Thread Starter Floris

    (@florismk)

    Unfortunately, when I had my three List blocks configured in the Randomizer with one LI each, and tested the page, I got the same order every time.

    I excluded the test page from caching and cleared the cache; I checked in the page code that they were really three separate UL blocks within the Randomizer block; I tried in Incognito mode; I Ctrl-F5 refreshed the page. 100% identical sort order every time, with 6 possible random orders.

    So it seems it wasn’t working for me.

    Given that consecutive UL blocks turn out to have too much spacing for my purpose anyway, and having this list in random order was not that important to me, I abandoned the attempt, and am now keeping the UL in a fixed order.

    Plugin Author Slava Abakumov

    (@slaffik)

    I’m wondering what’s going on in your setup.

    Here are my blocks: https://share.cleanshot.com/Fy7CKhVf

    On the front-end I see that list 1 or list 2 set of items are alternating (gif): https://share.cleanshot.com/R0hvq3yc

    If I remove one item from the list, I still see everything works correctly.

    Thread Starter Floris

    (@florismk)

    Watching your video, I realize that I may have been expecting something different than what Randomizer does. Your video shows clearly that either of the two UL block are displayed at random.

    My usecase is that I need random order of the UL blocks, but they should all be visible on every load. So I add multiple UL blocks, and set the Randomizer maximum to more than the number of UL blocks. Nothing is hidden.

    Is Randomizer designed to show the visible blocks in random order, or does it merely show or hide a subset at random?

    Plugin Author Slava Abakumov

    (@slaffik)

    The plugin’s main idea is to randomize the appearance (“pick 1 and hide everything else”), not the order (which is “reorder blocks”).

    But I can actually see cases were you want different order (so, display the defined in block options number of blocks in a random order). A shuffle option, basically.

    I will implement it over the weekend.

    Thread Starter Floris

    (@florismk)

    Is there any way you could support random LI order in an UL? I guess it would be rather a stretch, since Randomizer focuses on Blocks, so No would be a perfectly understandable answer. Like I said, shuffling multiple UL blocks isn’t quite ideal in terms of spacing. If not, I think I’ll throw together something myself.

    Plugin Author Slava Abakumov

    (@slaffik)

    Maybe not an immediate goal for the plugin, but I will first need to see whether it’s possible from technical point of view to modify the way native WP blocks are rendering its internal “child” blocks: List with its Items, Columns block with individual Columns, etc.

    With the current Content Randomizer plugin and the upcoming “shuffle” feature you can wrap the Blocks Randomizer block in the Group block, give it a custom CSS class, and then apply custom CSS rules to decrease/remove/adjust spacing (which is mainly margin and/or padding for your ul).

    Plugin Author Slava Abakumov

    (@slaffik)

    Hey @florismk,

    I’ve just released v1.3.0 that allows you to shuffle your list blocks if you configured the plugin to display more than 1 randomly selected blocks.

    As styling depends on your theme – I can’t fix that in the plugin, so my previous comment is the way to go for now (with custom CSS class and custom CSS styles applied to it via .shrink-content ul (or similar).

Viewing 13 replies - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.