-
Notifications
You must be signed in to change notification settings - Fork 76
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
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should rename overflow
to resize
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, in this case it's wrapping the resize method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. Lets rename to resize
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dig it!
@@ -3,7 +3,6 @@ import { SLOTS as ACTION_GROUP_SLOTS } from "../action-group/resources"; | |||
import { SLOTS as ACTION_MENU_SLOTS } from "../action-menu/resources"; | |||
import { Layout } from "../interfaces"; | |||
|
|||
export const overflowActionsDebounceInMs = 150; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨🧹✨
export const debounceValues = { | ||
filter: 250, | ||
nextTick: 0, | ||
overflow: 150, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dig it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉
🎉🥳🎉🎉🎉🥳🎉🎉🥳🥳🎉🎉🥳🥳🥳🎉🎉🥳🥳🥳🎉🥳🥳🥳🥳🎉🥳🎉
🎉🥳🥳🎉🎉🥳🎉🥳🎉🎉🥳🎉🎉🥳🎉🎉🥳🎉🎉🎉🎉🥳🎉🎉🎉🎉🥳🎉
🎉🥳🎉🥳🎉🥳🎉🥳🎉🎉🥳🎉🎉🥳🎉🎉🥳🎉🎉🎉🎉🥳🥳🥳🎉🎉🥳🎉
🎉🥳🎉🎉🥳🥳🎉🥳🎉🎉🥳🎉🎉🥳🎉🎉🥳🎉🎉🎉🎉🥳🎉🎉🎉🎉🎉🎉
🎉🥳🎉🎉🎉🥳🎉🎉🥳🥳🎉🎉🥳🥳🥳🎉🎉🥳🥳🥳🎉🥳🥳🥳🥳🎉🥳🎉
🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉
await input.press("Tab"); | ||
|
||
await page.waitForChanges(); | ||
await page.waitForTimeout(DEBOUNCE.filter); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a follow-up, let's see if this extra pair of waitForX
s 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.