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

Created on 26 June 2024, about 1 year 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

Active

Version

10.4 โœจ

Component
Viewsย  โ†’

Last updated 3 days 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