Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in __experimental_disablePlayPauseKeyboardShortcut method name #459

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions theatre/studio/src/TheatreStudio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {debounce, uniq} from 'lodash-es'
import type Sheet from '@theatre/core/sheets/Sheet'
import type {ProjectId} from '@theatre/sync-server/state/types/core'
import {
__experimental_disblePlayPauseKeyboardShortcut,
__experimental_disablePlayPauseKeyboardShortcut,
__experimental_enablePlayPauseKeyboardShortcut,
} from './UIRoot/useKeyboardShortcuts'
import type TheatreSheetObject from '@theatre/core/sheetObjects/TheatreSheetObject'
Expand Down Expand Up @@ -447,7 +447,7 @@ export interface IStudio {
* Disables the play/pause keyboard shortcut (spacebar)
* Also see `__experimental_enablePlayPauseKeyboardShortcut()` to re-enable it.
*/
__experimental_disblePlayPauseKeyboardShortcut(): void
__experimental_disablePlayPauseKeyboardShortcut(): void
/**
* Warning: This is an experimental API and will change in the future.
*
Expand Down Expand Up @@ -499,16 +499,16 @@ export default class TheatreStudio implements IStudio {
private readonly _cache = new SimpleCache()

__experimental = {
__experimental_disblePlayPauseKeyboardShortcut(): void {
__experimental_disablePlayPauseKeyboardShortcut(): void {
// This is an experimental API to respond to this issue: https://discord.com/channels/870988717190426644/870988717190426647/1067906775602430062
// Ideally we need a coherent way for the user to control keyboard inputs, so we will remove this method in the future.
// Here is the procedure for removing it:
// 1. Replace this code with a `throw new Error("This is experimental method is now deprecated, and here is how to migrate: ...")`
// 2. Then keep it for a few months, and then remove it.
__experimental_disblePlayPauseKeyboardShortcut()
__experimental_disablePlayPauseKeyboardShortcut()
},
__experimental_enablePlayPauseKeyboardShortcut(): void {
// see __experimental_disblePlayPauseKeyboardShortcut()
// see __experimental_disablePlayPauseKeyboardShortcut()
__experimental_enablePlayPauseKeyboardShortcut()
},
__experimental_clearPersistentStorage(persistenceKey?: string): void {
Expand Down
2 changes: 1 addition & 1 deletion theatre/studio/src/UIRoot/useKeyboardShortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type Sequence from '@theatre/core/sequences/Sequence'
import memoizeFn from '@theatre/utils/memoizeFn'

let playPauseKeyboardShortcutIsEnabled = true
export function __experimental_disblePlayPauseKeyboardShortcut() {
export function __experimental_disablePlayPauseKeyboardShortcut() {
playPauseKeyboardShortcutIsEnabled = false
}

Expand Down