Iterate on formatter code; add LinkCeFieldFormatter

Created on 18 June 2024, 7 months ago
Updated 22 June 2024, 7 months ago

I believe it is fine to lump changes to various formatters still in the same issue, because we're still in the "development" phase and I keep thinking of new things as I re-view the code.

1. Feedback: fix field type annotation for FileCeFieldFormatter -- https://git.drupalcode.org/project/custom_elements/-/merge_requests/69#n...

2. Feedback: add image-style dropdown to the file/image formatter -- #3449309-9: Convert gallery processor

3. Introduce (or: change/fix up existing) trait for easier extension of the 'base' formatter.

4. Add a LinkCeFieldFormatter

(This was needed in another project, but it should be added here.)

The current processor used for creating links in custom_elements_thunder config, outputs separate properties for 'url' and 'options'. Often, that's not what we want, and we should preprocess the 'full url' (one string including e.g. query parameters / anchor) in Drupal, and output that.

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

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

Merge Requests

Comments & Activities

  • Issue created by @roderik
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
  • 🇦🇹Austria fago Vienna
  • Merge request !71Port improvements from internal project. → (Merged) created by roderik
  • 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU

    This is minor, so I'm not going to finish it, but I'm already going to commit AND merge the changes made in a custom project, that should be moved into here:

    • Make protected get**Value() methods inside FlattenedFieldFormatter (moving it into a trait) and RawCeFieldFormatter more easily extensible
    • Drop protected RawCeFieldFormatter::processRaw() at the same time: I don't see how that one helps
    • Move isApplicable() code into field types in annotations, where they belong
    • Add LinkCeFieldFormatter.

    Still need to do: create test for LinkCeFieldFormatter, and point 2 (image style config).

  • Pipeline finished with Skipped
    7 months ago
    #205742
    • roderik committed 9f957584 on 3.x
      Issue #3455426 by roderik: Iterate on formatter code; add...
Production build 0.71.5 2024