Allow to configure label visibility in entity display settings

Created on 24 August 2022, over 2 years ago
Updated 5 January 2025, 4 months ago

Problem/Motivation

I guess this is VERY minor, but when using different view modes, one could wish to control the label visibility in the entity display settings, like for other fields. Currently, the label visibility is always defined in code.

Extra Field Settings Provider could overwrite this definition from extra_field defined in
extra_field/src/Plugin/ExtraFieldDisplayFormattedBase.php

  /**
   * {@inheritdoc}
   */
  public function getLabelDisplay() {

    return 'hidden';
  }

Before we implement anything here, we should discuss if this is a "plus" feature or should belong into extra_field module.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • First commit to issue fork.
  • Pipeline finished with Failed
    4 months ago
    Total: 194s
    #386516
  • Pipeline finished with Failed
    4 months ago
    Total: 341s
    #386528
  • Pipeline finished with Success
    4 months ago
    Total: 244s
    #386537
  • Pipeline finished with Success
    4 months ago
    Total: 227s
    #386546
  • πŸ‡ΊπŸ‡¦Ukraine UsingSession

    While developing this functionality, my primary goal was to avoid creating something new with plugins and implement it as simply as possible. Therefore, a significant portion was described within a hook.

    In my opinion, the label configuration could be moved to a plugin, but this would require creating an instance, which might impact performance (though it might not).

    I also updated the GitLab CI configuration to enable testing on Drupal 10, as the extra_field module does not yet have a version compatible with Drupal 11 - see If what you want is to run linting and tests under Drupal 10 πŸ’¬ Disabling OPT_IN_TEST_CURRENT not working Active

Production build 0.71.5 2024