Reusable blocks are invisible in the add content dialog

Created on 6 March 2024, 9 months ago
Updated 29 March 2024, 8 months ago

Problem/Motivation

In the Add Content dialog, the links to add reusable content don't include titles, so they are invisible and indistinguishable from one another.

The below screenshot shows the add content dialog with the code inspector and accessibility inspector for the block preview link. There is no text in the block link, so it's invisible. This is a critical accessibility and usability issue.

Steps to reproduce

  1. Install the latest dev version of Panopoly with its starter content.
  2. Log in as an administrator.
  3. Go to the Layout tab for a page.
  4. In Layout Builder, add a text block with a title "Test Text" and mark it as reusable.
  5. Save the block and save the layout.
  6. Note the page is displayed with the title "Test Text."
  7. Customize the page again.
  8. Select the "Content block" category. (This should probably be renamed to "Reusable content" to match 1.x and match the expectations created by the "Reusable" checkbox and help text.)
  9. Note there is nothing displayed visually except a grayed-out Add button.
  10. Click in the Preview area; note the Add button disappears.
  11. Hover over the area where the reusable block should be listed.
  12. Note you see the Add button for the reusable block again.
  13. Press the Add button.
  14. Note the Title field is empty.
  15. Fill out the title field.
  16. Save the block and save the layout.
  17. Note the two blocks are displayed with identical text but different titles.

Proposed resolution

In Panopoly 1.x there was the idea of an admin title, which was separate from the block/widget title and was displayed in the Add Content dialog. Maybe this is just missing?

  • The block/admin title should be displayed in the Add Content dialog.
  • The category should be labeled "Reusable content."

Remaining tasks

Patch and test.

User interface changes

Visible display of block title. Updated name of category.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Magic

Created by

πŸ‡ΊπŸ‡ΈUnited States cboyden

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @cboyden
  • πŸ‡ΊπŸ‡ΈUnited States dsnopek USA

    In Panopoly 1.x there was the idea of an admin title, which was separate from the block/widget title and was displayed in the Add Content dialog. Maybe this is just missing?

    There are definitely a bunch of bugs here! But it's not quite so bad as not having a field for admin title:

    The bugs I'm seeing in my testing are:

    1. The "Admin title" field is not required. So, it allows you to save the block without even filling it out, giving the block an empty admin title. I assume this is what's happening in your case - perhaps you just didn't scroll down far enough to see the "Admin title" field? Anyway, this field should either be required, or have some reasonable default.
    2. When using a block that's already reusable, it's not showing the "Admin title" field anymore, and saving will clear it. We should continue to show the "Admin title" field (although, we can no longer toggle reusable off once it's been turned on). I assume the reason that saving the block is clearing the title is because the field is missing.
  • Status changed to Needs review 9 months ago
  • πŸ‡ΊπŸ‡ΈUnited States dsnopek USA

    Here's a patch that fixes it in my testing.

    Please let me know if it works for you!

  • First commit to issue fork.
  • Merge request !8#3426143 - Fix β†’ (Open) created by rishabjasrotia
  • Pipeline finished with Failed
    9 months ago
    Total: 697s
    #119575
  • Pipeline finished with Failed
    9 months ago
    Total: 786s
    #119576
    • dsnopek β†’ committed 3ac4aa60 on 3.0.x
      Issue #3426143: Reusable blocks are invisible in the add content dialog
      
  • Status changed to Fixed 8 months ago
  • πŸ‡ΊπŸ‡ΈUnited States dsnopek USA

    @cboyden confirmed this was working outside of the issue.

    Merged!

    • dsnopek β†’ committed b5d12013 on 3.0.x
      Issue #3426143: Reusable blocks are invisible in the add content dialog
      
    • dsnopek β†’ committed 4f4d1ec1 on 3.0.x
      Revert "Issue #3426143: Reusable blocks are invisible in the add content...
  • πŸ‡ΊπŸ‡ΈUnited States cboyden

    Yes, this looks good. Part of the issue was that on a small screen, the fields that appear after you click the Reusable checkbox were below the fold. But it's working as expected now.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024