Skip to content

Allow video, audio and iFrame in front components#18200

Merged
charlesBochet merged 6 commits intomainfrom
r--allow-video-and-audio-in-front-components
Feb 24, 2026
Merged

Allow video, audio and iFrame in front components#18200
charlesBochet merged 6 commits intomainfrom
r--allow-video-and-audio-in-front-components

Conversation

@bosiraphael
Copy link
Copy Markdown
Contributor

@bosiraphael bosiraphael commented Feb 24, 2026

Allow video, audio and iFrame in front components

  • fix css style properties starting with --

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 24, 2026

Greptile Summary

This PR enables video, audio, and iframe elements in the front component renderer and fixes a bug with CSS custom properties (variables starting with --).

Changes:

  • Added support for <iframe>, <video>, <audio>, and <source> HTML elements across the component system
  • Fixed CSS custom property parsing to preserve -- prefix instead of incorrectly camelCasing it
  • All new components properly registered in host, remote, and allowed elements configurations
  • All exports correctly added to index.ts (previous issue resolved)

Issues Found:

  • Type inconsistency: HtmlIframeProperties uses string for width/height (correct for iframes), but HtmlVideoProperties incorrectly uses number in AllowedHtmlElements.ts while using number in remote-elements.ts (should match <img> convention with number)
  • The inconsistency exists across two files and could cause runtime type mismatches

Confidence Score: 4/5

  • Safe to merge after fixing type inconsistencies in width/height properties
  • The implementation is solid with proper registration across all component layers and correct CSS fix. However, type inconsistencies between AllowedHtmlElements.ts and remote-elements.ts for video width/height, and between iframe Number/String types, need correction to prevent runtime type mismatches
  • packages/twenty-sdk/src/front-component-renderer/remote/generated/remote-elements.ts and packages/twenty-sdk/src/sdk/front-component-api/constants/AllowedHtmlElements.ts require type corrections for width/height properties

Important Files Changed

Filename Overview
packages/twenty-sdk/src/front-component-renderer/host/utils/createHtmlHostWrapper.ts Fixes CSS custom property handling by preserving -- prefix instead of camelCasing
packages/twenty-sdk/src/front-component-renderer/remote/generated/remote-elements.ts Defines custom elements with properties for iframe, video, audio, and source; width/height type inconsistency between video and iframe
packages/twenty-sdk/src/sdk/front-component-api/constants/AllowedHtmlElements.ts Adds allowed HTML element definitions for iframe, video, audio, and source; width/height type inconsistency between video and iframe

Last reviewed commit: 88cbfa3

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@bosiraphael
Copy link
Copy Markdown
Contributor Author

@greptileai

loop: { type: Boolean },
muted: { type: Boolean },
preload: { type: String },
crossOrigin: { type: String },
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Challenge: Do we really want to ? All files should be on twenty files no ?

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Copy link
Copy Markdown
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment :)

@bosiraphael bosiraphael disabled auto-merge February 24, 2026 18:01
@charlesBochet charlesBochet merged commit b56f85f into main Feb 24, 2026
16 of 20 checks passed
@charlesBochet charlesBochet deleted the r--allow-video-and-audio-in-front-components branch February 24, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants