Sorting paragraph list alphabetically in modal

Created on 14 January 2020, about 5 years ago
Updated 28 January 2023, about 2 years ago

Would be nice to have the paragraph list in alphabetical order in modal window.
Adding a patch for now if anyone else needs it.

โœจ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

๐Ÿ‡ธ๐Ÿ‡ชSweden desiboli

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.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly g.rocchini

    g.rocchini โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain bletch

    Here is patch for 2.1.0alpha, for people who need it.

  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ธ๐Ÿ‡ชSweden twod Sweden

    I re-implemented this serverside and added a checkbox to the widget settings to toggle alphabetization of the render list without affecting which buttons are made available for quick access - the drag & drop weight still controls that.

    This is for the 10.x version as that was the only one working for us with the latest Paragraphs and Paragraphs Features modules.

  • ๐Ÿ‡ธ๐Ÿ‡ชSweden twod Sweden

    The schema update for the new setting did not make it into the previous patch.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain bletch

    Patch for 10.0.4

  • ๐Ÿ‡ช๐Ÿ‡ธSpain bletch

    Correct patch for 10.0.4

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States orbmantell

    This patch in #16 has issues with multilingual sites. When editing a translated node there are no paragraphs allowed to be added, so the $types_available variable in paragraphs_ee_field_widget_complete_form_alter() is empty. This causes an issue with $render_order = array_combine(array_keys($types_available), range(0, count($types_available) - 1));, as it tries to call array_combine() on an empty array and an array with two elements (0 and -1). This throws a ValueError due to mismatching numbers of keys and values.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States orbmantell
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States orbmantell

    New patch to address multilingual issue

  • Status changed to Needs work 3 months ago
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany stborchert

    As said before, I'm no fan of the way it is implemented.

    Here is how I would like to see this:

    • A new setting "Sort paragraphs by". The option lists all sort plugins defined ("weight", "alphabet") for ParagraphsEE
    • Either a set of buttons in the dialog header or a dropdown with all available sort options

    Please create merge requests for the changes as they are much easier to review.

Production build 0.71.5 2024