-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Improved UX when pasting images and there is an error #3058
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e70f7c5
chore: refactor Growl component files
parasharrajat dc1e414
chg: updated the Error handling for image paste on composer
parasharrajat 781b63a
fix: text pasting
parasharrajat 7d76ea4
chg: refactor growl to the top so that it does not show statically on…
parasharrajat 1e8d4d1
Merge branch 'main' of github.com:Expensify/Expensify.cash into compo…
parasharrajat 2f7389c
correct misspelling
parasharrajat cc5732c
Pull latest changes
parasharrajat 8a4f8fc
comment updated
parasharrajat 12bafb9
Conflict resolved
parasharrajat 4ddc39d
use global growl in Profile page
parasharrajat 2f12f86
fix: Growl position for native devices
parasharrajat 68129ed
added constants for GROWL types
parasharrajat 72d8d86
Update src/components/GrowlNotification/index.js
parasharrajat d56ad45
Update src/libs/Growl.js
parasharrajat 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 hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
...er/GrowlNotificationContainerPropTypes.js → ...er/GrowlNotificationContainerPropTypes.js
This file contains hidden or 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
2 changes: 1 addition & 1 deletion
2
...ation/GrowlNotificationContainer/index.js → ...ation/GrowlNotificationContainer/index.js
This file contains hidden or 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
25 changes: 25 additions & 0 deletions
25
src/components/GrowlNotification/GrowlNotificationContainer/index.native.js
This file contains hidden or 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,25 @@ | ||
| import React from 'react'; | ||
| import {Animated} from 'react-native'; | ||
| import {SafeAreaInsetsContext} from 'react-native-safe-area-context'; | ||
| import styles, {getSafeAreaPadding} from '../../../styles/styles'; | ||
| import propTypes from './GrowlNotificationContainerPropTypes'; | ||
|
|
||
| const GrowlNotificationContainer = ({children, translateY}) => ( | ||
| <SafeAreaInsetsContext.Consumer> | ||
| {insets => ( | ||
| <Animated.View | ||
| style={[ | ||
| styles.growlNotificationContainer, | ||
| getSafeAreaPadding(insets), | ||
| styles.growlNotificationTranslateY(translateY), | ||
| ]} | ||
| > | ||
| {children} | ||
| </Animated.View> | ||
| )} | ||
| </SafeAreaInsetsContext.Consumer> | ||
| ); | ||
|
|
||
| GrowlNotificationContainer.propTypes = propTypes; | ||
|
|
||
| export default GrowlNotificationContainer; |
This file contains hidden or 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 hidden or 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 hidden or 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,18 @@ | ||
| import React from 'react'; | ||
| import CONST from '../CONST'; | ||
|
|
||
| export const growlRef = React.createRef(); | ||
|
|
||
| /** | ||
| * Show the growl notification | ||
| * | ||
| * @param {String} bodyText | ||
| * @param {String} type | ||
| * @param {Number} [duration] | ||
| */ | ||
| function show(bodyText, type, duration = CONST.GROWL.DURATION) { | ||
| growlRef.current.show(bodyText, type, duration); | ||
| } | ||
|
|
||
|
|
||
| export default {show}; | ||
19 changes: 0 additions & 19 deletions
19
src/libs/GrowlNotification/GrowlNotificationContainer/index.native.js
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.