Improve icon selection in paragraphs type form.

Created on 21 February 2017, over 7 years ago
Updated 1 February 2024, 10 months ago

Problem/Motivation

Follow-up from #2830016: Add a thumbnail/icon field to Paragraphs type . Uploading a file for each paragraph type has several issues:

  • Uploading icons is not very user friendly.
  • No way to reuse icons.
  • No way to add a separate icon for each theme.
  • Issues with exporting / importing icon configuration.

Proposed resolution

Let's discuss here how we want to improve this.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Needs review

Version

1.0

Component

User interface

Created by

🇷🇸Serbia toncic

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.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    180 pass
  • Re-rolled patch against latest 8.x-1.x-dev branch.

  • 🇩🇪Germany hctom

    The patch from #17 misses a lot of code changes from #10, therefore hiding it. The MR diff contains all the code changes from #10 and also fixes the deprecated usage of file_create_url(). You should use the MR and its diff instead.

  • Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    Not currently mergeable.
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    180 pass
  • 🇩🇪Germany stborchert

    I rebased branch 2854585-improve-icon-selection with 8.x-1.x and improved the calls to file_create_url() resp. the file_url_generator service.

  • Pipeline finished with Success
    about 1 year ago
    Total: 2133s
    #36926
  • Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update 10 months ago
    Not currently mergeable.
  • 🇩🇪Germany hctom

    Just found a small bug with this patch: The following element is added to ParagraphsTypeForm::form() method's form array by this patch:

    <?php
    $form['static_icon_file']['description'] = [
      '#type' => 'item',
      '#description' => $description,
    ];
    

    Unfortunately an element with '#type' => 'item' is treated as an input value and thus interferes with the form's actual description form field value.

    So my changes add '#input' => FALSE to the new $form['static_icon_file']['description'] element to NOT treat this element as a form value anymore.

  • Pipeline finished with Failed
    10 months ago
    Total: 1350s
    #85987
Production build 0.71.5 2024