refactor: create a common resource to store debounce consts#9829
refactor: create a common resource to store debounce consts#9829
Conversation
8c3683c to
f97ca1f
Compare
jcfranco
left a comment
There was a problem hiding this comment.
This is headed in the right direction, but let's try to:
- move shared debounce delays to
calcite-components/src/utils/resources.ts - consolidate values by context (e.g., filtering, positioning)
|
Agreed. Something like: export const debounceValues = {
reposition: 100,
filter: 250,
overflow: 150,
nextTick: 0
}; |
| export const debounceValues = { | ||
| filter: 250, | ||
| nextTick: 0, | ||
| overflow: 150, |
There was a problem hiding this comment.
I wonder if we should rename overflow to resize?
There was a problem hiding this comment.
Yeah, in this case it's wrapping the resize method.
There was a problem hiding this comment.
Sounds good. Lets rename to resize 👍
| import { SLOTS as ACTION_MENU_SLOTS } from "../action-menu/resources"; | ||
| import { Layout } from "../interfaces"; | ||
|
|
||
| export const overflowActionsDebounceInMs = 150; |
| export const debounceValues = { | ||
| filter: 250, | ||
| nextTick: 0, | ||
| overflow: 150, |
jcfranco
left a comment
There was a problem hiding this comment.
🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉
🎉🥳🎉🎉🎉🥳🎉🎉🥳🥳🎉🎉🥳🥳🥳🎉🎉🥳🥳🥳🎉🥳🥳🥳🥳🎉🥳🎉
🎉🥳🥳🎉🎉🥳🎉🥳🎉🎉🥳🎉🎉🥳🎉🎉🥳🎉🎉🎉🎉🥳🎉🎉🎉🎉🥳🎉
🎉🥳🎉🥳🎉🥳🎉🥳🎉🎉🥳🎉🎉🥳🎉🎉🥳🎉🎉🎉🎉🥳🥳🥳🎉🎉🥳🎉
🎉🥳🎉🎉🥳🥳🎉🥳🎉🎉🥳🎉🎉🥳🎉🎉🥳🎉🎉🎉🎉🥳🎉🎉🎉🎉🎉🎉
🎉🥳🎉🎉🎉🥳🎉🎉🥳🥳🎉🎉🥳🥳🥳🎉🎉🥳🥳🥳🎉🥳🥳🥳🥳🎉🥳🎉
🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉
| await input.press("Tab"); | ||
|
|
||
| await page.waitForChanges(); | ||
| await page.waitForTimeout(DEBOUNCE.filter); |
There was a problem hiding this comment.
As a follow-up, let's see if this extra pair of waitForXs are needed. Also, some of the E2E/Puppeteer APIs call waitForChanges under the scenes, so some calls may not be necessary.
There was a problem hiding this comment.
Sounds good, I'm removing that waitForX double, seem so to pass without it.
…-to-monorepo * origin/dev: ci: fix env var case in workflows (#9877) docs(action): deprecates the compact property (#9847) fix(tab-title): Adjust hover styling for `bordered` Tab Title (#9867) chore(themed): add token CSS variable test helper (#9860) chore: avoid deleting untracked, non-generated files on npm run clean (#9866) chore(pick-list, pick-list-item, value-list-item): fix runtime deprecation messages (#9870) refactor: create a common resource to store debounce consts (#9829) test(tree): stabilize tests (#9853) chore(value-list-item): add runtime deprecation warning (#9863) chore: release next build(deps): update dependency composed-offset-position to v0.0.6 (#9834) feat(dialog): adds new dialog component and deprecates the modal component (#9751) chore: release next fix(panel, flow-item): prevent footer slots from conflicting with each other (#9856)
**Related Issue:** #5371 ## Summary Refactor: create a common resource to store debounce consts for `action-bar`, `combobox`, `filter`, `list`, `floating-ui`.
Related Issue: #5371
Summary
Refactor: create a common resource to store debounce consts for
action-bar,combobox,filter,list,floating-ui.