Formatter third party settings missing from Views UI

Created on 12 March 2016, almost 9 years ago
Updated 14 March 2024, 9 months ago

Problem/Motivation

Field formatter third party settings provided by hook_field_formatter_third_party_settings_form() are missing form the Views UI interface when using Fields.

Proposed resolution

Add support for Field formatter third party settings to the Views UI interface when using Fields.

Remaining tasks

Test dependency behaviour when one of the third party modules need to be uninstalled.
It should handle the config cleanup without removing the field entirely.

User interface changes

There's now a Use third party settings checkbox for if the field wants third party module integration.

API changes

Data model changes

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
Views UIΒ  β†’

Last updated 16 days ago

Created by

πŸ‡¦πŸ‡ΊAustralia Deciphered

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Contributed project blocker

    It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.

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.

  • πŸ‡¨πŸ‡¦Canada mandclu

    Moving this to 10.1. It would be amazing if we could get some momentum going on this issue again.

  • First commit to issue fork.
  • @codebymikey opened merge request.
  • Status changed to Needs review about 1 year ago
  • Attached a patch which provides that support for fields.

    It should work in a way that ensures that the third_party_settings is entirely optional, keeping the existing views behaviour where possible.

  • Status changed to Needs work about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    With the new schema change think we will need an upgrade path + tests.

  • last update about 1 year ago
    30,493 pass
  • πŸ‡¬πŸ‡§United Kingdom joachim

    Patch works, but I find it weird UX to have to ticky a box that says 'Use third party setting', especially when the third party settings form is hidden in a details element anyway.
    It would be pretty much the same to just show the details element and have it closed by default.

    Though I think it would be better UX to have the formatter settings AND the third party settings together in a detail element, so it looks the same as in entity display settings. Although that change would be out of scope of this issue.

    Tagging as a contrib project blocker, because this affects any contrib module that offers extra options for field formatters.

  • πŸ‡¬πŸ‡§United Kingdom joachim

    Actually, the patch doesn't completely work -- I can't remove settings from a field after saving the view:

    1. Edit a view, set a third party setting
    2. Save it
    3. Remove the setting - unselect both the setting AND the 'Use third party setting' checkbox
    4. click 'Apply'
    5. The settings are still used in the preview output, and editing the field again shows they are back

  • πŸ‡¬πŸ‡§United Kingdom joachim

    I think there's some confusion between

    $options['third_party_settings']

    and

    $options['settings']['third_party_settings']

    The field formatter system is going to expect third_party_settings to be within its settings, so I think putting them outside of that in the Views config is a mistake, as it just confuses things.

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί
Production build 0.71.5 2024