From 150ac223e8fa53ce4a5e6d6aca63d7d370edf48e Mon Sep 17 00:00:00 2001 From: Someshwar Tripathi Date: Wed, 21 Feb 2024 01:42:52 +0530 Subject: [PATCH 1/6] Reorder Tooltip component in IconButton --- src/components/VideoPlayer/IconButton.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/VideoPlayer/IconButton.js b/src/components/VideoPlayer/IconButton.js index 71c1a2150692..7a9a93f5a626 100644 --- a/src/components/VideoPlayer/IconButton.js +++ b/src/components/VideoPlayer/IconButton.js @@ -40,12 +40,12 @@ const defaultProps = { function IconButton({src, fill, onPress, style, hoverStyle, tooltipText, small, shouldForceRenderingTooltipBelow}) { const styles = useThemeStyles(); return ( - - - {(isHovered) => ( + + {(isHovered) => ( + - )} - - + + )} + ); } From f278edc12c5d04148ae1539290ed7303ef68b8ad Mon Sep 17 00:00:00 2001 From: Someshwar Tripathi Date: Wed, 21 Feb 2024 02:16:10 +0530 Subject: [PATCH 2/6] Simplify component by using hoverStyle prop --- src/components/VideoPlayer/IconButton.js | 38 +++++++++++------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/src/components/VideoPlayer/IconButton.js b/src/components/VideoPlayer/IconButton.js index 7a9a93f5a626..eaf7ec532fb2 100644 --- a/src/components/VideoPlayer/IconButton.js +++ b/src/components/VideoPlayer/IconButton.js @@ -1,6 +1,5 @@ import PropTypes from 'prop-types'; import React from 'react'; -import Hoverable from '@components/Hoverable'; import Icon from '@components/Icon'; import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; import Tooltip from '@components/Tooltip'; @@ -40,26 +39,23 @@ const defaultProps = { function IconButton({src, fill, onPress, style, hoverStyle, tooltipText, small, shouldForceRenderingTooltipBelow}) { const styles = useThemeStyles(); return ( - - {(isHovered) => ( - - - - - - )} - + + + + + ); } From 691d12642545d1204a41e89f8e9880784845e15e Mon Sep 17 00:00:00 2001 From: Someshwar Tripathi Date: Mon, 4 Mar 2024 07:29:39 +0530 Subject: [PATCH 3/6] Update IconButton to use PressableWithFeedback --- src/components/VideoPlayer/IconButton.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/VideoPlayer/IconButton.js b/src/components/VideoPlayer/IconButton.js index eaf7ec532fb2..5af9bc87e66f 100644 --- a/src/components/VideoPlayer/IconButton.js +++ b/src/components/VideoPlayer/IconButton.js @@ -1,7 +1,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import Icon from '@components/Icon'; -import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback'; +import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; import Tooltip from '@components/Tooltip'; import useThemeStyles from '@hooks/useThemeStyles'; import stylePropTypes from '@styles/stylePropTypes'; @@ -43,7 +43,7 @@ function IconButton({src, fill, onPress, style, hoverStyle, tooltipText, small, text={tooltipText} shouldForceRenderingBelow={shouldForceRenderingTooltipBelow} > - - + ); } From 4d73fa3b00fbc230f264c3b4e804eaa21994e891 Mon Sep 17 00:00:00 2001 From: Someshwar Tripathi Date: Wed, 20 Mar 2024 00:56:40 +0530 Subject: [PATCH 4/6] Add View to the Expand Button --- src/components/VideoPlayerPreview/index.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/VideoPlayerPreview/index.js b/src/components/VideoPlayerPreview/index.js index 252bc53fc839..3e07352e6590 100644 --- a/src/components/VideoPlayerPreview/index.js +++ b/src/components/VideoPlayerPreview/index.js @@ -80,14 +80,15 @@ function VideoPlayerPreview({videoUrl, thumbnailUrl, fileName, videoDimensions, shouldUseSmallVideoControls style={[styles.w100, styles.h100]} /> - - + + + )} From 6836816e973fd1482fb8e3e0de8066bc891edd55 Mon Sep 17 00:00:00 2001 From: Someshwar Tripathi Date: Wed, 20 Mar 2024 02:20:28 +0530 Subject: [PATCH 5/6] Disable green hover on Expand button --- src/components/VideoPlayerPreview/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/VideoPlayerPreview/index.js b/src/components/VideoPlayerPreview/index.js index 3e07352e6590..4c08fc7baaa0 100644 --- a/src/components/VideoPlayerPreview/index.js +++ b/src/components/VideoPlayerPreview/index.js @@ -11,6 +11,8 @@ import useThumbnailDimensions from '@hooks/useThumbnailDimensions'; import useWindowDimensions from '@hooks/useWindowDimensions'; import CONST from '@src/CONST'; import VideoPlayerThumbnail from './VideoPlayerThumbnail'; +import useTheme from '@hooks/useTheme'; +import useStyleUtils from '@hooks/useStyleUtils'; const propTypes = { videoUrl: PropTypes.string.isRequired, @@ -37,6 +39,8 @@ const defaultProps = { function VideoPlayerPreview({videoUrl, thumbnailUrl, fileName, videoDimensions, videoDuration, onShowModalPress}) { const styles = useThemeStyles(); + const theme = useTheme(); + const StyleUtils = useStyleUtils(); const {translate} = useLocalize(); const {currentlyPlayingURL, updateCurrentlyPlayingURL} = usePlaybackContext(); const {isSmallScreenWidth} = useWindowDimensions(); @@ -84,6 +88,7 @@ function VideoPlayerPreview({videoUrl, thumbnailUrl, fileName, videoDimensions, Date: Wed, 20 Mar 2024 02:40:46 +0530 Subject: [PATCH 6/6] Run Prettier --- src/components/VideoPlayerPreview/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/VideoPlayerPreview/index.js b/src/components/VideoPlayerPreview/index.js index 4c08fc7baaa0..78dd297dbae3 100644 --- a/src/components/VideoPlayerPreview/index.js +++ b/src/components/VideoPlayerPreview/index.js @@ -6,13 +6,13 @@ import VideoPlayer from '@components/VideoPlayer'; import IconButton from '@components/VideoPlayer/IconButton'; import {usePlaybackContext} from '@components/VideoPlayerContexts/PlaybackContext'; import useLocalize from '@hooks/useLocalize'; +import useStyleUtils from '@hooks/useStyleUtils'; +import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import useThumbnailDimensions from '@hooks/useThumbnailDimensions'; import useWindowDimensions from '@hooks/useWindowDimensions'; import CONST from '@src/CONST'; import VideoPlayerThumbnail from './VideoPlayerThumbnail'; -import useTheme from '@hooks/useTheme'; -import useStyleUtils from '@hooks/useStyleUtils'; const propTypes = { videoUrl: PropTypes.string.isRequired,