Skip to content

Migrate Comics Gallery Content to Directus #689

Description

@patinen

✨ Enhancement Description

  • What is it?: Migrate the existing Comics gallery content sourcing to Directus. The current Comics UI should remain in use, but comic collections, covers and pages should be managed through Directus instead of relying on the existing public/site/comics file and directory structure.
  • Why improve it?: The current implementation ties comic content and ordering to the server-side directory structure. Adding or reorganizing comics therefore depends on the underlying files rather than the CMS. Moving the content to Directus allows comics to be managed, ordered and published without frontend or filesystem changes.

🌟 Benefits of the Enhancement

  • User Experience: Comic content can be updated and expanded more reliably while preserving the existing Comics gallery experience.
  • Project Impact: Centralizes comic content management in Directus, removes the dependency on the existing filesystem-based comics structure and makes future content updates easier to maintain.

🛠️ Proposed Implementation

  • Technical Details:

    • Create a Directus data model for comic collections.
    • Each comic collection should support at least:
      • Title/name
      • Cover image
      • Ordered comic pages/images
      • Sort/order value
      • Publication status
    • Comic pages should use Directus file relations and preserve their intended reading order.
    • Configure public/frontend read permissions for published comic content.
    • Create a Directus API/query layer for Comics content.
    • Convert Directus file IDs to asset URLs for the existing gallery components.
    • Return the data in a format compatible with the existing Comics UI where practical.
    • Only published comic collections should be visible publicly.
    • Collections and individual comic pages must render in their configured order.
    • The existing regular gallery functionality must continue to work and should not be migrated as part of this issue.
    • Remove the Comics page dependency on the current public/site/comics directory fetching once the Directus integration is in use.
  • Implementation Plan:

    1. Review the current Comics gallery data requirements and existing SectionGallerias / gallery flow.
    2. Create the required Comics collections and file relations in Directus.
    3. Configure publication status, ordering and public read permissions.
    4. Add TypeScript types for the Directus Comics data.
    5. Create a dedicated Comics Directus API/query layer.
    6. Map the Directus response into the structure required by the existing Comics gallery components.
    7. Update ComicsGalleriesPage to source its content from Directus.
    8. Migrate the existing comic content and page ordering into Directus.
    9. Remove the obsolete filesystem-based Comics data path where it is no longer required.
    10. Verify that the existing Comics UI and modal/slider behavior continue to work correctly after the migration.
    11. Verify that the regular Galleries implementation is unaffected by the change.

📎 Additional Information

  • Links & References:

    • Comics page: src/preparedPages/ComicsGalleriesPages/
    • Comics currently use: src/widgets/SectionGallerias/
    • Current gallery data source: src/entities/Gallery/model/galleryApi.ts
    • Current Comics source directory: public/site/comics
    • Directus documentation: https://directus.io/docs/
  • Mockups/Examples:

    • No major Comics UI redesign is required as part of this issue.
    • The goal is to replace the existing content source with Directus while preserving the current user-facing functionality.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementFor improvements to existing featureshardlevel_hard

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions