Move hardcoded image path of layout builder to make it more flexible

Created on 30 October 2024, about 2 months ago

Problem/Motivation

Currently, in web/profiles/provus_core/provus_layout_builder/provus_layout_builder.module#L138, the select option images are stored in a hardcoded path within the profiles/provus_core directory. This approach is limiting as any new card style or layout image must be added specifically to this directory, which restricts flexibility and modularity for projects.

Proposed resolution

Refactor the code to make the image path configurable, allowing developers to specify paths in their project’s theme or module instead of relying solely on the profile’s directory structure. This would allow teams to add images related to specific styles or layouts directly within their project’s theme/module, making the system more scalable and project-specific.

Remaining tasks

  1. Update the code to accept a configurable path for image storage.
  2. Modify the default settings to maintain backward compatibility if no custom path is provided.
  3. Update documentation to explain the new configurable path setup.
  4. Write tests to ensure images are correctly retrieved from both default and custom paths.
📌 Task
Status

Active

Version

2.2

Component

Code

Created by

🇵🇭Philippines _renify_ cebu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024