ViewsBlock Layout Builder - Title is displayed even when block_hide_empty=TRUE

Created on 26 June 2024, 2 months ago

Problem/Motivation

When displaying a view within Layout Builder we have an option to 'Display title' and 'Override title'. However, if the config "Hide block if the view output is empty" = Yes, the title should not be displayed if the view is empty/no results.

Steps to reproduce

1. Create a view that returns 0 rows
2. Place the view into a page using Layout Builder
3. Configure the title to be "News"
4. Save the page

Result: 'News' title is displayed.

Expected result: Nothing should be displayed

Proposed resolution

Add a check to ViewsBlock::getConfiguration() to check block_hide_empty and total_rows and set the label = ''.

Remaining tasks

Unit Tests

πŸ› Bug report
Status

Needs work

Version

10.4 ✨

Component
ViewsΒ  β†’

Last updated about 12 hours ago

Created by

πŸ‡§πŸ‡·Brazil carolpettirossi Campinas - SP

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024