Allow to not output empty fields

Created on 25 March 2025, 12 days ago

Problem/Motivation

Say you have a long list of journals, with name, link, and comment. Some fields can be empty, and it would be nice to be able to check "Hide if empty" under a field, so that labels for empty fields are skipped.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

3.1

Component

Code

Created by

πŸ‡©πŸ‡°Denmark ressa Copenhagen

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

Comments & Activities

  • Issue created by @ressa
  • πŸ‡ΊπŸ‡ΈUnited States apmsooner

    Hi, is there a particular display where you are seeing this behavior? Empty fields generally will not be displayed as there is already a check that looks for value = null or empty string and would just skip over it in those cases.

  • πŸ‡©πŸ‡°Denmark ressa Copenhagen

    Thanks for a fast response! I found the reason for this behaviour: The data is from a migration, and I had a closer look. I tried creating an extra entry manually, and after saving the node, all is well, and all empty field labels are now skipped ...

    Taking a close look at the source, I realized that there were some dirty data, with lingering \n's, like this "journal_comment": "\n". I suppose the saving of the node got rid of this lingering character, cleaning up the field. After removing it, all is well, sorry for the noise. I guess the lesson I take home is to make sure the foundation (the data) is as clean as can be. Have a great day, and thanks for creating an awesome module.

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

    Oh good to hear! Thanks so much for the encouragement and suggestions.

Production build 0.71.5 2024