Skip to content

🎥 Make videos programmatically with React

Fix component documentation links in Studio

Jonny Burger22244aba4403
diff --git a/packages/core/src/Interactive.tsx b/packages/core/src/Interactive.tsx
index cb3ce704c8..9b64250d58 100644
--- a/packages/core/src/Interactive.tsx
+++ b/packages/core/src/Interactive.tsx
@@ -435,6 +435,7 @@ const withSchema: WithSchema = (untypedOptions: unknown) => {
freeze={freeze}
hidden={hidden}
name={name ?? componentName}
+ _remotionInternalDocumentationLink="https://www.remotion.dev/docs/interactive-with-schema"
showInTimeline={isCurrentComposition ? false : showInTimeline}
controls={controls}
_remotionInternalPremountDisplay={effectivePremountFor || null}
diff --git a/packages/core/src/series/index.tsx b/packages/core/src/series/index.tsx
index 5194add8f9..32ef62c4f4 100644
--- a/packages/core/src/series/index.tsx
+++ b/packages/core/src/series/index.tsx
@@ -229,9 +229,7 @@ const SeriesInner: FC<SeriesProps> = (props) => {
<SequenceWithoutSchemaWithRef
ref={ref}
name={name || '<Series.Sequence>'}
- _remotionInternalDocumentationLink={
- name ? undefined : 'https://www.remotion.dev/docs/series'
- }
+ _remotionInternalDocumentationLink="https://www.remotion.dev/docs/series"
controls={controls ?? undefined}
from={currentStartFrame}
durationInFrames={durationInFramesProp}
diff --git a/packages/lottie/src/Lottie.tsx b/packages/lottie/src/Lottie.tsx
index d0a11f0a08..f84e270b14 100644
--- a/packages/lottie/src/Lottie.tsx
+++ b/packages/lottie/src/Lottie.tsx
@@ -218,6 +218,7 @@ export const Lottie = ({
freeze={freeze}
hidden={hidden}
name={name ?? '<Lottie>'}
+ _remotionInternalDocumentationLink="https://www.remotion.dev/docs/lottie/lottie"
showInTimeline={showInTimeline ?? false}
_remotionInternalPremountDisplay={effectivePremountFor || null}
_remotionInternalPostmountDisplay={effectivePostmountFor || null}
diff --git a/packages/media/src/audio/audio.tsx b/packages/media/src/audio/audio.tsx
index a8ed28868e..7930602f0a 100644
--- a/packages/media/src/audio/audio.tsx
+++ b/packages/media/src/audio/audio.tsx
@@ -223,11 +223,7 @@ const AudioInner: React.FC<
_remotionInternalIsPremounting={premountingActive}
_remotionInternalIsPostmounting={postmountingActive}
name={name ?? '<Audio>'}
- _remotionInternalDocumentationLink={
- name === undefined
- ? 'https://www.remotion.dev/docs/media/audio'
- : undefined
- }
+ _remotionInternalDocumentationLink="https://www.remotion.dev/docs/media/audio"
controls={controls}
_remotionInternalLoopDisplay={loopDisplay}
showInTimeline={showInTimeline ?? true}
diff --git a/packages/media/src/video/video.tsx b/packages/media/src/video/video.tsx
index 16acc38aee..6bec92b21a 100644
--- a/packages/media/src/video/video.tsx
+++ b/packages/media/src/video/video.tsx
@@ -421,11 +421,7 @@ const VideoInner: React.FC<
_remotionInternalIsPremounting={premountingActive}
_remotionInternalIsPostmounting={postmountingActive}
name={name ?? '<Video>'}
- _remotionInternalDocumentationLink={
- name === undefined
- ? 'https://www.remotion.dev/docs/media/video'
- : undefined
- }
+ _remotionInternalDocumentationLink="https://www.remotion.dev/docs/media/video"
controls={controls}
_remotionInternalLoopDisplay={loopDisplay}
_remotionInternalEffects={memoizedEffectDefinitions}
diff --git a/packages/rive/src/RemotionRiveCanvas.tsx b/packages/rive/src/RemotionRiveCanvas.tsx
index b26f825a03..b1bcef58e0 100644
--- a/packages/rive/src/RemotionRiveCanvas.tsx
+++ b/packages/rive/src/RemotionRiveCanvas.tsx
@@ -545,11 +545,7 @@ const RemotionRiveCanvasInnerForwardRefFunction: React.ForwardRefRenderFunction<
hidden={hidden}
showInTimeline={showInTimeline}
name={name ?? '<RemotionRiveCanvas>'}
- _remotionInternalDocumentationLink={
- name === undefined
- ? 'https://www.remotion.dev/docs/rive/remotionrivecanvas'
- : undefined
- }
+ _remotionInternalDocumentationLink="https://www.remotion.dev/docs/rive/remotionrivecanvas"
durationInFrames={durationInFrames}
controls={controls}
_remotionInternalEffects={memoizedEffectDefinitions}
diff --git a/packages/shapes/src/components/render-svg.tsx b/packages/shapes/src/components/render-svg.tsx
index 812b7158fa..d2e6de35a4 100644
--- a/packages/shapes/src/components/render-svg.tsx
+++ b/packages/shapes/src/components/render-svg.tsx
@@ -104,9 +104,7 @@ const RenderSvgWithTiming = ({
_remotionInternalEffects={memoizedEffectDefinitions}
durationInFrames={durationInFrames}
name={name ?? defaultName}
- _remotionInternalDocumentationLink={
- name === undefined ? documentationLink : undefined
- }
+ _remotionInternalDocumentationLink={documentationLink}
_remotionInternalPremountDisplay={effectivePremountFor || null}
_remotionInternalPostmountDisplay={effectivePostmountFor || null}
_remotionInternalIsPremounting={premountingActive}
diff --git a/packages/three/src/ThreeCanvas.tsx b/packages/three/src/ThreeCanvas.tsx
index 3d8f424406..955cfc0b09 100644
--- a/packages/three/src/ThreeCanvas.tsx
+++ b/packages/three/src/ThreeCanvas.tsx
@@ -38,6 +38,7 @@ export type ThreeCanvasFrameRendererProps = {
type ThreeCanvasInternalsProps = ThreeCanvasProps & {
readonly FrameRenderer: React.ComponentType<ThreeCanvasFrameRendererProps>;
readonly advanceOnCreated: boolean;
+ readonly documentationLink: string;
};
const Scale = ({
@@ -80,6 +81,7 @@ const ThreeCanvasContent = (props: ThreeCanvasInternalsProps) => {
onCreated,
FrameRenderer,
advanceOnCreated,
+ documentationLink: _,
...rest
} = props;
const {isRendering} = useRemotionEnvironment();
@@ -227,6 +229,7 @@ export const ThreeCanvasInternals = ({
freeze={freeze}
hidden={hidden}
name={name ?? '<ThreeCanvas>'}
+ _remotionInternalDocumentationLink={props.documentationLink}
showInTimeline={showInTimeline ?? false}
_remotionInternalPremountDisplay={effectivePremountFor || null}
_remotionInternalPostmountDisplay={effectivePostmountFor || null}
@@ -249,6 +252,7 @@ export const ThreeCanvas = (props: ThreeCanvasProps) => {
{...props}
FrameRenderer={ManualFrameRenderer}
advanceOnCreated
+ documentationLink="https://www.remotion.dev/docs/three-canvas"
/>
);
};
diff --git a/packages/three/src/webgpu.tsx b/packages/three/src/webgpu.tsx
index b21657acc9..fb0ebefda4 100644
--- a/packages/three/src/webgpu.tsx
+++ b/packages/three/src/webgpu.tsx
@@ -134,6 +134,7 @@ export const ThreeWebGPUCanvas = (props: ThreeWebGPUCanvasProps) => {
gl={createWebGPURenderer}
FrameRenderer={WebGPUFrameRenderer}
advanceOnCreated={false}
+ documentationLink="https://www.remotion.dev/docs/three-webgpu-canvas"
/>
);
};
diff --git a/packages/transitions/src/TransitionSeries.tsx b/packages/transitions/src/TransitionSeries.tsx
index 8b484dfda3..0cd08f6cbf 100644
--- a/packages/transitions/src/TransitionSeries.tsx
+++ b/packages/transitions/src/TransitionSeries.tsx
@@ -791,11 +791,7 @@ const TransitionSeriesChildren: FC<{readonly children: React.ReactNode}> = ({
durationInFrames={durationInFramesProp}
{...propsForSequence}
name={passedProps.name || '<TS.Sequence>'}
- _remotionInternalDocumentationLink={
- passedProps.name
- ? undefined
- : 'https://www.remotion.dev/docs/transitions/transitionseries'
- }
+ _remotionInternalDocumentationLink="https://www.remotion.dev/docs/transitions/transitionseries"
controls={controls ?? undefined}
>
<UppercaseNextPresentation
@@ -867,11 +863,7 @@ const TransitionSeriesChildren: FC<{readonly children: React.ReactNode}> = ({
durationInFrames={durationInFramesProp}
{...propsForSequence}
name={passedProps.name || '<TS.Sequence>'}
- _remotionInternalDocumentationLink={
- passedProps.name
- ? undefined
- : 'https://www.remotion.dev/docs/transitions/transitionseries'
- }
+ _remotionInternalDocumentationLink="https://www.remotion.dev/docs/transitions/transitionseries"
controls={controls ?? undefined}
>
<UppercasePrevPresentation
@@ -911,11 +903,7 @@ const TransitionSeriesChildren: FC<{readonly children: React.ReactNode}> = ({
durationInFrames={durationInFramesProp}
{...propsForSequence}
name={passedProps.name || '<TS.Sequence>'}
- _remotionInternalDocumentationLink={
- passedProps.name
- ? undefined
- : 'https://www.remotion.dev/docs/transitions/transitionseries'
- }
+ _remotionInternalDocumentationLink="https://www.remotion.dev/docs/transitions/transitionseries"
controls={controls ?? undefined}
>
<UppercaseNextPresentation
@@ -950,11 +938,7 @@ const TransitionSeriesChildren: FC<{readonly children: React.ReactNode}> = ({
durationInFrames={durationInFramesProp}
{...propsForSequence}
name={passedProps.name || '<TS.Sequence>'}
- _remotionInternalDocumentationLink={
- passedProps.name
- ? undefined
- : 'https://www.remotion.dev/docs/transitions/transitionseries'
- }
+ _remotionInternalDocumentationLink="https://www.remotion.dev/docs/transitions/transitionseries"
controls={controls ?? undefined}
>
{sequenceChildren}
@@ -1020,11 +1004,7 @@ const TransitionSeriesInner: FC<SequenceProps> = (props) => {
<TrackWithoutSchema
name={displayName}
layout={layout}
- _remotionInternalDocumentationLink={
- name === undefined
- ? 'https://www.remotion.dev/docs/transitions/transitionseries'
- : undefined
- }
+ _remotionInternalDocumentationLink="https://www.remotion.dev/docs/transitions/transitionseries"
{...otherProps}
controls={controls ?? undefined}
>