-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FX-5908] Fix initial position of Slider (#4572)
- Loading branch information
1 parent
dd142be
commit 0dbab90
Showing
14 changed files
with
102 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@toptal/picasso-slider': patch | ||
'@toptal/picasso': patch | ||
--- | ||
|
||
### Slider | ||
|
||
- fix initial position of Tooltip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@toptal/picasso-carousel': patch | ||
--- | ||
|
||
- refactor useOnScreen usage after the breaking change |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
'@toptal/picasso-utils': major | ||
'@toptal/picasso': major | ||
--- | ||
|
||
### useOnScreen | ||
|
||
- change return value of the hook to let component know when the oberver starts observing | ||
|
||
```diff | ||
-const isOnScreen = useOnScreen({...}) | ||
+const { isOnScreen, isObserved } = useOnScreen({...}) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,27 @@ | ||
|
||
|
||
// Mock for IntersectionObserver | ||
class IntersectionObserverMock { | ||
constructor(callback) { | ||
this.callback = callback; | ||
this.observables = []; | ||
} | ||
|
||
observe(element) { | ||
this.observables.push(element); | ||
this.callback([{ isIntersecting: true, target: element }]); // Customize as needed | ||
} | ||
|
||
unobserve(element) { | ||
this.observables = this.observables.filter(obs => obs !== element); | ||
} | ||
|
||
disconnect() { | ||
this.observables = []; | ||
} | ||
} | ||
|
||
// Mock global IntersectionObserver | ||
global.IntersectionObserver = IntersectionObserverMock; | ||
global.TextEncoder = require('util').TextEncoder; | ||
global.TextDecoder = require('util').TextDecoder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters