Skip to content

Commit

Permalink
refactor: remove debounce from the new userContextMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawntraoz committed Jan 3, 2025
1 parent 643cf4b commit 8755122
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const callbackId = 'test-callback-id'
const stub: GetUserContextMessage = {
action: 'plugin-changed',
event: 'getUserContext',
debounce: false,
uid,
callbackId,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { isMessageToContainer, MessageToContainer } from './MessageToContainer'

export type GetUserContextMessage = MessageToContainer<'getUserContext'> & {
// Previously, debounced message was the default behavior.
// That debouncing implementation can be problematic, for example,
// when multiple field plugin instances request for user context.
debounce: false
}
export type GetUserContextMessage = MessageToContainer<'getUserContext'>

export const isGetUserContextMessage = (
obj: unknown,
Expand All @@ -17,6 +12,5 @@ export const getUserContextMessage = (
): GetUserContextMessage => ({
action: 'plugin-changed',
event: 'getUserContext',
debounce: false,
...options,
})

0 comments on commit 8755122

Please sign in to comment.