Skip to content

Structure Pattern refactoring #1591

@thet

Description

@thet

Structure pattern refactoring

Task

Build a new pattern based on pat-structure from ./src/pat/structure/structure.js.

Other relevant resources

Current endpoints and views: https://github.com/plone/plone.app.content/tree/master/src/plone/app/content/browser/contents

The new implementation should use endpoints from plone.restapi: https://github.com/plone/plone.restapi/

Motivation

Dependency on Backbone makes it unmaintainable.
Datatables integration only sorts current batch, we want to rework that.

Goal

  • Svelte implementation
  • Feature parity
  • Usage of plone.restapi instead custom endpoints
  • Loose dependency on plone.app.content, use plone.restapi instead.

Feature List

  • Batched listing on content
  • Customizable batch size
  • Drag / Drop sorting
  • Visible columns configuration
  • Selecting content items in "current batch" or "all"
  • Persistent rearrange / reordering based on indices from catalog
  • Multi-Upload button
  • Batch-Actions:
    • Cut,
    • Copy,
    • Paste,
    • Delete,
    • Rename,
    • Tagging,
    • Workflow status (With optional recursive application),
    • Edit properties (With optional recursive application):
    • Publication date
    • Expiration date
    • Copyright
    • Creators
    • Contributors
    • Exclude from navigation
    • Language
    • Search
    • Query filter

The item listing has a image preview.

The content listing has individual item actions:

  • Move to top
  • Move to bottom
  • Cut
  • Copy
  • Set as default page

New features:

  • Drag into folder (Single or multiple selected items)
  • Multi upload directly to content listing per drag/drop
  • Column visual non-persistent sorting should applied over whole result, not the current batch.
  • Column sorting on date should sort on real date not doing a text-sort.
  • New "image" column

Implementation phases

Phase 1: Create a skeleton pattern based on ./src/pat/contentbrowser/.
Phase 2: Create a basic content listing using plone.restapi.
Phase 3: Implement the selection/batch actions
Phase 4: Implement drag/drop sorting
Phase 5: Implement multi file upload / drag/drop upload
Phase 6: Implement the other missing features.

Let us review each Phase. Maybe we make some code changes before we start a new phase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions