Skip to content

CD: Create Store to handle data #32485

Closed

Description

@zJaaal

Goal

Our vision with the Content Drive, is to be able to save queries in the future, so we should be able to load an Elastic Search base query on initialization, for this iteration, we are getting a base query with just the root of the content, which will be the current site.

Store Model

The store should be made using NgRx Signal Store. we don't expect this feature to be heavy on store.

// Find a common object between a contentlet and a folder
// Keep in mind that this type can be use across all DotCMS, use the Models library to make this centralized
type ContentDriveItem = {};

// We just need this for now, we will add more fields later.
type ContentDriveState = {
    path: string;
    currentSite: Site;
    query: string;
    items: ContentDriveItem[];
};

Methods

initContentDrive

This method should be called when the shell is initialized. And it should get the path based on the current site for now.
This method should update the path and currentSite and a side effect, fetch items and set the items property on the store

initContentDrive({
    currentSite: Site // We have a type for sites
    path: string. // Representing the current path, in this case it will be "the-current-site.com/" because we cannot navigate on folders
    // This is a vision of how it can be, we just need `path` and `currentSite` for this iteration. Filters can and will definitely not be like this
    filters: {
        baseType: string,
        subType: string,
        status: string,
        language: string,
        folder: string,
        search: string,
        sort: string,
        page: number;
    }
})

To fetch items, we can use Elastic Search queries, check this document for the current properties we can use.

Activity

  1. added a commit that references this issue on Jun 20, 2025
  2. added a commit that references this issue on Jun 26, 2025
  3. moved this from New to In Progress in dotCMS - Product Planningon Jun 30, 2025
  4. self-assigned this
    on Jul 1, 2025
  5. github-actions commented on Jul 1, 2025

    @github-actions
    Contributor
  6. removed their assignment
    on Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions