Expand formatter settings

Created on 17 December 2021, almost 3 years ago
Updated 14 July 2023, over 1 year ago

Problem/Motivation

The default settings provided by the formatter suffice most common cases, but in certain solutions as a developer I may want to alter how the link is generated; for example, set the map zoom or perhaps set the text for the link using tokens from the entity.

Steps to reproduce

Just add the formatter and link URL.

Proposed resolution

  • Add a setting for the formatter to store the zoom, different fields may require different zoom levels.
  • Add a setting for the formatter to store HTML attributes using format like, attribute1=value1;attribute2=value;...
  • Add a setting for the formatter to store if the link should open in a new tab.
  • Add token support for the link_text and html_attributes settings.
  • REJECTED

Remaining tasks

  • Provide a database update with the new settings
  • Update module docs

User interface changes

The formatter configuration form should support aforementioned settings using proper controls.

API changes

N/A

Data model changes

The formatter configuration schema will be modified as follows:

  • link_text: label to support translations with tokens
  • zoom: float, with 2 decimals and steps of 0.25 points
  • html_attributes: text with tokens
  • new_tab: boolean
✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain d70rr3s

Live updates comments and jobs are added and updated live.
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.

Production build 0.71.5 2024