-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add Video Call Chat Links #1878
Merged
Merged
Changes from 18 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
2eda7b9
initial commit
d495521
turned reportscreeen into a class component
a1c657e
added a button
aecd46e
Merge branch 'master' of https://github.com/Expensify/Expensify.cash …
917ca42
cleaned up
e506b41
scaffold popover in report screen
d1e4a8a
clean up
19e1500
Merge branch 'master' of https://github.com/Expensify/Expensify.cash …
2800fe5
Merge branch 'master' of https://github.com/Expensify/Expensify.cash …
2266752
set up a component for the menu
0bc93f7
Merge branch 'master' of https://github.com/Expensify/Expensify.cash …
3e919b4
added zoom and meet links and svgs
2a783c9
made the menu
0ec1237
loosened Icon prop conditions to allow for non-expensify content
48d4b1d
whoops
a75f4df
added style for video chat menu
1707c2f
took out custom style
ec774a4
style - keeping class comp for now
04d9b5c
Merge branch 'master' of https://github.com/Expensify/Expensify.cash …
692e9ad
updated zoom icon
ebbdbd8
refactored and included phone.svg
050b7d6
refactored headerview to class component
83a34e8
made video chat menu anchor to the ui button
1570d72
fixed report screen stuff
5d53d18
added additional style prop
df0544d
added animationOut prop for popovers
cbe1692
Merge branch 'master' of https://github.com/Expensify/Expensify.cash …
6331bd0
renamed the video chat component and included the button in it
0f77ca5
took lots of stuff out of the header view
bb2e83b
refactored back to stateless component
df8c590
cleaned up
112c806
whitespace
448ccc6
style
452fa7b
style
6fa2c38
changed style name and added support for arrays
c2590e7
clean up
9a5dd82
style
4f5ef64
changed wrapperStyle type to object
e9c932a
style
d994dd7
added menuItems array to constructor
f2f82b9
changed Icon propTypes
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import React, {Component} from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import Popover from './Popover'; | ||
import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions'; | ||
import MenuItem from './MenuItem'; | ||
import openURLInNewTab from '../libs/openURLInNewTab'; | ||
import ZoomIcon from '../../assets/images/Zoom - Blue.svg'; | ||
import GoogleMeetIcon from '../../assets/images/google-meet.svg'; | ||
import CONST from '../CONST'; | ||
|
||
const propTypes = { | ||
// State that determines whether to display the create menu or not | ||
isVisible: PropTypes.bool.isRequired, | ||
|
||
// Callback that determines behavior when menu is closed | ||
onClose: PropTypes.func.isRequired, | ||
|
||
...windowDimensionsPropTypes, | ||
}; | ||
|
||
class VideoChatMenu extends Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
render() { | ||
const menuItemData = [ | ||
{ | ||
icon: ZoomIcon, | ||
text: 'Zoom', | ||
onPress: () => openURLInNewTab(CONST.NEW_ZOOM_MEETING_URL), | ||
}, | ||
{ | ||
icon: GoogleMeetIcon, | ||
text: 'Google Meet', | ||
onPress: () => openURLInNewTab(CONST.NEW_GOOGLE_MEET_MEETING_URL), | ||
}, | ||
].map(item => ({ | ||
...item, | ||
onPress: () => { | ||
this.props.onItemSelected(); | ||
Luke9389 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
item.onPress(); | ||
}, | ||
})); | ||
return ( | ||
<Popover | ||
onClose={this.props.onClose} | ||
isVisible={this.props.isVisible} | ||
anchorPosition={{ | ||
left: this.props.windowWidth - 250, | ||
top: 50, | ||
}} | ||
> | ||
{menuItemData.map(({icon, text, onPress}) => ( | ||
<MenuItem | ||
key={text} | ||
icon={icon} | ||
title={text} | ||
onPress={onPress} | ||
/> | ||
))} | ||
</Popover> | ||
); | ||
} | ||
} | ||
|
||
VideoChatMenu.propTypes = propTypes; | ||
VideoChatMenu.displayName = 'VideoChatMenu'; | ||
export default withWindowDimensions(VideoChatMenu); |
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
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.
This is because I was reluctant to add the Zoom and Meet logos to a file called
Expensicons
😄. Willing to do so, but this was my preferred method.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.
I would say just do it! We could just as easily have called it
IconLibrary
or something, butExpensicons
is just a fun name. No need to let that affect the implementation imo.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.
Good call just importing the full-color
svg
directly where you used it. 👍🏼But I think that means that this change is unnecessary.
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.
Oh, I see why you need this. My mistake 👍
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.
Sorry I'm not seeing it where is this a
func
?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.
Are the svg imported as functions? 🤔
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.
They are imported as functional components
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.
Huh weird OK
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.
So then... validating that it is
serves no purpose at all ?
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.
Ah yeah good point. I think that is redundant now since any function will also pass this type check