Skip to content

Reordering widgets in Control Pane #7637

@caseywatts

Description

@caseywatts

Describe the bug
In the Editor Control Pane, I can't reorder custom widgets.

To Reproduce

  1. Create two instances of a widget, such as Code Block, on a given page
  2. Try to change the order of these widgets
    • ❌ Highlight the bottom widget's box (so it gets highlighted), then try to cut (cmd + x) it (it does get removed!) and then paste (cmd + v) it above the other one (it does NOT paste)
    • ❌ Click and drag the lower widget's box to be above the upper widget's box
    • ✅ Switch to the markdown editor to cut/paste the content around (this works!)

When I cut the widget out and paste it into a text editor (VSCode), it pastes several blank lines (no content).

Expected behavior

  1. Expected to be able to paste the widget, after cutting it out
  2. Expected to be able to drag and drop the widget to a new location.

Screenshots

Applicable Versions:

  • decap-cms-app 3.8.4
  • decap-cms-core 3.9.0
  • decap-cms 3.8.4
  • GitHub (local mode for development)
  • MacOS 15.6.1
  • Firefox 14.4.0

CMS configuration

config.yml ``` # When using the default proxy server port. Run `npm run decap-proxy` to start. local_backend: true backend: name: git-gateway

publish_mode: editorial_workflow
media_folder: "/assets/images/uploads/"
collections:

  • label: Page
    name: pages
    folder: content
    create: true
    slug: "{{slug}}"
    path: "{{slug}}/index"
    editor:
    preview: true
    fields:
    • {
      label: "Layout",
      name: "layout",
      widget: "hidden",
      default: "layouts/base.webc",
      }
    • {
      label: "Permalink",
      name: "permalink",
      widget: "string",
      default: "{{slug}}/",
      }
    • { label: "Title", name: "title", widget: "string" }
    • { label: "Lead text", name: "lead", widget: "text", required: false }
    • {
      label: "Lead image",
      name: "image",
      widget: "image",
      media_folder: "/assets/images/uploads/",
      required: false,
      }
    • {
      label: "Description",
      name: "description",
      widget: "text",
      required: false,
      }
    • { label: "Body", name: "body", widget: "markdown" }
  • label: "Site admin"
    name: "site"
    editor:
    preview: false
    files:
    • label: "Global text"
      name: "global"
      file: "_data/site.json"
      fields:
      • { label: Site title, name: title, widget: string }
      • { label: Agency, name: agency, widget: string }
      • { label: Program name, name: name, widget: string }
      • label: "Site alert"
        name: "site_alert"
        widget: "object"
        collapsed: true
        fields:
        • {
          label: "Show Site Alert?",
          name: show_site_alert,
          widget: boolean,
          }
        • { label: Title, name: title, widget: string }
        • { label: Message, name: message, widget: markdown }
</details>



**Additional context**
<!-- Add any other context about the problem here. -->

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugcode to address defects in shipped code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions