Skip to content

🎥 Make videos programmatically with React

`@remotion/studio`: Remove duration input tooltip

Jonny Burger235af844e2fa
diff --git a/packages/studio/src/components/InspectorPanel/CompositionMetadata.tsx b/packages/studio/src/components/InspectorPanel/CompositionMetadata.tsx
index 84f2d14348..5331d1e973 100644
--- a/packages/studio/src/components/InspectorPanel/CompositionMetadata.tsx
+++ b/packages/studio/src/components/InspectorPanel/CompositionMetadata.tsx
@@ -282,7 +282,6 @@ const CompositionMetadataValue: React.FC<{
? String(Math.round(Number(newValue)))
: formatValue(newValue),
parse: (text: string) => parseCompositionDuration(text, fps),
- hint: '5s · 1:30 · 150f\nTimecode: minutes:seconds.frames',
invalidMessage: 'Enter a duration such as 5s, 1:30, or 150f.',
onCancel: () => setDragValue(null),
};
diff --git a/packages/studio/src/components/NewComposition/InputDragger.tsx b/packages/studio/src/components/NewComposition/InputDragger.tsx
index ef11569b32..c804032cff 100644
--- a/packages/studio/src/components/NewComposition/InputDragger.tsx
+++ b/packages/studio/src/components/NewComposition/InputDragger.tsx
@@ -13,7 +13,6 @@ import {
} from '../../helpers/pointer-session';
import {getClickLock, setClickLock} from '../../state/input-dragger-click-lock';
import {HigherZIndex} from '../../state/z-index';
-import {ActionTooltip} from '../ActionTooltip';
import {
forceSpecificCursor,
stopForcingSpecificCursor,
@@ -46,7 +45,6 @@ type Props = Omit<InputHTMLAttributes<HTMLInputElement>, 'title'> & {
type TextEditing = {
readonly format: (value: number | string) => string;
readonly parse: (text: string) => number | null;
- readonly hint: string | null;
readonly invalidMessage: string;
readonly onCancel: () => void;
};
@@ -859,49 +857,33 @@ const InputDraggerForwardRefFn: React.ForwardRefRenderFunction<
}, [inputFallback]);
if (inputFallback) {
- const input = (
- <RemotionInput
- ref={fallbackRef}
- autoFocus
- onKeyDown={onInputKeyDown}
- onBlur={onBlur}
- onChange={onInputChange}
- min={_min}
- max={_max}
- step={validationStep}
- defaultValue={formattedInputValueRef.current?.text ?? value}
- status={status}
- rightAlign={rightAlign}
- small={small}
- {...props}
- aria-description={textEditing?.hint ?? props['aria-description']}
- style={
- small
- ? {
- ...compactInputDraggerStyle,
- display: 'block',
- ...inputStyle,
- }
- : inputStyle
- }
- type="text"
- />
- );
return (
<HigherZIndex onEscape={onEscape} onOutsideClick={noop}>
- {textEditing?.hint ? (
- <ActionTooltip
- label={textEditing.hint}
- shortcut={null}
- delay={null}
- dismissOnClick={false}
- triggerStyle={{display: 'block'}}
- >
- {input}
- </ActionTooltip>
- ) : (
- input
- )}
+ <RemotionInput
+ ref={fallbackRef}
+ autoFocus
+ onKeyDown={onInputKeyDown}
+ onBlur={onBlur}
+ onChange={onInputChange}
+ min={_min}
+ max={_max}
+ step={validationStep}
+ defaultValue={formattedInputValueRef.current?.text ?? value}
+ status={status}
+ rightAlign={rightAlign}
+ small={small}
+ {...props}
+ style={
+ small
+ ? {
+ ...compactInputDraggerStyle,
+ display: 'block',
+ ...inputStyle,
+ }
+ : inputStyle
+ }
+ type="text"
+ />
</HigherZIndex>
);
}