Repository navigation
refactor: make millisecond units explicit in time parameter names - #552
Conversation
🦋 Changeset detectedLatest commit: b0d41c2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
51b6c6a to
d7500d9
Compare
|
I think it would be helpful to have CI run against v1-base as well. index cb92b28..861655c 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -2,11 +2,9 @@ name: Integration
on:
push:
- branches:
- - main
+ branches: [main, v1-base]
pull_request:
- branches:
- - main
+ branches: [main, v1-base]
jobs:
quality:How about adding the configuration above for now and removing it after the v1 migration? |
great thought 👍 I will do this |
a15da82 to
6ab60a6
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1-base #552 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 71 71
Lines 2288 2288
Branches 735 735
=========================================
Hits 2288 2288 🚀 New features to boost your workflow:
|
e9200e8 to
3efb689
Compare
|
Once this work is complete, please assign this issue to me! -> #538 |
hyesungoh
left a comment
There was a problem hiding this comment.
looks great! 👍 please check below comments 👍
| 'react-simplikit': major | ||
| --- | ||
|
|
||
| Renamed time related options and parameters to include Ms, making their units clearer and naming more consistent. |
There was a problem hiding this comment.
what about list up breacking changes? 🤔
| Renamed time related options and parameters to include Ms, making their units clearer and naming more consistent. | |
| Time-related options and parameters now include `Ms` in their names. | |
| These option keys are renamed, so existing calls need to be updated: | |
| - `useDebouncedCallback`: `timeThreshold` → `debounceMs` | |
| - `useThrottledCallback`: `timeThreshold` → `throttleMs` | |
| - `useImpressionRef`, `ImpressionArea`: `timeThreshold` → `timeThresholdMs` | |
| - `useLongPress`: `delay` → `delayMs` | |
| - `useAvoidKeyboard`: `transitionDuration` → `transitionDurationMs` | |
| ```ts | |
| // before | |
| useDebouncedCallback({ onChange: setQuery, timeThreshold: 300 }); | |
| // after | |
| useDebouncedCallback({ onChange: setQuery, debounceMs: 300 }); | |
| ``` | |
| The positional `wait` parameter of `useDebounce`, `useDebouncedValue`, `useThrottle` and `useThrottledValue` is now `debounceMs` / `throttleMs`. Calls like `useDebounce(fn, 300)` keep working. |
There was a problem hiding this comment.
I completely agree! 👍👍⭐️⭐️
Overview
Closes: #536
Add units to time related option names to make their meaning clearer.
Components
timeThreshold→timeThresholdMsHooks
delay→delayMsdelay→delayMstimeThreshold→debounceMswait→debounceMswait→debounceMswait→throttleMswait→throttleMswait→throttleMstransitionDuration→transitionDurationMsdelay→delayMsChecklist
yarn run fixto format and lint the code and docs?yarn run test:coverageto make sure there is no uncovered line?