Skip to content

🎥 Make videos programmatically with React

`@remotion/studio`: Add missing tooltips to Studio controls

JonnyBurgerb081911d9855
diff --git a/packages/studio/src/components/InspectorLocationCopy.tsx b/packages/studio/src/components/InspectorLocationCopy.tsx
index 8d337de86a..c64f6092fb 100644
--- a/packages/studio/src/components/InspectorLocationCopy.tsx
+++ b/packages/studio/src/components/InspectorLocationCopy.tsx
@@ -108,7 +108,7 @@ export const InspectorLocationCopy: React.FC<{
locationType={null}
contextForAgents={contextForAgents}
location={openInEditorLocation}
- showTooltips={false}
+ showTooltips
/>
{contextForAgents ? (
<InlineAction
diff --git a/packages/studio/src/components/InspectorOpenInEditor.tsx b/packages/studio/src/components/InspectorOpenInEditor.tsx
index d68264167a..b9b3273c58 100644
--- a/packages/studio/src/components/InspectorOpenInEditor.tsx
+++ b/packages/studio/src/components/InspectorOpenInEditor.tsx
@@ -251,7 +251,7 @@ export const InspectorOpenInEditor: React.FC<{
if (menuItems.length > 0) {
result.push({
- ariaLabel: 'Open in another app',
+ ariaLabel: 'Open in...',
buttonId: null,
disabled: false,
idleColor: LIGHT_TEXT,
@@ -261,7 +261,7 @@ export const InspectorOpenInEditor: React.FC<{
segmentId: 'another-app',
selectedId: null,
style: dropdownSegmentStyle,
- tooltipLabel: showTooltips ? 'Open in another app' : null,
+ tooltipLabel: showTooltips ? 'Open in...' : null,
type: 'menu',
values: menuItems,
});
diff --git a/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx b/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx
index cc6b3d345c..1f03edff99 100644
--- a/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx
+++ b/packages/studio/src/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.tsx
@@ -14,6 +14,7 @@ import {areKeyboardShortcutsDisabled} from '../../helpers/use-keybinding';
import {useKeyboardShortcutLabel} from '../../helpers/use-keyboard-shortcut-label';
import {EllipsisIcon} from '../../icons/ellipsis';
import {SetSelectedModalContext} from '../../state/modals';
+import {ActionTooltip} from '../ActionTooltip';
import type {RenderInlineAction} from '../InlineAction';
import {InlineDropdown} from '../InlineDropdown';
import type {ComboboxValue} from '../NewComposition/ComboBox';
@@ -99,13 +100,20 @@ export const ExplorerQuickSwitcherTrigger: React.FC<{
<span style={shortcutLabel}>{quickSwitcherShortcut}</span>
) : null}
</button>
- <InlineDropdown
- variant={null}
- aria-label={moreActionsTitle}
- renderAction={renderMoreActions}
- getItems={getActions}
- className={FOCUS_VISIBLE_ONLY_CLASS_NAME}
- />
+ <ActionTooltip
+ label="More actions"
+ shortcut={null}
+ delay={800}
+ dismissOnClick
+ >
+ <InlineDropdown
+ variant={null}
+ aria-label={moreActionsTitle}
+ renderAction={renderMoreActions}
+ getItems={getActions}
+ className={FOCUS_VISIBLE_ONLY_CLASS_NAME}
+ />
+ </ActionTooltip>
</div>
);
};
diff --git a/packages/studio/src/components/TimeValue.tsx b/packages/studio/src/components/TimeValue.tsx
index dc9b1aa32a..35f85e8306 100644
--- a/packages/studio/src/components/TimeValue.tsx
+++ b/packages/studio/src/components/TimeValue.tsx
@@ -16,6 +16,7 @@ import {
import {useIsStill} from '../helpers/is-current-selected-still';
import {useKeybinding} from '../helpers/use-keybinding';
import {renderFrame} from '../state/render-frame';
+import {ActionTooltip} from './ActionTooltip';
import {Flex, Spacing} from './layout';
import {InputDragger} from './NewComposition/InputDragger';
import {TimelineTickFormatContext} from './Timeline/TimelineTickFormatProvider';
@@ -168,16 +169,23 @@ export const TimeValue: React.FC = () => {
status="ok"
style={currentTimeInputStyle}
/>
- <button
- type="button"
- className={`${HOVERABLE_CLASS_NAME} ${FOCUS_VISIBLE_ONLY_CLASS_NAME}`}
- style={currentTimeSubtitle}
- onClick={toggleTickFormat}
- aria-label="Show timeline ticks as frames"
- aria-pressed={showFrames}
+ <ActionTooltip
+ label="Toggle time format"
+ shortcut={null}
+ delay={800}
+ dismissOnClick
>
- {frame}
- </button>
+ <button
+ type="button"
+ className={`${HOVERABLE_CLASS_NAME} ${FOCUS_VISIBLE_ONLY_CLASS_NAME}`}
+ style={currentTimeSubtitle}
+ onClick={toggleTickFormat}
+ aria-label="Show timeline ticks as frames"
+ aria-pressed={showFrames}
+ >
+ {frame}
+ </button>
+ </ActionTooltip>
</div>
<Spacing x={2} />
<Flex />