File Info Formatter MIME icon

Created on 22 July 2024, 4 months ago

Problem/Motivation

I would like to add two options for the FieldFormatter File Info Formatter:

  • Support a 'none' option for the text
  • Provide an option to add an icon indicating the file's MIME type

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States JasonSafro

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

Comments & Activities

  • Issue created by @JasonSafro
  • πŸ‡ΊπŸ‡ΈUnited States JasonSafro

    Proposed solution attached. NOTE: this may need some additional CSS. I may add that after additional testing by team's QA.

  • Status changed to Needs work 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States lemming

    Thanks @JasonSafro this looks like a welcome change that we'd want to add.

    I think the only update I'd ask for is to make sure that when the custom text option is used, that we filter the text with the "plain_text" filter to make sure there are no XSS issues with user entered text. Otherwise changes look good.

    Depending on the CSS changes, if they are things that a theme should be responsible for, we shouldn't worry about that with the module.

Production build 0.71.5 2024