Hide tab if contained fields are empty/have no content

Created on 29 September 2022, over 2 years ago
Updated 15 January 2025, 3 months ago

Problem/Motivation

If using the tab section and any field is empty, we should hide that empty tab.

Steps to reproduce

  • Create new section tab
  • Add some field that has no value
  • The tab will be there without title and without content.

Proposed resolution

I'm attaching a patch that hide tab if is empty. It works on version 1.0.0

πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States Farnoosh

    This patch also checks if the views block content is empty

  • πŸ‡¨πŸ‡¦Canada liquidcms

    I am using LB within Page Manager.

    With D9.5.11 and version 1.0.1 of LBT i was using the -1 version of this patch and tabs was working. Not even sure i need or care about its intended use of hiding empty tabs as i dont need that anywhere (i'll test without the patch next).

    After upgrading to D10.4 and still with -1 version of the patch i get no tabs (the actual tab part with the tab label) and the 1st block (tab 1) is visible. In the DOM, all tab content is there and there is nothing in the tabs div.

    With -4 of the patch or no patch at all, i get nothing showing up. No tabs and no tab content.

Production build 0.71.5 2024