cloudinary / cloudinary/cloudinary_sfcc_pagedesigner
Allow Cloudinary editor iframe to conditionally render config sections (Advanced / Player Options)
- Dominant language
- JavaScript
- Stars
- 8
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
### Background / current behavior
The BM component UI is rendered through an iframe on a separate domain.
In Page Designer we can embed Cloudinary editors inside existing components (e.g., Banner) using a custom editor definition like:
```json
{
"id": "asset_sel",
"name": "Component configuration",
"type": "custom",
"required": false,
"editor_definition": {
"type": "cloudinary.videoForm"
}
}
```
This works, but the editor always renders the same set of configuration options
### Problem
Some Page Designer components don’t need (or shouldn’t expose) certain options.
#### Example:
We integrate Cloudinary into the Banner component to pick/set a background image.
Showing “Advanced” options (and especially things like hyperlink/reference fields for a background image) doesn’t make sense in that context.
Same idea for videos embedded into components that don’t support certain behaviors , for example video controls either is always default or controlled by standalone editor.
### Requested proposal
Allow the Page Designer to pass the iframe URL and/or a configuration object into the custom editor so the iframe can conditionally render parts of the UI (e.g., hide “Advanced”, hide “Player Options”, etc.). Without the ability to conditionally tailor the editor, the final Page Designer component becomes cumbersome to configure
For example, support something like:
```json
{
"id": "asset_sel",
"name": "Component configuration",
"type": "custom",
"required": false,
"editor_definition": {
"type": "cloudinary.videoForm",
"configuration": {
"options": {
"showAdvanced": false,
"showPlayerOptions": false
}
}
}
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the Page Designer custom editor definition creates and configures the Cloudinary iframe. Identify where configuration is passed into the editor and how the Advanced and Player Options sections are rendered. Done means the Banner example can hide those sections while other editor uses retain them, with the behavior verified in the affected Page Designer flows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100