Skip to content

Commit

Permalink
Merge branch 'master' into feat/PG-1411
Browse files Browse the repository at this point in the history
  • Loading branch information
giannif committed May 2, 2024
2 parents 94158d9 + fa9d77b commit 6090bfa
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 15 deletions.
8 changes: 8 additions & 0 deletions packages/react-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## @giphy/react-components

## 9.4.1

### Patch Changes

- 2c48543: In order to avoid console warnings, dont' use fetchPriority prop until next React release

https://github.com/facebook/react/issues/27233

## 9.4.0

### Minor Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"@storybook/react-vite": "^7.1.0",
"@storybook/storybook-deployer": "^2.8.16",
"@storybook/testing-library": "^0.2.0",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"@types/storybook__react": "^5.2.1",
"@types/throttle-debounce": "^2.1.0",
"awesome-typescript-loader": "^5.2.1",
Expand All @@ -52,7 +52,7 @@
"webpack": "^5.74.0"
},
"name": "@giphy/react-components",
"version": "9.4.0",
"version": "9.4.1",
"description": "A lightweight set of components, focused on easy-of-use and performance.",
"homepage": "https://github.com/Giphy/giphy-js/tree/master/packages/react-components",
"main": "dist/index.js",
Expand Down
6 changes: 2 additions & 4 deletions packages/react-components/src/components/gif.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ type GifProps = {
borderRadius?: number
tabIndex?: number
style?: any
// issues with this will be resolved in the next React release:
// https://github.com/facebook/react/issues/27233
fetchPriority?: 'auto' | 'high' | 'low'
}

Expand Down Expand Up @@ -104,7 +106,6 @@ const Gif = ({
borderRadius = 4,
style,
tabIndex,
fetchPriority,
}: Props) => {
// only fire seen once per gif id
const [hasFiredSeen, setHasFiredSeen] = useState(false)
Expand Down Expand Up @@ -278,9 +279,6 @@ const Gif = ({
<img
ref={image}
suppressHydrationWarning
// @ts-ignore - fetchPriority is not recognized by React typescript
// eslint-disable-next-line react/no-unknown-property
fetchpriority={fetchPriority}
className={[Gif.imgClassName, loadedClassname].join(' ')}
src={shouldShowMedia ? rendition.url : placeholder}
style={{ background }}
Expand Down
26 changes: 18 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2583,8 +2583,8 @@ __metadata:
"@storybook/react-vite": ^7.1.0
"@storybook/storybook-deployer": ^2.8.16
"@storybook/testing-library": ^0.2.0
"@types/react": ^18.2.15
"@types/react-dom": ^18.2.7
"@types/react": ^18.2.79
"@types/react-dom": ^18.2.25
"@types/storybook__react": ^5.2.1
"@types/throttle-debounce": ^2.1.0
awesome-typescript-loader: ^5.2.1
Expand Down Expand Up @@ -5507,12 +5507,12 @@ __metadata:
languageName: node
linkType: hard

"@types/react-dom@npm:^18.2.7":
version: 18.2.7
resolution: "@types/react-dom@npm:18.2.7"
"@types/react-dom@npm:^18.2.25":
version: 18.2.25
resolution: "@types/react-dom@npm:18.2.25"
dependencies:
"@types/react": "npm:*"
checksum: e02ea908289a7ad26053308248d2b87f6aeafd73d0e2de2a3d435947bcea0422599016ffd1c3e38ff36c42f5e1c87c7417f05b0a157e48649e4a02f21727d54f
"@types/react": "*"
checksum: 85f9278d6456c6cdc76da6806a33b472588cdd029b08dde32e8b5636b25a3eae529b4ac2e08c848a3d7ca44e4e97ee9a3df406c96fa0768de935c8eed6e07590
languageName: node
linkType: hard

Expand Down Expand Up @@ -5543,7 +5543,7 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:*, @types/react@npm:>=16, @types/react@npm:^18.2.15":
"@types/react@npm:*, @types/react@npm:>=16":
version: 18.2.15
resolution: "@types/react@npm:18.2.15"
dependencies:
Expand All @@ -5554,6 +5554,16 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:^18.2.79":
version: 18.2.79
resolution: "@types/react@npm:18.2.79"
dependencies:
"@types/prop-types": "*"
csstype: ^3.0.2
checksum: 85aa96e0e88725c84d8fc5f04f10a4da6a1f507dde33557ac9cc211414756867721264bfefd9e02bae1288ce2905351d949b652b931e734ea24519ee5c625138
languageName: node
linkType: hard

"@types/scheduler@npm:*":
version: 0.16.3
resolution: "@types/scheduler@npm:0.16.3"
Expand Down

0 comments on commit 6090bfa

Please sign in to comment.