Add "default" value to field settings selection and define global defaults settings per display mode

Created on 15 August 2022, almost 2 years ago
Updated 5 February 2024, 5 months ago

Problem/Motivation

Currently, all settings have "div" as default setting (hard definition). If this value is changed, you can not see the default. Neither by description nor by selected value.

Steps to reproduce

Proposed resolution

Simple: Add a description: Default: div
Better: Add a 2nd value in the select list above none: Default

This will allow setting a global default element per display mode on a dedicated settings page.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Closed: duplicate

Version

3.0

Component

Code (fences)

Created by

πŸ‡©πŸ‡ͺGermany Grevil

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.

  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • πŸ‡³πŸ‡ΏNew Zealand John Pitcairn

    Is any work happening @thomas.frobieter? It's assigned to you.

    Is there a current workaround if I want the default for all elements and wrappers to be "None"?

  • Issue was unassigned.
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Open for the community. We'll proceed here as soon as we have the time.

  • Is there a current workaround if I want the default for all elements and wrappers to be "None"?

    @John Pitcairn Not a clean one, unless you write a patch and override the default.
    Maybe the easiest way for you is to override the twig file, and find a condition that works for you until this is fixed.

    Maybe use attributes.hasClass('x'), if your class 'x' is not set, do not print the field_tag.
    {{ field_tag|default('div') }}

    You know... dirty workaround, but hopefully it helps for now.

  • πŸ‡³πŸ‡ΏNew Zealand John Pitcairn

    Ha. I mean the default in the formatter, where defaults are currently hard coded. Probably has to be add an #after_build callback to the entire form.

  • Status changed to Closed: duplicate 5 months ago
  • πŸ‡©πŸ‡ͺGermany Grevil

    This whole opening, closing and creating of issues, got everyone confused, I think.

    This: ✨ Allow to define presets for typical configurations (fences_presets submodule) Active is the main issue, where we are going to implement this feature. As soon as we are able to create "Preset" config entities, we can have a default preset entity on install, which can be manually overwritten if needed, or you can add your own preset through a custom config.yml.

    I'll close this issue but leave a reference to it for future development in ✨ Allow to define presets for typical configurations (fences_presets submodule) Active .

Production build 0.69.0 2024