Commit c8f79a9
refactor: apply full audit report improvements
- 2a: Convert copyFeedbackCooldown from this-based object to closure-based pattern
- 2b: Rename holdState → activationHoldState for clarity
- 2c: Rename detectionState → elementDetectionState for clarity
- 3a: Extract toPageCoordinates helper to deduplicate page-coordinate calculation
- 3b: Extract getElementBoundsCenter utility to utils/
- 3c: Extract updateToolbarState helper to eliminate duplicate toolbar state reconstruction
- 4c: Inline start method in createAutoScroller (was trivial wrapper)
- 4d: Extract recomputeLabelInstance function for readability
- 5a: Extract handleCopySuccessWithComments from deeply nested callback
- 5b: Extract getNearestEdge to utils/get-nearest-edge.ts
- 5d: Remove unnecessary 'as' casts in selection-label/index.tsx
Co-authored-by: aiden <aiden@million.dev>1 parent 14bc13d commit c8f79a9
File tree
5 files changed
+269
-230
lines changed- packages/react-grab/src
- components/selection-label
- core
- utils
5 files changed
+269
-230
lines changedLines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
| 301 | + | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
| 304 | + | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | 68 | | |
73 | 69 | | |
74 | 70 | | |
| |||
79 | 75 | | |
80 | 76 | | |
81 | 77 | | |
82 | | - | |
| 78 | + | |
83 | 79 | | |
84 | 80 | | |
85 | 81 | | |
| |||
0 commit comments