-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change high resolution image with preview #44807
Merged
Julesssss
merged 52 commits into
Expensify:main
from
wildan-m:wildan/fix/38180-change-big-image-with-preview
Jul 15, 2024
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
751f540
Update version to 9.0.2-1
OSBotify d7542be
Merge pull request #44444 from software-mansion-labs/fix/link-to-with…
luacmartins 98e5373
Update version to 9.0.2-2
OSBotify 20f13e8
Merge pull request #44505 from Expensify/yuwen-fixSplitSelection
yuwenmemon d6c5cc5
Update version to 9.0.2-3
OSBotify 75d4ce9
Merge pull request #44508 from etCoderDysto/fixHold
carlosmiceli 7076b54
Change big image preview to thumbnail
wildan-m 012de0a
Move hi Res image caption to attachment modal, change local upload be…
wildan-m 8832aad
fix isHiResImage logic
wildan-m 26d983a
change isUsedInAttachmentModal to isUploaded for more accurate result
wildan-m 3cdd20b
Add info icon to hi res image text
wildan-m aa6b459
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m 04472fe
Refactor, remove unnecessary code
wildan-m f48e435
Remove redundant log, resolve typescript error
wildan-m 440fa48
Add attachmentImageResized localization
wildan-m baf2452
prettier, refactor
wildan-m 79bcfb5
replace rn text to custom text, remove unnecessary code, fix lint error.
wildan-m 72e0409
Fix bug multiple attachments
wildan-m a8d61d9
Fix crash on ios when tapping arrow on hi res to standard resolution …
wildan-m 6dafdc6
Run prettier, fix lint
wildan-m c67aa8a
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m 1acae72
lint
wildan-m 8ca81d8
Add comment to explain why using isAttachmentCarouselScrolling to del…
wildan-m f5bc3da
add attachmentTooLarge text
wildan-m 7208d5f
restore safeAreaPaddingBottomStyle
wildan-m 28f74b1
Refine setIsHighResolutionImage, DRY, remove unnecessary code
wildan-m b8d9717
revert accidentally commited code
wildan-m 25c372f
revert code xcode files
wildan-m 9a42575
Remove unnecessary code
wildan-m 53eda87
Add comment for previewSource type
wildan-m 314f738
Fix the gap between text and button too wide in native
wildan-m 1e94322
run prettier
wildan-m a017066
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m 208180d
Revise attachmentImageTooLarge spanish translation
wildan-m 3e3edf9
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m 4bf5652
prevent unnecessary change, rephrase comment
wildan-m 4daaae2
revert attachment modal
wildan-m 8698b5c
add value to isUploaded, move HighResolutionInfo to AttachmentView
wildan-m 50b7428
Adjust IMAGE_HIGH_RESOLUTION_THRESHOLD
wildan-m b7e8ec4
Merge
wildan-m d61979a
remove unnecessary code
wildan-m 1b698e8
remove unnecessary code
wildan-m 8444da1
run prettier
wildan-m dbd211a
Refactor HighResolutionInfo
wildan-m 66a807b
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m d67066a
Revert unnecessary change
wildan-m c34b47f
Adjust high resolution info padding
wildan-m 3534200
Merge branch 'main' of https://github.com/wildan-m/App into wildan/fi…
wildan-m bba81bd
run prettier
wildan-m 78ac528
fix isHighResolutionImage
wildan-m 4c23e80
re-adjust vertical padding highResolutionInfoPadding
wildan-m fa37c50
fix highresolutioninfo padding
wildan-m File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
32 changes: 32 additions & 0 deletions
32
src/components/Attachments/AttachmentView/HighResolutionInfo.tsx
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,32 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import Icon from '@components/Icon'; | ||
import * as Expensicons from '@components/Icon/Expensicons'; | ||
import Text from '@components/Text'; | ||
import useLocalize from '@hooks/useLocalize'; | ||
import useStyleUtils from '@hooks/useStyleUtils'; | ||
import useTheme from '@hooks/useTheme'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import variables from '@styles/variables'; | ||
|
||
function HighResolutionInfo({isUploaded}: {isUploaded: boolean}) { | ||
const theme = useTheme(); | ||
const styles = useThemeStyles(); | ||
const stylesUtils = useStyleUtils(); | ||
const {translate} = useLocalize(); | ||
|
||
return ( | ||
<View style={[styles.flexRow, styles.alignItemsCenter, styles.gap2, styles.justifyContentCenter, stylesUtils.getHighResolutionInfoWrapperStyle(isUploaded)]}> | ||
<Icon | ||
src={Expensicons.Info} | ||
height={variables.iconSizeExtraSmall} | ||
width={variables.iconSizeExtraSmall} | ||
fill={theme.icon} | ||
additionalStyles={styles.p1} | ||
/> | ||
<Text style={[styles.textLabelSupporting]}>{isUploaded ? translate('attachmentPicker.attachmentImageResized') : translate('attachmentPicker.attachmentImageTooLarge')}</Text> | ||
</View> | ||
); | ||
} | ||
|
||
export default HighResolutionInfo; |
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
11 changes: 11 additions & 0 deletions
11
src/styles/utils/getHighResolutionInfoWrapperStyle/index.native.ts
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,11 @@ | ||
// eslint-disable-next-line no-restricted-imports | ||
import spacing from '@styles/utils/spacing'; | ||
import type GetHighResolutionInfoWrapperStyle from './types'; | ||
|
||
const getHighResolutionInfoWrapperStyle: GetHighResolutionInfoWrapperStyle = (isUploaded) => ({ | ||
...spacing.ph8, | ||
...spacing.pt5, | ||
...(isUploaded ? spacing.pb5 : spacing.mbn1), | ||
}); | ||
|
||
export default getHighResolutionInfoWrapperStyle; |
11 changes: 11 additions & 0 deletions
11
src/styles/utils/getHighResolutionInfoWrapperStyle/index.ts
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,11 @@ | ||
// eslint-disable-next-line no-restricted-imports | ||
import spacing from '@styles/utils/spacing'; | ||
import type GetHighResolutionInfoWrapperStyle from './types'; | ||
|
||
const getHighResolutionInfoWrapperStyle: GetHighResolutionInfoWrapperStyle = (isUploaded) => ({ | ||
...spacing.ph5, | ||
...spacing.pt5, | ||
...(isUploaded ? spacing.pb5 : spacing.mbn1), | ||
}); | ||
|
||
export default getHighResolutionInfoWrapperStyle; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We didn't have a safe area padding bottom for HighResolutionInfo then it's overlapped with the Android controls which caused #54061