Skip to content

Commit

Permalink
feat: apply suggestions from code review by Demetrius
Browse files Browse the repository at this point in the history
Co-authored-by: Demetrius Feijóo <[email protected]>
  • Loading branch information
Dawntraoz and demetriusfeijoo authored Jan 3, 2025
1 parent 6dbc637 commit 77e0809
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe('LoadedMessage', () => {
}),
).toEqual(true)
})
it('is false', () => {
it('is a boolean and it is false', () => {
expect(
isLoadedMessage({
...stub,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe('StateChangedMessage', () => {
}),
).toEqual(true)
})
it('is false', () => {
it('is a boolean and it is false', () => {
expect(
isStateMessage({
...stub,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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 context.
// when multiple field plugin instances request for user context.
debounce: false
}

Expand Down
3 changes: 2 additions & 1 deletion packages/sandbox/src/components/FieldPluginSandbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,12 @@ const useSandbox = (
)

const onUserContextRequested = useCallback(
() =>
(message: GetUserContextMessage) =>
dispatchUserContextRequest({
uid,
action: 'get-user-context',
user,
callbackId: message.callbackId,
}),
[uid, dispatchUserContextRequest, user],
)
Expand Down

0 comments on commit 77e0809

Please sign in to comment.