Redesign the field type storage

Created on 31 July 2017, over 7 years ago
Updated 11 June 2024, 7 months ago

Note: This is only a proposal that can be discussed. No patch will be provided until an agreement from the module maintainer doesn't exist.

Problem/Motivation

The field storage has a very confusing design, because:

  1. The storage depends on the used widget. When the social_media_links_field_select widget is used, then the platform and value columns are used. When the default widget is used, then platform_values column is used. This architecturally wrong because the storage should not depend on the widget.
    I must be able to use different widgets on the same field types. What happens if I change the widget?
  2. The multi-value widget stores data in a blob. So bad. This means I cannot build a View and ask: Give me all the users with Twitter accounts?

Proposed resolution

The field type should implement only 2 columns:

  1. platform
  2. value

The multiple accounts it's just a multivalue field. The plugin system should remain in place.

An update script should be provided.

Remaining tasks

Discuss.

User interface changes

API changes

Data model changes

🌱 Plan
Status

Active

Version

2.0

Component

Code

Created by

🇷🇴Romania claudiu.cristea Arad 🇷🇴

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 Success
    7 months ago
    Total: 149s
    #196508
  • Pipeline finished with Success
    6 months ago
    Total: 310s
    #213001
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 90s
    #320460
  • Pipeline finished with Success
    about 2 months ago
    Total: 143s
    #320461
  • Pipeline finished with Success
    about 2 months ago
    Total: 159s
    #320468
  • Status changed to Needs review about 2 months ago
  • Provided an updated data structure for the fields, needs review by maintainers/community.

Production build 0.71.5 2024