author
int64
658
755k
date
stringlengths
19
19
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
list
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
129,187
17.07.2019 19:09:09
14,400
13913bec0f609405fb9646cacdca430fb2eeafad
[native] Fix interplay between message tooltips and focus behavior
[ { "change_type": "MODIFY", "old_path": "native/chat/message-list.react.js", "new_path": "native/chat/message-list.react.js", "diff": "@@ -60,7 +60,7 @@ type Props = {|\nviewerID: ?string,\nstartReached: bool,\nscrollBlockingModalsClosed: bool,\n- lightboxIsTransitioning: bool,\n+ scrollBlockingModalsGone: bool,\n// Redux dispatch functions\ndispatchActionPromise: DispatchActionPromise,\n// async functions that hit server APIs\n@@ -99,7 +99,7 @@ class MessageList extends React.PureComponent<Props, State> {\nviewerID: PropTypes.string,\nstartReached: PropTypes.bool.isRequired,\nscrollBlockingModalsClosed: PropTypes.bool.isRequired,\n- lightboxIsTransitioning: PropTypes.bool.isRequired,\n+ scrollBlockingModalsGone: PropTypes.bool.isRequired,\ndispatchActionPromise: PropTypes.func.isRequired,\nfetchMessagesBeforeCursor: PropTypes.func.isRequired,\nfetchMostRecentMessages: PropTypes.func.isRequired,\n@@ -223,16 +223,24 @@ class MessageList extends React.PureComponent<Props, State> {\nif (\nthis.state.scrollDisabled &&\n- this.props.scrollBlockingModalsClosed &&\n- !this.props.lightboxIsTransitioning\n+ this.props.scrollBlockingModalsGone &&\n+ !prevProps.scrollBlockingModalsGone\n) {\nthis.setState({ scrollDisabled: false });\n} else if (\n!this.state.scrollDisabled &&\n- !this.props.scrollBlockingModalsClosed\n+ !this.props.scrollBlockingModalsClosed &&\n+ prevProps.scrollBlockingModalsClosed\n) {\nthis.setState({ scrollDisabled: true });\n}\n+\n+ if (\n+ this.props.scrollBlockingModalsClosed &&\n+ !prevProps.scrollBlockingModalsClosed\n+ ) {\n+ this.setState({ focusedMessageKey: null });\n+ }\n}\nrenderItem = (row: { item: ChatMessageItemWithHeight }) => {\n@@ -431,12 +439,15 @@ registerFetchKey(fetchMostRecentMessagesActionTypes);\nexport default connect(\n(state: AppState, ownProps: { threadInfo: ThreadInfo }) => {\nconst threadID = ownProps.threadInfo.id;\n+ const scrollBlockingModalsClosed =\n+ scrollBlockingChatModalsClosedSelector(state);\nreturn {\nviewerID: state.currentUserInfo && state.currentUserInfo.id,\nstartReached: !!(state.messageStore.threads[threadID] &&\nstate.messageStore.threads[threadID].startReached),\n- scrollBlockingModalsClosed: scrollBlockingChatModalsClosedSelector(state),\n- lightboxIsTransitioning: lightboxTransitioningSelector(state),\n+ scrollBlockingModalsClosed,\n+ scrollBlockingModalsGone: scrollBlockingModalsClosed &&\n+ !lightboxTransitioningSelector(state),\n};\n},\n{ fetchMessagesBeforeCursor, fetchMostRecentMessages },\n" }, { "change_type": "MODIFY", "old_path": "native/chat/message.react.js", "new_path": "native/chat/message.react.js", "diff": "@@ -110,7 +110,6 @@ class Message extends React.PureComponent<Props> {\nsetScrollDisabled={this.props.setScrollDisabled}\nverticalBounds={this.props.verticalBounds}\nkeyboardShowing={this.props.keyboardShowing}\n- scrollDisabled={this.props.scrollDisabled}\n/>\n);\n} else if (this.props.item.messageShapeType === \"multimedia\") {\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-message.react.js", "new_path": "native/chat/multimedia-message.react.js", "diff": "@@ -171,16 +171,6 @@ class MultimediaMessage extends React.PureComponent<Props> {\nlightboxPosition: PropTypes.instanceOf(Animated.Value),\n};\n- componentDidUpdate(prevProps: Props) {\n- if (\n- !this.props.scrollDisabled &&\n- prevProps.scrollDisabled &&\n- this.props.focused\n- ) {\n- this.props.toggleFocus(messageKey(this.props.item.messageInfo));\n- }\n- }\n-\nrender() {\nconst heightStyle = { height: this.props.item.contentHeight };\nreturn (\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message.react.js", "new_path": "native/chat/text-message.react.js", "diff": "@@ -69,7 +69,6 @@ type Props = {|\nsetScrollDisabled: (scrollDisabled: bool) => void,\nverticalBounds: ?VerticalBounds,\nkeyboardShowing: bool,\n- scrollDisabled: bool,\n|};\nclass TextMessage extends React.PureComponent<Props> {\n@@ -81,20 +80,9 @@ class TextMessage extends React.PureComponent<Props> {\nsetScrollDisabled: PropTypes.func.isRequired,\nverticalBounds: verticalBoundsPropType,\nkeyboardShowing: PropTypes.bool.isRequired,\n- scrollDisabled: PropTypes.bool.isRequired,\n};\nmessage: ?View;\n- componentDidUpdate(prevProps: Props) {\n- if (\n- !this.props.scrollDisabled &&\n- prevProps.scrollDisabled &&\n- this.props.focused\n- ) {\n- this.props.toggleFocus(messageKey(this.props.item.messageInfo));\n- }\n- }\n-\nrender() {\nconst { item } = this.props;\nconst { id, creator } = item.messageInfo;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Fix interplay between message tooltips and focus behavior
129,187
17.07.2019 19:36:45
14,400
4c05c86bcb147323a42a46d12c94e698618f6089
[native] Don't double-apply RoundedMessageContainer
[ { "change_type": "MODIFY", "old_path": "native/chat/composed-message.react.js", "new_path": "native/chat/composed-message.react.js", "diff": "import type { ChatMessageInfoItemWithHeight } from './message.react';\nimport { chatMessageItemPropType } from 'lib/selectors/chat-selectors';\nimport { assertComposableMessageType } from 'lib/types/message-types';\n-import type { ViewStyle } from '../types/styles';\nimport type { AppState } from '../redux/redux-setup';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n-import { Text, StyleSheet, View, ViewPropTypes } from 'react-native';\n+import { Text, StyleSheet, View } from 'react-native';\nimport Icon from 'react-native-vector-icons/Feather';\nimport { stringForUser } from 'lib/shared/user-utils';\nimport { connect } from 'lib/utils/redux-utils';\nimport FailedSend from './failed-send.react';\n-import { RoundedMessageContainer } from './rounded-message-container.react';\nimport { composedMessageMaxWidthSelector } from './composed-message-width';\ntype Props = {|\nitem: ChatMessageInfoItemWithHeight,\nsendFailed: bool,\n- style?: ViewStyle,\n- borderRadius: number,\nchildren: React.Node,\n// Redux state\ncomposedMessageMaxWidth: number,\n@@ -32,18 +28,13 @@ class ComposedMessage extends React.PureComponent<Props> {\nstatic propTypes = {\nitem: chatMessageItemPropType.isRequired,\nsendFailed: PropTypes.bool.isRequired,\n- style: ViewPropTypes.style,\n- borderRadius: PropTypes.number.isRequired,\nchildren: PropTypes.node.isRequired,\ncomposedMessageMaxWidth: PropTypes.number.isRequired,\n};\n- static defaultProps = {\n- borderRadius: 8,\n- };\nrender() {\nassertComposableMessageType(this.props.item.messageInfo.type);\n- const { item, borderRadius, style } = this.props;\n+ const { item } = this.props;\nconst { id, creator } = item.messageInfo;\nconst { isViewer } = creator;\n@@ -96,13 +87,7 @@ class ComposedMessage extends React.PureComponent<Props> {\n{authorName}\n<View style={[ styles.content, alignStyle ]}>\n<View style={[ styles.messageBox, messageBoxStyle, alignStyle ]}>\n- <RoundedMessageContainer\n- item={item}\n- borderRadius={borderRadius}\n- style={style}\n- >\n{this.props.children}\n- </RoundedMessageContainer>\n</View>\n{deliveryIcon}\n</View>\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-message.react.js", "new_path": "native/chat/multimedia-message.react.js", "diff": "@@ -177,8 +177,6 @@ class MultimediaMessage extends React.PureComponent<Props> {\n<ComposedMessage\nitem={this.props.item}\nsendFailed={sendFailed(this.props.item)}\n- borderRadius={borderRadius}\n- style={styles.row}\n>\n<View style={[heightStyle, styles.container]}>\n{this.renderContent()}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Don't double-apply RoundedMessageContainer
129,187
17.07.2019 19:52:05
14,400
8a1bd4aab1d103e158193e3167eb62d86196a898
[native] Use bottom instead of top for Timestamp positioning in message tooltips
[ { "change_type": "MODIFY", "old_path": "native/chat/multimedia-tooltip-button.react.js", "new_path": "native/chat/multimedia-tooltip-button.react.js", "diff": "@@ -89,13 +89,13 @@ class MultimediaTooltipButton extends React.PureComponent<Props> {\ninitialCoordinates,\nverticalOffset,\n} = this.props.navigation.state.params;\n- const top = -26 - verticalOffset;\n+ const bottom = initialCoordinates.height + verticalOffset;\nreturn {\nopacity: this.props.progress,\nposition: 'absolute',\nleft: -initialCoordinates.x,\nwidth: this.props.screenDimensions.width,\n- top,\n+ bottom,\n};\n}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message-tooltip-button.react.js", "new_path": "native/chat/text-message-tooltip-button.react.js", "diff": "@@ -68,12 +68,13 @@ class TextMessageTooltipButton extends React.PureComponent<Props> {\nget timestampStyle() {\nconst { initialCoordinates } = this.props.navigation.state.params;\n+ const bottom = initialCoordinates.height;\nreturn {\nopacity: this.props.progress,\nposition: 'absolute',\nleft: -initialCoordinates.x,\nwidth: this.props.screenDimensions.width,\n- top: -26,\n+ bottom,\n};\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Use bottom instead of top for Timestamp positioning in message tooltips
129,187
17.07.2019 22:19:46
14,400
bbc05a9143f444813d71d85d4be26432cc7b2997
[native] Show ComposedMessage author name on focus
[ { "change_type": "MODIFY", "old_path": "native/chat/composed-message.react.js", "new_path": "native/chat/composed-message.react.js", "diff": "@@ -19,6 +19,7 @@ import { composedMessageMaxWidthSelector } from './composed-message-width';\ntype Props = {|\nitem: ChatMessageInfoItemWithHeight,\nsendFailed: bool,\n+ focused: bool,\nchildren: React.Node,\n// Redux state\ncomposedMessageMaxWidth: number,\n@@ -28,13 +29,14 @@ class ComposedMessage extends React.PureComponent<Props> {\nstatic propTypes = {\nitem: chatMessageItemPropType.isRequired,\nsendFailed: PropTypes.bool.isRequired,\n+ focused: PropTypes.bool.isRequired,\nchildren: PropTypes.node.isRequired,\ncomposedMessageMaxWidth: PropTypes.number.isRequired,\n};\nrender() {\nassertComposableMessageType(this.props.item.messageInfo.type);\n- const { item } = this.props;\n+ const { item, focused } = this.props;\nconst { id, creator } = item.messageInfo;\nconst { isViewer } = creator;\n@@ -50,7 +52,7 @@ class ComposedMessage extends React.PureComponent<Props> {\n};\nlet authorName = null;\n- if (!isViewer && item.startsCluster) {\n+ if (!isViewer && (item.startsCluster || focused)) {\nauthorName = (\n<Text style={styles.authorName} numberOfLines={1}>\n{stringForUser(creator)}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-message.react.js", "new_path": "native/chat/multimedia-message.react.js", "diff": "@@ -177,6 +177,7 @@ class MultimediaMessage extends React.PureComponent<Props> {\n<ComposedMessage\nitem={this.props.item}\nsendFailed={sendFailed(this.props.item)}\n+ focused={this.props.focused}\n>\n<View style={[heightStyle, styles.container]}>\n{this.renderContent()}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message.react.js", "new_path": "native/chat/text-message.react.js", "diff": "@@ -97,6 +97,7 @@ class TextMessage extends React.PureComponent<Props> {\n<ComposedMessage\nitem={this.props.item}\nsendFailed={!!sendFailed}\n+ focused={this.props.focused}\n>\n<InnerTextMessage\nitem={this.props.item}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Show ComposedMessage author name on focus
129,187
17.07.2019 23:45:18
14,400
4224a836e969601fed9cc100f04fcc93deb30e3e
[native] Fix header/margin behavior in message tooltips and introduce MessageHeader
[ { "change_type": "MODIFY", "old_path": "lib/types/media-types.js", "new_path": "lib/types/media-types.js", "diff": "@@ -32,8 +32,6 @@ export type MediaInfo = {|\n...Media,\ncorners: Corners,\nindex: number,\n- messageID: string,\n- messageKey: string,\n|};\nexport const mediaTypePropType = PropTypes.oneOf([ \"photo\", \"video\" ]);\n@@ -58,8 +56,6 @@ export const mediaInfoPropType = PropTypes.shape({\n...mediaPropTypes,\ncorners: cornersPropType.isRequired,\nindex: PropTypes.number.isRequired,\n- messageID: PropTypes.string.isRequired,\n- messageKey: PropTypes.string.isRequired,\n});\nexport type UploadMultimediaResult = {|\n" }, { "change_type": "MODIFY", "old_path": "native/chat/composed-message.react.js", "new_path": "native/chat/composed-message.react.js", "diff": "@@ -7,14 +7,14 @@ import type { AppState } from '../redux/redux-setup';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n-import { Text, StyleSheet, View } from 'react-native';\n+import { StyleSheet, View } from 'react-native';\nimport Icon from 'react-native-vector-icons/Feather';\n-import { stringForUser } from 'lib/shared/user-utils';\nimport { connect } from 'lib/utils/redux-utils';\nimport FailedSend from './failed-send.react';\nimport { composedMessageMaxWidthSelector } from './composed-message-width';\n+import MessageHeader from './message-header.react';\ntype Props = {|\nitem: ChatMessageInfoItemWithHeight,\n@@ -51,15 +51,6 @@ class ComposedMessage extends React.PureComponent<Props> {\nmaxWidth: this.props.composedMessageMaxWidth,\n};\n- let authorName = null;\n- if (!isViewer && (item.startsCluster || focused)) {\n- authorName = (\n- <Text style={styles.authorName} numberOfLines={1}>\n- {stringForUser(creator)}\n- </Text>\n- );\n- }\n-\nlet deliveryIcon = null;\nlet failedSendInfo = null;\nif (isViewer) {\n@@ -85,8 +76,9 @@ class ComposedMessage extends React.PureComponent<Props> {\n}\nreturn (\n+ <View>\n+ <MessageHeader item={item} focused={focused} color=\"dark\" />\n<View style={containerStyle}>\n- {authorName}\n<View style={[ styles.content, alignStyle ]}>\n<View style={[ styles.messageBox, messageBoxStyle, alignStyle ]}>\n{this.props.children}\n@@ -95,6 +87,7 @@ class ComposedMessage extends React.PureComponent<Props> {\n</View>\n{failedSendInfo}\n</View>\n+ </View>\n);\n}\n@@ -115,13 +108,6 @@ const styles = StyleSheet.create({\nflexDirection: 'row',\nmarginRight: 5,\n},\n- authorName: {\n- color: '#777777',\n- fontSize: 14,\n- paddingHorizontal: 12,\n- paddingVertical: 4,\n- height: 25,\n- },\nleftChatBubble: {\njustifyContent: 'flex-start',\n},\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/chat/message-header.react.js", "diff": "+// @flow\n+\n+import type { ChatMessageInfoItemWithHeight } from './message.react';\n+\n+import * as React from 'react';\n+import { View, Text, StyleSheet } from 'react-native';\n+\n+import { stringForUser } from 'lib/shared/user-utils';\n+\n+import Timestamp from './timestamp.react';\n+\n+type Props = {|\n+ item: ChatMessageInfoItemWithHeight,\n+ focused: bool,\n+ color: 'light' | 'dark',\n+|};\n+function MessageHeader(props: Props) {\n+ const { item, focused, color } = props;\n+ const { creator, time } = item.messageInfo;\n+ const { isViewer } = creator;\n+\n+ let authorName = null;\n+ if (!isViewer && (item.startsCluster || focused)) {\n+ const style = color === 'light'\n+ ? [ styles.authorName, styles.light ]\n+ : [ styles.authorName, styles.dark ];\n+ authorName = (\n+ <Text style={style} numberOfLines={1}>\n+ {stringForUser(creator)}\n+ </Text>\n+ );\n+ }\n+\n+ const timestamp = focused || item.startsConversation\n+ ? <Timestamp time={time} color={color} />\n+ : null;\n+ if (!timestamp && !authorName) {\n+ return null;\n+ }\n+\n+ const style = !item.startsCluster\n+ ? styles.clusterMargin\n+ : null;\n+ return (\n+ <View style={style}>\n+ {timestamp}\n+ {authorName}\n+ </View>\n+ );\n+}\n+\n+const styles = StyleSheet.create({\n+ clusterMargin: {\n+ marginTop: 7,\n+ },\n+ authorName: {\n+ color: '#777777',\n+ fontSize: 14,\n+ marginLeft: 12,\n+ marginRight: 7,\n+ paddingHorizontal: 12,\n+ paddingVertical: 4,\n+ height: 25,\n+ },\n+ dark: {\n+ color: '#777777',\n+ },\n+ light: {\n+ color: 'white',\n+ },\n+});\n+\n+export default MessageHeader;\n" }, { "change_type": "MODIFY", "old_path": "native/chat/message.react.js", "new_path": "native/chat/message.react.js", "diff": "@@ -35,7 +35,6 @@ import {\nMultimediaMessage,\nmultimediaMessageItemHeight,\n} from './multimedia-message.react';\n-import Timestamp from './timestamp.react';\nexport type ChatMessageInfoItemWithHeight =\n| ChatRobotextMessageInfoItemWithHeight\n@@ -93,12 +92,6 @@ class Message extends React.PureComponent<Props> {\n}\nrender() {\n- let conversationHeader = null;\n- if (this.props.focused || this.props.item.startsConversation) {\n- conversationHeader = (\n- <Timestamp time={this.props.item.messageInfo.time} color=\"dark\" />\n- );\n- }\nlet message;\nif (this.props.item.messageShapeType === \"text\") {\nmessage = (\n@@ -129,25 +122,20 @@ class Message extends React.PureComponent<Props> {\nmessage = (\n<RobotextMessage\nitem={this.props.item}\n+ focused={this.props.focused}\ntoggleFocus={this.props.toggleFocus}\n/>\n);\n}\n- const messageView = (\n- <View>\n- {conversationHeader}\n- {message}\n- </View>\n- );\nif (Platform.OS === \"android\" && Platform.Version < 21) {\n// On old Android 4.4 devices, we can get a stack overflow during draw\n// when we use the TouchableWithoutFeedback below. It's just too deep of\n// a stack for the old hardware to handle\n- return messageView;\n+ return message;\n}\nreturn (\n<TouchableWithoutFeedback onPress={KeyboardUtils.dismiss}>\n- {messageView}\n+ {message}\n</TouchableWithoutFeedback>\n);\n}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-message-multimedia.react.js", "new_path": "native/chat/multimedia-message-multimedia.react.js", "diff": "// @flow\nimport { type MediaInfo, mediaInfoPropType } from 'lib/types/media-types';\n+import type {\n+ ChatMultimediaMessageInfoItem,\n+} from './multimedia-message.react';\nimport type { ImageStyle } from '../types/styles';\nimport {\ntype Navigate,\n@@ -23,11 +26,15 @@ import Animated from 'react-native-reanimated';\nimport { KeyboardUtils } from 'react-native-keyboard-input';\nimport invariant from 'invariant';\n+import { messageKey } from 'lib/shared/message-utils';\n+import { chatMessageItemPropType } from 'lib/selectors/chat-selectors';\n+\nimport InlineMultimedia from './inline-multimedia.react';\nimport { multimediaTooltipHeight } from './multimedia-tooltip-modal.react';\ntype Props = {|\nmediaInfo: MediaInfo,\n+ item: ChatMultimediaMessageInfoItem,\nnavigate: Navigate,\nverticalBounds: ?VerticalBounds,\nverticalOffset: number,\n@@ -49,6 +56,7 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\nstatic propTypes = {\nmediaInfo: mediaInfoPropType.isRequired,\n+ item: chatMessageItemPropType.isRequired,\nnavigate: PropTypes.func.isRequired,\nverticalBounds: verticalBoundsPropType,\nverticalOffset: PropTypes.number.isRequired,\n@@ -182,11 +190,12 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\nmessageFocused,\ntoggleMessageFocus,\nsetScrollDisabled,\n+ item,\nmediaInfo,\nverticalOffset,\n} = this.props;\nif (!messageFocused) {\n- toggleMessageFocus(mediaInfo.messageKey);\n+ toggleMessageFocus(messageKey(item.messageInfo));\n}\nsetScrollDisabled(true);\n@@ -200,7 +209,9 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\nconst belowMargin = 20;\nconst belowSpace = multimediaTooltipHeight + belowMargin;\n- const aboveMargin = verticalOffset === 0 ? 30 : 20;\n+ const { isViewer } = item.messageInfo.creator;\n+ const directlyAboveMargin = isViewer ? 30 : 50;\n+ const aboveMargin = verticalOffset === 0 ? directlyAboveMargin : 20;\nconst aboveSpace = multimediaTooltipHeight + aboveMargin;\nlet location = 'below', margin = belowMargin;\n@@ -216,6 +227,7 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\nrouteName: MultimediaTooltipModalRouteName,\nparams: {\nmediaInfo,\n+ item,\ninitialCoordinates: coordinates,\nverticalOffset,\nverticalBounds,\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-message.react.js", "new_path": "native/chat/multimedia-message.react.js", "diff": "@@ -21,8 +21,6 @@ import PropTypes from 'prop-types';\nimport invariant from 'invariant';\nimport Animated from 'react-native-reanimated';\n-import { messageKey, messageID } from 'lib/shared/message-utils';\n-\nimport ComposedMessage from './composed-message.react';\nimport MultimediaMessageMultimedia from './multimedia-message-multimedia.react';\nimport { withLightboxPositionContext } from '../media/lightbox-navigator.react';\n@@ -267,12 +265,10 @@ class MultimediaMessage extends React.PureComponent<Props> {\nfilteredCorners,\nborderRadius,\n);\n- const { pendingUploads, messageInfo } = this.props.item;\n+ const { pendingUploads } = this.props.item;\nconst mediaInfo = {\n...media,\ncorners: filteredCorners,\n- messageID: messageID(messageInfo),\n- messageKey: messageKey(messageInfo),\nindex,\n};\nconst pendingUpload = pendingUploads && pendingUploads[media.id];\n@@ -291,6 +287,7 @@ class MultimediaMessage extends React.PureComponent<Props> {\nmessageFocused={this.props.focused}\ntoggleMessageFocus={this.props.toggleFocus}\nsetScrollDisabled={this.props.setScrollDisabled}\n+ item={this.props.item}\nkey={index}\n/>\n);\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-tooltip-button.react.js", "new_path": "native/chat/multimedia-tooltip-button.react.js", "diff": "@@ -16,8 +16,10 @@ import type {\nNavigationScreenProp,\nNavigationLeafRoute,\n} from 'react-navigation';\n-import type { RawMessageInfo } from 'lib/types/message-types';\nimport type { AppState } from '../redux/redux-setup';\n+import type {\n+ ChatMultimediaMessageInfoItem,\n+} from './multimedia-message.react';\nimport * as React from 'react';\nimport Animated from 'react-native-reanimated';\n@@ -25,6 +27,8 @@ import PropTypes from 'prop-types';\nimport { View, StyleSheet } from 'react-native';\nimport { connect } from 'lib/utils/redux-utils';\n+import { chatMessageItemPropType } from 'lib/selectors/chat-selectors';\n+import { messageID } from 'lib/shared/message-utils';\nimport {\ntype ChatInputState,\n@@ -34,7 +38,7 @@ import {\nimport InlineMultimedia from './inline-multimedia.react';\nimport { multimediaMessageBorderRadius } from './multimedia-message.react';\nimport { getRoundedContainerStyle } from './rounded-message-container.react';\n-import Timestamp from './timestamp.react';\n+import MessageHeader from './message-header.react';\nimport { dimensionsSelector } from '../selectors/dimension-selectors';\nconst { Value } = Animated;\n@@ -48,6 +52,7 @@ type NavProp = NavigationScreenProp<{|\nlocation?: 'above' | 'below',\nmargin?: number,\n// Custom props\n+ item: ChatMultimediaMessageInfoItem,\nmediaInfo: MediaInfo,\nverticalOffset: number,\n},\n@@ -57,7 +62,6 @@ type Props = {\nnavigation: NavProp,\nprogress: Value,\n// Redux state\n- rawMessageInfo: ?RawMessageInfo,\nscreenDimensions: Dimensions,\n// withChatInputState\nchatInputState: ?ChatInputState,\n@@ -72,6 +76,7 @@ class MultimediaTooltipButton extends React.PureComponent<Props> {\nverticalBounds: verticalBoundsPropType.isRequired,\nlocation: PropTypes.oneOf([ 'above', 'below' ]),\nmargin: PropTypes.number,\n+ item: chatMessageItemPropType.isRequired,\nmediaInfo: mediaInfoPropType.isRequired,\nverticalOffset: PropTypes.number.isRequired,\n}).isRequired,\n@@ -79,12 +84,11 @@ class MultimediaTooltipButton extends React.PureComponent<Props> {\ngoBack: PropTypes.func.isRequired,\n}).isRequired,\nprogress: PropTypes.object.isRequired,\n- rawMessageInfo: PropTypes.object,\nscreenDimensions: dimensionsPropType.isRequired,\nchatInputState: chatInputStatePropType,\n};\n- get timestampStyle() {\n+ get headerStyle() {\nconst {\ninitialCoordinates,\nverticalOffset,\n@@ -101,12 +105,13 @@ class MultimediaTooltipButton extends React.PureComponent<Props> {\nrender() {\nconst { chatInputState } = this.props;\n- const { mediaInfo } = this.props.navigation.state.params;\n+ const { mediaInfo, item } = this.props.navigation.state.params;\n- const { id: mediaID, messageID } = mediaInfo;\n+ const { id: mediaID } = mediaInfo;\n+ const ourMessageID = messageID(item.messageInfo);\nconst pendingUploads = chatInputState\n&& chatInputState.pendingUploads\n- && chatInputState.pendingUploads[messageID];\n+ && chatInputState.pendingUploads[ourMessageID];\nconst pendingUpload = pendingUploads && pendingUploads[mediaID];\nconst postInProgress = !!pendingUploads;\n@@ -115,19 +120,11 @@ class MultimediaTooltipButton extends React.PureComponent<Props> {\nmultimediaMessageBorderRadius,\n);\n- let timestamp = null;\n- if (this.props.rawMessageInfo) {\n- const { time } = this.props.rawMessageInfo;\n- timestamp = (\n- <Animated.View style={this.timestampStyle}>\n- <Timestamp time={time} color=\"light\" />\n- </Animated.View>\n- );\n- }\n-\nreturn (\n<React.Fragment>\n- {timestamp}\n+ <Animated.View style={this.headerStyle}>\n+ <MessageHeader item={item} focused={true} color=\"light\" />\n+ </Animated.View>\n<View style={[ styles.media, roundedStyle ]}>\n<InlineMultimedia\nmediaInfo={mediaInfo}\n@@ -155,12 +152,7 @@ const styles = StyleSheet.create({\n});\nexport default connect(\n- (state: AppState, ownProps: { navigation: NavProp }) => {\n- const { messageID } = ownProps.navigation.state.params.mediaInfo;\n- const rawMessageInfo = state.messageStore.messages[messageID];\n- return {\n- rawMessageInfo,\n+ (state: AppState) => ({\nscreenDimensions: dimensionsSelector(state),\n- };\n- },\n+ }),\n)(withChatInputState(MultimediaTooltipButton));\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-tooltip-modal.react.js", "new_path": "native/chat/multimedia-tooltip-modal.react.js", "diff": "// @flow\nimport type { MediaInfo } from 'lib/types/media-types';\n+import type {\n+ ChatMultimediaMessageInfoItem,\n+} from './multimedia-message.react';\nimport { StyleSheet } from 'react-native';\n@@ -9,6 +12,7 @@ import MultimediaTooltipButton from './multimedia-tooltip-button.react';\nimport { saveImage } from '../media/save-image';\ntype CustomProps = {\n+ item: ChatMultimediaMessageInfoItem,\nmediaInfo: MediaInfo,\nverticalOffset: number,\n};\n" }, { "change_type": "MODIFY", "old_path": "native/chat/robotext-message.react.js", "new_path": "native/chat/robotext-message.react.js", "diff": "@@ -9,11 +9,12 @@ import {\ntype RobotextMessageInfo,\n} from 'lib/types/message-types';\n-import React from 'react';\n+import * as React from 'react';\nimport {\nText,\nStyleSheet,\nTouchableWithoutFeedback,\n+ View,\n} from 'react-native';\nimport PropTypes from 'prop-types';\nimport Hyperlink from 'react-native-hyperlink';\n@@ -27,6 +28,7 @@ import { threadInfoSelector } from 'lib/selectors/thread-selectors';\nimport { connect } from 'lib/utils/redux-utils';\nimport { MessageListRouteName } from '../navigation/route-names';\n+import Timestamp from './timestamp.react';\nexport type ChatRobotextMessageInfoItemWithHeight = {|\nitemType: \"message\",\n@@ -49,20 +51,31 @@ function robotextMessageItemHeight(\ntype Props = {|\nitem: ChatRobotextMessageInfoItemWithHeight,\n+ focused: bool,\ntoggleFocus: (messageKey: string) => void,\n|};\nclass RobotextMessage extends React.PureComponent<Props> {\nstatic propTypes = {\nitem: chatMessageItemPropType.isRequired,\n+ focused: PropTypes.bool.isRequired,\ntoggleFocus: PropTypes.func.isRequired,\n};\nrender() {\n+ let timestamp = null;\n+ if (this.props.focused || this.props.item.startsConversation) {\n+ timestamp = (\n+ <Timestamp time={this.props.item.messageInfo.time} color=\"dark\" />\n+ );\n+ }\nreturn (\n+ <View>\n+ {timestamp}\n<TouchableWithoutFeedback onPress={this.onPress}>\n{this.linkedRobotext()}\n</TouchableWithoutFeedback>\n+ </View>\n);\n}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message-tooltip-button.react.js", "new_path": "native/chat/text-message-tooltip-button.react.js", "diff": "@@ -23,8 +23,8 @@ import PropTypes from 'prop-types';\nimport { connect } from 'lib/utils/redux-utils';\nimport { dimensionsSelector } from '../selectors/dimension-selectors';\n-import Timestamp from './timestamp.react';\nimport InnerTextMessage from './inner-text-message.react';\n+import MessageHeader from './message-header.react';\nconst { Value } = Animated;\n@@ -66,7 +66,7 @@ class TextMessageTooltipButton extends React.PureComponent<Props> {\nscreenDimensions: dimensionsPropType.isRequired,\n};\n- get timestampStyle() {\n+ get headerStyle() {\nconst { initialCoordinates } = this.props.navigation.state.params;\nconst bottom = initialCoordinates.height;\nreturn {\n@@ -91,11 +91,10 @@ class TextMessageTooltipButton extends React.PureComponent<Props> {\nrender() {\nconst { item } = this.props.navigation.state.params;\n- const { time } = item.messageInfo;\nreturn (\n<React.Fragment>\n- <Animated.View style={this.timestampStyle}>\n- <Timestamp time={time} color=\"light\" />\n+ <Animated.View style={this.headerStyle}>\n+ <MessageHeader item={item} focused={true} color=\"light\" />\n</Animated.View>\n<InnerTextMessage\nitem={item}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message.react.js", "new_path": "native/chat/text-message.react.js", "diff": "@@ -139,7 +139,8 @@ class TextMessage extends React.PureComponent<Props> {\nconst belowMargin = 20;\nconst belowSpace = textMessageTooltipHeight + belowMargin;\n- const aboveMargin = 30;\n+ const { isViewer } = item.messageInfo.creator;\n+ const aboveMargin = isViewer ? 30 : 50;\nconst aboveSpace = textMessageTooltipHeight + aboveMargin;\nlet location = 'below', margin = belowMargin;\n" }, { "change_type": "MODIFY", "old_path": "native/chat/timestamp.react.js", "new_path": "native/chat/timestamp.react.js", "diff": "@@ -26,8 +26,7 @@ function Timestamp(props: Props) {\nconst styles = StyleSheet.create({\ntimestamp: {\nfontSize: 14,\n- paddingTop: 1,\n- paddingBottom: 7,\n+ paddingVertical: 3,\nalignSelf: 'center',\nheight: 26,\n},\n" }, { "change_type": "MODIFY", "old_path": "native/components/tooltip2.react.js", "new_path": "native/components/tooltip2.react.js", "diff": "@@ -39,7 +39,6 @@ const {\nValue,\nExtrapolate,\ninterpolate,\n- multiply,\n} = Animated;\ntype TooltipSpec<CustomProps> = {|\n@@ -127,17 +126,22 @@ function createTooltip<\nconst { initialCoordinates } = props.navigation.state.params;\nconst { y, height } = initialCoordinates;\nconst entryCount = tooltipSpec.entries.length;\n+ const { margin } = this;\nthis.tooltipVerticalAbove = interpolate(\nthis.progress,\n{\ninputRange: [ 0, 1 ],\n- outputRange: [ 20 + tooltipHeight(entryCount) / 2, 0 ],\n+ outputRange: [ margin + tooltipHeight(entryCount) / 2, 0 ],\nextrapolate: Extrapolate.CLAMP,\n},\n);\n- this.tooltipVerticalBelow = multiply(\n- this.tooltipVerticalAbove,\n- -1,\n+ this.tooltipVerticalBelow = interpolate(\n+ this.progress,\n+ {\n+ inputRange: [ 0, 1 ],\n+ outputRange: [ -margin - tooltipHeight(entryCount) / 2, 0 ],\n+ extrapolate: Extrapolate.CLAMP,\n+ },\n);\n}\n@@ -173,18 +177,22 @@ function createTooltip<\n};\n}\n+ get margin() {\n+ const customMargin = this.props.navigation.state.params.margin;\n+ return customMargin !== null && customMargin !== undefined\n+ ? customMargin\n+ : 20;\n+ }\n+\nget tooltipContainerStyle() {\nconst { screenDimensions, navigation } = this.props;\nconst {\ninitialCoordinates,\nverticalBounds,\nlocation,\n- margin: customMargin,\n} = navigation.state.params;\nconst { x, y, width, height } = initialCoordinates;\n- const margin = customMargin !== null && customMargin !== undefined\n- ? customMargin\n- : 20;\n+ const { margin } = this;\nconst extraLeftSpace = x;\nconst extraRightSpace = screenDimensions.width - width - x;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Fix header/margin behavior in message tooltips and introduce MessageHeader
129,187
18.07.2019 15:31:16
14,400
71ff8065dd2acc35102ef361e8478f24f91c9bdd
[native] Make whole TextMessage clickable Not just text
[ { "change_type": "MODIFY", "old_path": "native/chat/inner-text-message.react.js", "new_path": "native/chat/inner-text-message.react.js", "diff": "@@ -4,7 +4,7 @@ import { chatMessageItemPropType } from 'lib/selectors/chat-selectors';\nimport type { ChatTextMessageInfoItemWithHeight } from './text-message.react';\nimport * as React from 'react';\n-import { View, Text, StyleSheet } from 'react-native';\n+import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';\nimport PropTypes from 'prop-types';\nimport Hyperlink from 'react-native-hyperlink';\n@@ -49,6 +49,11 @@ class InnerTextMessage extends React.PureComponent<Props> {\n: styles.text;\nconst message = (\n+ <TouchableOpacity\n+ onPress={this.props.onPress}\n+ onLongPress={this.props.onPress}\n+ activeOpacity={0.6}\n+ >\n<RoundedMessageContainer item={item}>\n<Hyperlink\nlinkDefault={true}\n@@ -62,6 +67,7 @@ class InnerTextMessage extends React.PureComponent<Props> {\n>{text}</Text>\n</Hyperlink>\n</RoundedMessageContainer>\n+ </TouchableOpacity>\n);\nconst { messageRef } = this.props;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Make whole TextMessage clickable Not just text
129,187
19.07.2019 00:06:30
14,400
46132903af1b19a217e8fe9ad6559ba69314c53e
[native] Pass whole navigation prop down from MessageListContainer
[ { "change_type": "MODIFY", "old_path": "native/chat/message-list-container.react.js", "new_path": "native/chat/message-list-container.react.js", "diff": "@@ -10,12 +10,12 @@ import {\nchatMessageItemPropType,\n} from 'lib/selectors/chat-selectors';\nimport { type ThreadInfo, threadInfoPropType } from 'lib/types/thread-types';\n-import type {\n- NavigationScreenProp,\n- NavigationLeafRoute,\n-} from 'react-navigation';\nimport type { TextToMeasure } from '../text-height-measurer.react';\nimport type { ChatMessageInfoItemWithHeight } from './message.react';\n+import {\n+ type MessageListNavProp,\n+ messageListNavPropType,\n+} from './message-list-types';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n@@ -55,15 +55,8 @@ export type ChatMessageItemWithHeight =\n{| itemType: \"loader\" |} |\nChatMessageInfoItemWithHeight;\n-type NavProp = NavigationScreenProp<{|\n- ...NavigationLeafRoute,\n- params: {|\n- threadInfo: ThreadInfo,\n- |},\n-|}>;\n-\ntype Props = {|\n- navigation: NavProp,\n+ navigation: MessageListNavProp,\n// Redux state\nthreadInfo: ?ThreadInfo,\nmessageListData: $ReadOnlyArray<ChatMessageItem>,\n@@ -80,16 +73,7 @@ type State = {|\nclass MessageListContainer extends React.PureComponent<Props, State> {\nstatic propTypes = {\n- navigation: PropTypes.shape({\n- state: PropTypes.shape({\n- key: PropTypes.string.isRequired,\n- params: PropTypes.shape({\n- threadInfo: threadInfoPropType.isRequired,\n- }).isRequired,\n- }).isRequired,\n- navigate: PropTypes.func.isRequired,\n- setParams: PropTypes.func.isRequired,\n- }).isRequired,\n+ navigation: messageListNavPropType.isRequired,\nthreadInfo: threadInfoPropType,\nmessageListData: PropTypes.arrayOf(chatMessageItemPropType).isRequired,\ntextMessageMaxWidth: PropTypes.number.isRequired,\n@@ -222,7 +206,7 @@ class MessageListContainer extends React.PureComponent<Props, State> {\n<MessageList\nthreadInfo={threadInfo}\nmessageListData={listDataWithHeights}\n- navigate={this.props.navigation.navigate}\n+ navigation={this.props.navigation}\nimageGalleryOpen={this.state.imageGalleryOpen}\n/>\n);\n@@ -379,7 +363,7 @@ const styles = StyleSheet.create({\n});\nconst ConnectedMessageListContainer = connect(\n- (state: AppState, ownProps: { navigation: NavProp }) => {\n+ (state: AppState, ownProps: { navigation: MessageListNavProp }) => {\nconst threadID = ownProps.navigation.state.params.threadInfo.id;\nreturn {\nthreadInfo: threadInfoSelector(state)[threadID],\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/chat/message-list-types.js", "diff": "+// @flow\n+\n+import type {\n+ NavigationScreenProp,\n+ NavigationLeafRoute,\n+} from 'react-navigation';\n+import { type ThreadInfo, threadInfoPropType } from 'lib/types/thread-types';\n+\n+import PropTypes from 'prop-types';\n+\n+export type MessageListNavProp = NavigationScreenProp<{|\n+ ...NavigationLeafRoute,\n+ params: {|\n+ threadInfo: ThreadInfo,\n+ |},\n+|}>;\n+\n+export const messageListNavPropType = PropTypes.shape({\n+ state: PropTypes.shape({\n+ key: PropTypes.string.isRequired,\n+ params: PropTypes.shape({\n+ threadInfo: threadInfoPropType.isRequired,\n+ }).isRequired,\n+ }).isRequired,\n+ navigate: PropTypes.func.isRequired,\n+ setParams: PropTypes.func.isRequired,\n+});\n" }, { "change_type": "MODIFY", "old_path": "native/chat/message-list.react.js", "new_path": "native/chat/message-list.react.js", "diff": "@@ -7,8 +7,11 @@ import type { ViewToken } from 'react-native/Libraries/Lists/ViewabilityHelper';\nimport type { FetchMessageInfosPayload } from 'lib/types/message-types';\nimport type { DispatchActionPromise } from 'lib/utils/action-utils';\nimport type { ChatMessageItemWithHeight } from './message-list-container.react';\n-import type { Navigate } from '../navigation/route-names';\nimport type { VerticalBounds } from '../types/lightbox-types';\n+import {\n+ type MessageListNavProp,\n+ messageListNavPropType,\n+} from './message-list-types';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n@@ -54,7 +57,7 @@ import {\ntype Props = {|\nthreadInfo: ThreadInfo,\nmessageListData: $ReadOnlyArray<ChatMessageItemWithHeight>,\n- navigate: Navigate,\n+ navigation: MessageListNavProp,\nimageGalleryOpen: bool,\n// Redux state\nviewerID: ?string,\n@@ -88,13 +91,14 @@ type FlatListExtraData = {|\nkeyboardShowing: bool,\nmessageListVerticalBounds: ?VerticalBounds,\nfocusedMessageKey: ?string,\n+ navigation: MessageListNavProp,\n|};\nclass MessageList extends React.PureComponent<Props, State> {\nstatic propTypes = {\nthreadInfo: threadInfoPropType.isRequired,\nmessageListData: PropTypes.arrayOf(chatMessageItemPropType).isRequired,\n- navigate: PropTypes.func.isRequired,\n+ navigation: messageListNavPropType.isRequired,\nimageGalleryOpen: PropTypes.bool.isRequired,\nviewerID: PropTypes.string,\nstartReached: PropTypes.bool.isRequired,\n@@ -122,6 +126,7 @@ class MessageList extends React.PureComponent<Props, State> {\nkeyboardShowing: props.imageGalleryOpen,\nmessageListVerticalBounds: null,\nfocusedMessageKey: null,\n+ navigation: props.navigation,\n},\n};\n}\n@@ -132,17 +137,20 @@ class MessageList extends React.PureComponent<Props, State> {\n(propsAndState: PropsAndState) => propsAndState.messageListVerticalBounds,\n(propsAndState: PropsAndState) => propsAndState.imageGalleryOpen,\n(propsAndState: PropsAndState) => propsAndState.focusedMessageKey,\n+ (propsAndState: PropsAndState) => propsAndState.navigation,\n(\nscrollDisabled: bool,\nkeyboardShowing: bool,\nmessageListVerticalBounds: ?VerticalBounds,\nimageGalleryOpen: bool,\nfocusedMessageKey: ?string,\n+ navigation: MessageListNavProp,\n) => ({\nscrollDisabled,\nkeyboardShowing: keyboardShowing || imageGalleryOpen,\nmessageListVerticalBounds,\nfocusedMessageKey,\n+ navigation,\n}),\n);\n@@ -259,6 +267,7 @@ class MessageList extends React.PureComponent<Props, State> {\nkeyboardShowing,\nmessageListVerticalBounds,\nfocusedMessageKey,\n+ navigation,\n} = this.state.flatListExtraData;\nconst focused =\nmessageKey(messageInfoItem.messageInfo) === focusedMessageKey;\n@@ -266,7 +275,7 @@ class MessageList extends React.PureComponent<Props, State> {\n<Message\nitem={messageInfoItem}\nfocused={focused}\n- navigate={this.props.navigate}\n+ navigation={navigation}\ntoggleFocus={this.toggleMessageFocus}\nsetScrollDisabled={this.setScrollDisabled}\nverticalBounds={messageListVerticalBounds}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/message.react.js", "new_path": "native/chat/message.react.js", "diff": "@@ -10,11 +10,14 @@ import type {\nChatMultimediaMessageInfoItem,\n} from './multimedia-message.react';\nimport { chatMessageItemPropType } from 'lib/selectors/chat-selectors';\n-import type { Navigate } from '../navigation/route-names';\nimport {\ntype VerticalBounds,\nverticalBoundsPropType,\n} from '../types/lightbox-types';\n+import {\n+ type MessageListNavProp,\n+ messageListNavPropType,\n+} from './message-list-types';\nimport * as React from 'react';\nimport {\n@@ -62,7 +65,7 @@ function messageItemHeight(\ntype Props = {|\nitem: ChatMessageInfoItemWithHeight,\nfocused: bool,\n- navigate: Navigate,\n+ navigation: MessageListNavProp,\ntoggleFocus: (messageKey: string) => void,\nsetScrollDisabled: (scrollDisabled: bool) => void,\nverticalBounds: ?VerticalBounds,\n@@ -74,7 +77,7 @@ class Message extends React.PureComponent<Props> {\nstatic propTypes = {\nitem: chatMessageItemPropType.isRequired,\nfocused: PropTypes.bool.isRequired,\n- navigate: PropTypes.func.isRequired,\n+ navigation: messageListNavPropType.isRequired,\ntoggleFocus: PropTypes.func.isRequired,\nsetScrollDisabled: PropTypes.func.isRequired,\nverticalBounds: verticalBoundsPropType,\n@@ -97,7 +100,7 @@ class Message extends React.PureComponent<Props> {\nmessage = (\n<TextMessage\nitem={this.props.item}\n- navigate={this.props.navigate}\n+ navigation={this.props.navigation}\nfocused={this.props.focused}\ntoggleFocus={this.props.toggleFocus}\nsetScrollDisabled={this.props.setScrollDisabled}\n@@ -109,7 +112,7 @@ class Message extends React.PureComponent<Props> {\nmessage = (\n<MultimediaMessage\nitem={this.props.item}\n- navigate={this.props.navigate}\n+ navigation={this.props.navigation}\nfocused={this.props.focused}\ntoggleFocus={this.props.toggleFocus}\nsetScrollDisabled={this.props.setScrollDisabled}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-message-multimedia.react.js", "new_path": "native/chat/multimedia-message-multimedia.react.js", "diff": "@@ -6,7 +6,6 @@ import type {\n} from './multimedia-message.react';\nimport type { ImageStyle } from '../types/styles';\nimport {\n- type Navigate,\nMultimediaModalRouteName,\nMultimediaTooltipModalRouteName,\n} from '../navigation/route-names';\n@@ -18,6 +17,10 @@ import {\ntype PendingMultimediaUpload,\npendingMultimediaUploadPropType,\n} from './chat-input-state';\n+import {\n+ type MessageListNavProp,\n+ messageListNavPropType,\n+} from './message-list-types';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n@@ -35,7 +38,7 @@ import { multimediaTooltipHeight } from './multimedia-tooltip-modal.react';\ntype Props = {|\nmediaInfo: MediaInfo,\nitem: ChatMultimediaMessageInfoItem,\n- navigate: Navigate,\n+ navigation: MessageListNavProp,\nverticalBounds: ?VerticalBounds,\nverticalOffset: number,\nstyle: ImageStyle,\n@@ -57,7 +60,7 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\nstatic propTypes = {\nmediaInfo: mediaInfoPropType.isRequired,\nitem: chatMessageItemPropType.isRequired,\n- navigate: PropTypes.func.isRequired,\n+ navigation: messageListNavPropType.isRequired,\nverticalBounds: verticalBoundsPropType,\nverticalOffset: PropTypes.number.isRequired,\nscrollDisabled: PropTypes.bool.isRequired,\n@@ -162,7 +165,7 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\nview.measure((x, y, width, height, pageX, pageY) => {\nconst coordinates = { x: pageX, y: pageY, width, height };\n- this.props.navigate({\n+ this.props.navigation.navigate({\nrouteName: MultimediaModalRouteName,\nparams: { mediaInfo, initialCoordinates: coordinates, verticalBounds },\n});\n@@ -223,7 +226,7 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\nmargin = aboveMargin;\n}\n- this.props.navigate({\n+ this.props.navigation.navigate({\nrouteName: MultimediaTooltipModalRouteName,\nparams: {\nmediaInfo,\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-message.react.js", "new_path": "native/chat/multimedia-message.react.js", "diff": "@@ -8,12 +8,15 @@ import type {\nimport type { Media, Corners } from 'lib/types/media-types';\nimport type { ImageStyle } from '../types/styles';\nimport type { ThreadInfo } from 'lib/types/thread-types';\n-import type { Navigate } from '../navigation/route-names';\nimport {\ntype VerticalBounds,\nverticalBoundsPropType,\n} from '../types/lightbox-types';\nimport type { MessagePendingUploads } from './chat-input-state';\n+import {\n+ type MessageListNavProp,\n+ messageListNavPropType,\n+} from './message-list-types';\nimport * as React from 'react';\nimport { Text, StyleSheet, View } from 'react-native';\n@@ -145,7 +148,7 @@ const borderRadius = 16;\ntype Props = {|\nitem: ChatMultimediaMessageInfoItem,\n- navigate: Navigate,\n+ navigation: MessageListNavProp,\nfocused: bool,\ntoggleFocus: (messageKey: string) => void,\nsetScrollDisabled: (scrollDisabled: bool) => void,\n@@ -159,7 +162,7 @@ class MultimediaMessage extends React.PureComponent<Props> {\nstatic propTypes = {\nitem: chatMessageItemPropType.isRequired,\n- navigate: PropTypes.func.isRequired,\n+ navigation: messageListNavPropType.isRequired,\nfocused: PropTypes.bool.isRequired,\ntoggleFocus: PropTypes.func.isRequired,\nsetScrollDisabled: PropTypes.func.isRequired,\n@@ -275,7 +278,7 @@ class MultimediaMessage extends React.PureComponent<Props> {\nreturn (\n<MultimediaMessageMultimedia\nmediaInfo={mediaInfo}\n- navigate={this.props.navigate}\n+ navigation={this.props.navigation}\nverticalBounds={this.props.verticalBounds}\nverticalOffset={verticalOffset}\nstyle={[ style, roundedStyle ]}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message.react.js", "new_path": "native/chat/text-message.react.js", "diff": "@@ -10,7 +10,10 @@ import {\ntype VerticalBounds,\nverticalBoundsPropType,\n} from '../types/lightbox-types';\n-import type { Navigate } from '../navigation/route-names';\n+import {\n+ type MessageListNavProp,\n+ messageListNavPropType,\n+} from './message-list-types';\nimport * as React from 'react';\nimport { View } from 'react-native';\n@@ -63,7 +66,7 @@ function textMessageItemHeight(\ntype Props = {|\nitem: ChatTextMessageInfoItemWithHeight,\n- navigate: Navigate,\n+ navigation: MessageListNavProp,\nfocused: bool,\ntoggleFocus: (messageKey: string) => void,\nsetScrollDisabled: (scrollDisabled: bool) => void,\n@@ -74,7 +77,7 @@ class TextMessage extends React.PureComponent<Props> {\nstatic propTypes = {\nitem: chatMessageItemPropType.isRequired,\n- navigate: PropTypes.func.isRequired,\n+ navigation: messageListNavPropType.isRequired,\nfocused: PropTypes.bool.isRequired,\ntoggleFocus: PropTypes.func.isRequired,\nsetScrollDisabled: PropTypes.func.isRequired,\n@@ -152,7 +155,7 @@ class TextMessage extends React.PureComponent<Props> {\nmargin = aboveMargin;\n}\n- this.props.navigate({\n+ this.props.navigation.navigate({\nrouteName: TextMessageTooltipModalRouteName,\nparams: {\ninitialCoordinates: coordinates,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Pass whole navigation prop down from MessageListContainer
129,187
19.07.2019 00:07:27
14,400
2f70ec27957cd1157644cbf2ac7ec9fd6efc75f0
[native] Wrap inactive lightbox scenes in pointerEvents="none"
[ { "change_type": "MODIFY", "old_path": "native/media/lightbox-navigator.react.js", "new_path": "native/media/lightbox-navigator.react.js", "diff": "@@ -142,8 +142,9 @@ class Lightbox extends React.PureComponent<Props> {\n}\nconst { navigation, getComponent } = scene.descriptor;\nconst SceneComponent = getComponent();\n+ const pointerEvents = scene.isActive ? \"auto\" : \"none\";\nreturn (\n- <View style={styles.scene} key={scene.key}>\n+ <View style={styles.scene} key={scene.key} pointerEvents={pointerEvents}>\n<SceneComponent\nnavigation={navigation}\nscene={scene}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Wrap inactive lightbox scenes in pointerEvents="none"
129,187
19.07.2019 00:14:22
14,400
6a800e99384ab3c7eb8739d56db9e84bcdd1a1b9
[native] Disable Stack gestures on MessageListContainer while modals open
[ { "change_type": "MODIFY", "old_path": "native/chat/message-list-container.react.js", "new_path": "native/chat/message-list-container.react.js", "diff": "@@ -97,6 +97,7 @@ class MessageListContainer extends React.PureComponent<Props, State> {\n)\n: null,\nheaderBackTitle: \"Back\",\n+ gesturesEnabled: !navigation.state.params.gesturesDisabled,\n});\nconstructor(props: Props) {\n" }, { "change_type": "MODIFY", "old_path": "native/chat/message-list.react.js", "new_path": "native/chat/message-list.react.js", "diff": "@@ -205,7 +205,7 @@ class MessageList extends React.PureComponent<Props, State> {\n}\n}\n- componentDidUpdate(prevProps: Props) {\n+ componentDidUpdate(prevProps: Props, prevState: State) {\nconst oldThreadInfo = prevProps.threadInfo;\nconst newThreadInfo = this.props.threadInfo;\nif (\n@@ -249,6 +249,12 @@ class MessageList extends React.PureComponent<Props, State> {\n) {\nthis.setState({ focusedMessageKey: null });\n}\n+\n+ if (!prevState.scrollDisabled && this.state.scrollDisabled) {\n+ this.props.navigation.setParams({ gesturesDisabled: true });\n+ } else if (prevState.scrollDisabled && !this.state.scrollDisabled) {\n+ this.props.navigation.setParams({ gesturesDisabled: false });\n+ }\n}\nrenderItem = (row: { item: ChatMessageItemWithHeight }) => {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Disable Stack gestures on MessageListContainer while modals open
129,187
19.07.2019 16:28:45
14,400
0a58109a1fcfc1d4c4ccde2c5f5544dce0660925
[native] Handle tooltips wider than content
[ { "change_type": "MODIFY", "old_path": "native/components/tooltip2.react.js", "new_path": "native/components/tooltip2.react.js", "diff": "@@ -38,6 +38,8 @@ import TooltipItem from './tooltip2-item.react';\nconst {\nValue,\nExtrapolate,\n+ add,\n+ multiply,\ninterpolate,\n} = Animated;\n@@ -100,6 +102,8 @@ function createTooltip<\nbackdropOpacity: Value;\ntooltipVerticalAbove: Value;\ntooltipVerticalBelow: Value;\n+ tooltipHorizontalOffset = new Animated.Value(0);\n+ tooltipHorizontal: Value;\nconstructor(props: TooltipPropsType) {\nsuper(props);\n@@ -143,6 +147,11 @@ function createTooltip<\nextrapolate: Extrapolate.CLAMP,\n},\n);\n+\n+ this.tooltipHorizontal = multiply(\n+ add(1, multiply(-1, this.progress)),\n+ this.tooltipHorizontalOffset,\n+ );\n}\nget opacityStyle() {\n@@ -194,19 +203,24 @@ function createTooltip<\nconst { x, y, width, height } = initialCoordinates;\nconst { margin } = this;\n- const extraLeftSpace = x;\n- const extraRightSpace = screenDimensions.width - width - x;\n- const extraSpace = Math.min(extraLeftSpace, extraRightSpace);\n- const left = x - extraSpace;\n- const containerWidth = width + 2 * extraSpace;\n-\nconst style: ViewStyle = {\nposition: 'absolute',\n- left,\n- width: containerWidth,\nalignItems: 'center',\n- transform: [],\n+ transform: [\n+ { translateX: this.tooltipHorizontal },\n+ ],\n};\n+\n+ const extraLeftSpace = x;\n+ const extraRightSpace = screenDimensions.width - width - x;\n+ if (extraLeftSpace < extraRightSpace) {\n+ style.left = 0;\n+ style.minWidth = width + 2 * extraLeftSpace;\n+ } else {\n+ style.right = 0;\n+ style.minWidth = width + 2 * extraRightSpace;\n+ }\n+\nif (location === 'above') {\nconst fullScreenHeight = screenDimensions.height + contentBottomOffset;\nstyle.bottom = fullScreenHeight -\n@@ -244,14 +258,16 @@ function createTooltip<\nlet triangleDown = null;\nlet triangleUp = null;\n- const { location } = navigation.state.params;\n+ const { location, initialCoordinates } = navigation.state.params;\n+ const { x, width } = initialCoordinates;\n+ const triangleStyle = { left: x + (width - 20) / 2 };\nif (location === 'above') {\ntriangleDown = (\n- <View style={styles.triangleDown} />\n+ <View style={[ styles.triangleDown, triangleStyle ]} />\n);\n} else {\ntriangleUp = (\n- <View style={styles.triangleUp} />\n+ <View style={[ styles.triangleUp, triangleStyle ]} />\n);\n}\n@@ -267,7 +283,10 @@ function createTooltip<\n/>\n</View>\n</View>\n- <Animated.View style={this.tooltipContainerStyle}>\n+ <Animated.View\n+ style={this.tooltipContainerStyle}\n+ onLayout={this.onTooltipContainerLayout}\n+ >\n{triangleUp}\n<View style={styles.entries}>\n{entries}\n@@ -294,6 +313,25 @@ function createTooltip<\nthis.props.navigation.goBack();\n}\n+ onTooltipContainerLayout = (\n+ event: { nativeEvent: { layout: { x: number, width: number } } },\n+ ) => {\n+ const { navigation, screenDimensions } = this.props;\n+ const { x, width } = navigation.state.params.initialCoordinates;\n+\n+ const extraLeftSpace = x;\n+ const extraRightSpace = screenDimensions.width - width - x;\n+\n+ const actualWidth = event.nativeEvent.layout.width;\n+ if (extraLeftSpace < extraRightSpace) {\n+ const minWidth = width + 2 * extraLeftSpace;\n+ this.tooltipHorizontalOffset.setValue((minWidth - actualWidth) / 2);\n+ } else {\n+ const minWidth = width + 2 * extraRightSpace;\n+ this.tooltipHorizontalOffset.setValue((actualWidth - minWidth) / 2);\n+ }\n+ }\n+\n}\nreturn connect(\n(state: AppState) => ({\n@@ -328,6 +366,7 @@ const styles = StyleSheet.create({\nborderBottomColor: \"#E1E1E1\",\n},\ntriangleDown: {\n+ alignSelf: 'flex-start',\nwidth: 10,\nheight: 10,\nborderStyle: 'solid',\n@@ -342,6 +381,7 @@ const styles = StyleSheet.create({\ntop: Platform.OS === \"android\" ? -1 : 0,\n},\ntriangleUp: {\n+ alignSelf: 'flex-start',\nwidth: 10,\nheight: 10,\nborderStyle: 'solid',\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Handle tooltips wider than content
129,187
19.07.2019 16:49:02
14,400
e80c3da55ebd98e7e0b41ec612fd79ad88aafdc1
[native] Move LightboxNavigator to navigation folder
[ { "change_type": "MODIFY", "old_path": "native/chat/multimedia-message.react.js", "new_path": "native/chat/multimedia-message.react.js", "diff": "@@ -26,7 +26,9 @@ import Animated from 'react-native-reanimated';\nimport ComposedMessage from './composed-message.react';\nimport MultimediaMessageMultimedia from './multimedia-message-multimedia.react';\n-import { withLightboxPositionContext } from '../media/lightbox-navigator.react';\n+import {\n+ withLightboxPositionContext,\n+} from '../navigation/lightbox-navigator.react';\nimport {\nallCorners,\nfilterCorners,\n" }, { "change_type": "RENAME", "old_path": "native/media/lightbox-navigator.react.js", "new_path": "native/navigation/lightbox-navigator.react.js", "diff": "" }, { "change_type": "MODIFY", "old_path": "native/navigation/navigation-setup.js", "new_path": "native/navigation/navigation-setup.js", "diff": "@@ -103,7 +103,7 @@ import CustomServerModal from '../more/custom-server-modal.react';\nimport ColorPickerModal from '../chat/settings/color-picker-modal.react';\nimport ComposeSubthreadModal\nfrom '../chat/settings/compose-subthread-modal.react';\n-import { createLightboxNavigator } from '../media/lightbox-navigator.react';\n+import { createLightboxNavigator } from './lightbox-navigator.react';\nimport MultimediaModal from '../media/multimedia-modal.react';\nimport { MultimediaTooltipModal } from '../chat/multimedia-tooltip-modal.react';\nimport ChatInputStateContainer from '../chat/chat-input-state-container.react';\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Move LightboxNavigator to navigation folder
129,187
19.07.2019 16:52:44
14,400
7a75c27162660a4255fd398de058be5c8f9d0bea
[native] MultimediaSavedModal -> ActionResultModal
[ { "change_type": "MODIFY", "old_path": "native/media/save-image.js", "new_path": "native/media/save-image.js", "diff": "@@ -12,7 +12,7 @@ import { fileInfoFromData } from 'lib/utils/file-utils';\nimport { blobToDataURI, dataURIToIntArray } from '../utils/media-utils';\nimport { dispatch } from '../redux/redux-setup';\n-import { MultimediaSavedModalRouteName } from '../navigation/route-names';\n+import { ActionResultModalRouteName } from '../navigation/route-names';\nasync function saveImage(mediaInfo: MediaInfo) {\nlet result, message;\n@@ -33,7 +33,7 @@ async function saveImage(mediaInfo: MediaInfo) {\ndispatch({\n// We do this for Flow\n...NavigationActions.navigate({\n- routeName: MultimediaSavedModalRouteName,\n+ routeName: ActionResultModalRouteName,\nparams: { message },\n}),\n});\n" }, { "change_type": "RENAME", "old_path": "native/media/multimedia-saved-modal.react.js", "new_path": "native/navigation/action-result-modal.react.js", "diff": "@@ -31,7 +31,7 @@ type Props = {|\nscene: NavigationScene,\nposition: Value,\n|};\n-class MultimediaSavedModal extends React.PureComponent<Props> {\n+class ActionResultModal extends React.PureComponent<Props> {\nstatic propTypes = {\nnavigation: PropTypes.shape({\n@@ -118,4 +118,4 @@ const styles = StyleSheet.create({\n},\n});\n-export default MultimediaSavedModal;\n+export default ActionResultModal;\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/navigation-setup.js", "new_path": "native/navigation/navigation-setup.js", "diff": "@@ -89,7 +89,7 @@ import {\nComposeSubthreadModalRouteName,\nMultimediaModalRouteName,\nMultimediaTooltipModalRouteName,\n- MultimediaSavedModalRouteName,\n+ ActionResultModalRouteName,\nTextMessageTooltipModalRouteName,\naccountModals,\n} from './route-names';\n@@ -107,7 +107,7 @@ import { createLightboxNavigator } from './lightbox-navigator.react';\nimport MultimediaModal from '../media/multimedia-modal.react';\nimport { MultimediaTooltipModal } from '../chat/multimedia-tooltip-modal.react';\nimport ChatInputStateContainer from '../chat/chat-input-state-container.react';\n-import MultimediaSavedModal from '../media/multimedia-saved-modal.react';\n+import ActionResultModal from '../navigation/action-result-modal.react';\nimport {\nTextMessageTooltipModal,\n} from '../chat/text-message-tooltip-modal.react';\n@@ -173,7 +173,7 @@ const AppNavigator = createLightboxNavigator(\n[TabNavigatorRouteName]: TabNavigator,\n[MultimediaModalRouteName]: MultimediaModal,\n[MultimediaTooltipModalRouteName]: MultimediaTooltipModal,\n- [MultimediaSavedModalRouteName]: MultimediaSavedModal,\n+ [ActionResultModalRouteName]: ActionResultModal,\n[TextMessageTooltipModalRouteName]: TextMessageTooltipModal,\n},\n);\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/route-names.js", "new_path": "native/navigation/route-names.js", "diff": "@@ -37,7 +37,7 @@ export const ColorPickerModalRouteName = 'ColorPickerModal';\nexport const ComposeSubthreadModalRouteName = 'ComposeSubthreadModal';\nexport const MultimediaModalRouteName = 'MultimediaModal';\nexport const MultimediaTooltipModalRouteName = 'MultimediaTooltipModal';\n-export const MultimediaSavedModalRouteName = 'MultimediaSavedModal';\n+export const ActionResultModalRouteName = 'ActionResultModal';\nexport const TextMessageTooltipModalRouteName = 'TextMessageTooltipModal';\nexport const accountModals = [\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] MultimediaSavedModal -> ActionResultModal
129,187
19.07.2019 17:03:35
14,400
104af222ac87ee5bf545700c04f5545e4937f486
[native] displayActionResultModal
[ { "change_type": "MODIFY", "old_path": "native/chat/text-message-tooltip-modal.react.js", "new_path": "native/chat/text-message-tooltip-modal.react.js", "diff": "@@ -6,6 +6,7 @@ import { Clipboard, StyleSheet } from 'react-native';\nimport { createTooltip, tooltipHeight } from '../components/tooltip2.react';\nimport TextMessageTooltipButton from './text-message-tooltip-button.react';\n+import { displayActionResultModal } from '../navigation/action-result-modal';\ntype CustomProps = {\nitem: ChatTextMessageInfoItemWithHeight,\n@@ -13,6 +14,7 @@ type CustomProps = {\nfunction onPressCopy(props: CustomProps) {\nClipboard.setString(props.item.messageInfo.text);\n+ displayActionResultModal(\"copied!\");\n}\nconst styles = StyleSheet.create({\n" }, { "change_type": "MODIFY", "old_path": "native/media/save-image.js", "new_path": "native/media/save-image.js", "diff": "@@ -6,13 +6,11 @@ import { Platform, PermissionsAndroid } from 'react-native';\nimport filesystem from 'react-native-fs';\nimport CameraRoll from '@react-native-community/cameraroll';\nimport invariant from 'invariant';\n-import { NavigationActions } from 'react-navigation';\nimport { fileInfoFromData } from 'lib/utils/file-utils';\nimport { blobToDataURI, dataURIToIntArray } from '../utils/media-utils';\n-import { dispatch } from '../redux/redux-setup';\n-import { ActionResultModalRouteName } from '../navigation/route-names';\n+import { displayActionResultModal } from '../navigation/action-result-modal';\nasync function saveImage(mediaInfo: MediaInfo) {\nlet result, message;\n@@ -30,13 +28,7 @@ async function saveImage(mediaInfo: MediaInfo) {\nmessage = \"don't have permission :(\";\n}\n- dispatch({\n- // We do this for Flow\n- ...NavigationActions.navigate({\n- routeName: ActionResultModalRouteName,\n- params: { message },\n- }),\n- });\n+ displayActionResultModal(message);\n}\n// On Android, we save the image to our own SquadCal folder in the\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/navigation/action-result-modal.js", "diff": "+// @flow\n+\n+import { NavigationActions } from 'react-navigation';\n+\n+import { dispatch } from '../redux/redux-setup';\n+import { ActionResultModalRouteName } from './route-names';\n+\n+function displayActionResultModal(message: string) {\n+ dispatch({\n+ // We do this for Flow\n+ ...NavigationActions.navigate({\n+ routeName: ActionResultModalRouteName,\n+ params: { message },\n+ }),\n+ });\n+}\n+\n+export {\n+ displayActionResultModal,\n+};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] displayActionResultModal
129,187
19.07.2019 17:09:08
14,400
6125a30a38072e267eedd6ec26b15aa3a345b48a
[native] Fix navigate-before-go-back issue in ActionResultModal
[ { "change_type": "MODIFY", "old_path": "native/chat/text-message-tooltip-modal.react.js", "new_path": "native/chat/text-message-tooltip-modal.react.js", "diff": "@@ -12,9 +12,11 @@ type CustomProps = {\nitem: ChatTextMessageInfoItemWithHeight,\n};\n+const confirmCopy = () => displayActionResultModal(\"copied!\");\n+\nfunction onPressCopy(props: CustomProps) {\nClipboard.setString(props.item.messageInfo.text);\n- displayActionResultModal(\"copied!\");\n+ setTimeout(confirmCopy);\n}\nconst styles = StyleSheet.create({\n" }, { "change_type": "MODIFY", "old_path": "native/components/tooltip2.react.js", "new_path": "native/components/tooltip2.react.js", "diff": "@@ -309,8 +309,8 @@ function createTooltip<\nlocation,\n...customProps\n} = this.props.navigation.state.params;\n- entry.onPress(customProps);\nthis.props.navigation.goBack();\n+ entry.onPress(customProps);\n}\nonTooltipContainerLayout = (\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Fix navigate-before-go-back issue in ActionResultModal
129,187
25.07.2019 13:57:25
14,400
cf3f2cb29d9f0c534f7a4280739640b37df012f7
[native] PencilIcon
[ { "change_type": "ADD", "old_path": null, "new_path": "native/chat/settings/pencil-icon.react.js", "diff": "+// @flow\n+\n+import * as React from 'react';\n+import { StyleSheet, Platform } from 'react-native';\n+import Icon from 'react-native-vector-icons/FontAwesome';\n+\n+function PencilIcon(props: {||}) {\n+ return (\n+ <Icon\n+ name=\"pencil\"\n+ size={16}\n+ style={styles.editIcon}\n+ color=\"#036AFF\"\n+ />\n+ );\n+}\n+\n+const styles = StyleSheet.create({\n+ editIcon: {\n+ lineHeight: 20,\n+ paddingLeft: 10,\n+ paddingTop: Platform.select({ android: 1, default: 0 }),\n+ textAlign: 'right',\n+ },\n+});\n+\n+export default PencilIcon;\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings-member.react.js", "new_path": "native/chat/settings/thread-settings-member.react.js", "diff": "@@ -13,7 +13,7 @@ import type { LoadingStatus } from 'lib/types/loading-types';\nimport { loadingStatusPropType } from 'lib/types/loading-types';\nimport type { DispatchActionPromise } from 'lib/utils/action-utils';\n-import React from 'react';\n+import * as React from 'react';\nimport {\nView,\nText,\n@@ -22,7 +22,6 @@ import {\nAlert,\nActivityIndicator,\n} from 'react-native';\n-import Icon from 'react-native-vector-icons/FontAwesome';\nimport PropTypes from 'prop-types';\nimport _isEqual from 'lodash/fp/isEqual';\nimport invariant from 'invariant';\n@@ -41,6 +40,7 @@ import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors';\nimport EditSettingButton from '../../components/edit-setting-button.react';\nimport Button from '../../components/button.react';\nimport Tooltip from '../../components/tooltip.react';\n+import PencilIcon from './pencil-icon.react';\ntype Props = {|\nmemberInfo: RelativeMemberInfo,\n@@ -315,12 +315,6 @@ const styles = StyleSheet.create({\nfontStyle: 'italic',\ncolor: \"#888888\",\n},\n- editIcon: {\n- lineHeight: 20,\n- paddingLeft: 10,\n- paddingTop: Platform.select({ android: 1, default: 0 }),\n- textAlign: 'right',\n- },\npopoverLabelStyle: {\ntextAlign: 'center',\ncolor: '#444',\n@@ -337,14 +331,7 @@ const styles = StyleSheet.create({\n},\n});\n-const icon = (\n- <Icon\n- name=\"pencil\"\n- size={16}\n- style={styles.editIcon}\n- color=\"#036AFF\"\n- />\n-);\n+const icon = <PencilIcon />;\nexport default connect(\n(state: AppState, ownProps: { memberInfo: RelativeMemberInfo }) => ({\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] PencilIcon
129,187
25.07.2019 16:14:40
14,400
95f13d2723edf7e42c18edb25d38c41eacd58f81
[native] OverlayableScrollViewContainer
[ { "change_type": "MODIFY", "old_path": "native/chat/message-list-types.js", "new_path": "native/chat/message-list-types.js", "diff": "@@ -12,6 +12,7 @@ export type MessageListNavProp = NavigationScreenProp<{|\n...NavigationLeafRoute,\nparams: {|\nthreadInfo: ThreadInfo,\n+ gesturesDisabled?: bool,\n|},\n|}>;\n@@ -20,6 +21,7 @@ export const messageListNavPropType = PropTypes.shape({\nkey: PropTypes.string.isRequired,\nparams: PropTypes.shape({\nthreadInfo: threadInfoPropType.isRequired,\n+ gesturesDisabled: PropTypes.bool,\n}).isRequired,\n}).isRequired,\nnavigate: PropTypes.func.isRequired,\n" }, { "change_type": "MODIFY", "old_path": "native/chat/message-list.react.js", "new_path": "native/chat/message-list.react.js", "diff": "@@ -12,6 +12,11 @@ import {\ntype MessageListNavProp,\nmessageListNavPropType,\n} from './message-list-types';\n+import {\n+ type OverlayableScrollViewState,\n+ overlayableScrollViewStatePropType,\n+ withOverlayableScrollViewState,\n+} from '../navigation/overlayable-scroll-view-state';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n@@ -51,7 +56,6 @@ import {\n} from '../keyboard';\nimport {\nscrollBlockingChatModalsClosedSelector,\n- lightboxTransitioningSelector,\n} from '../selectors/nav-selectors';\ntype Props = {|\n@@ -63,7 +67,8 @@ type Props = {|\nviewerID: ?string,\nstartReached: bool,\nscrollBlockingModalsClosed: bool,\n- scrollBlockingModalsGone: bool,\n+ // withOverlayableScrollViewState\n+ overlayableScrollViewState: ?OverlayableScrollViewState,\n// Redux dispatch functions\ndispatchActionPromise: DispatchActionPromise,\n// async functions that hit server APIs\n@@ -77,7 +82,6 @@ type Props = {|\n|};\ntype State = {|\nfocusedMessageKey: ?string,\n- scrollDisabled: bool,\nmessageListVerticalBounds: ?VerticalBounds,\nkeyboardShowing: bool,\nflatListExtraData: FlatListExtraData,\n@@ -87,7 +91,6 @@ type PropsAndState = {|\n...State,\n|};\ntype FlatListExtraData = {|\n- scrollDisabled: bool,\nkeyboardShowing: bool,\nmessageListVerticalBounds: ?VerticalBounds,\nfocusedMessageKey: ?string,\n@@ -103,7 +106,7 @@ class MessageList extends React.PureComponent<Props, State> {\nviewerID: PropTypes.string,\nstartReached: PropTypes.bool.isRequired,\nscrollBlockingModalsClosed: PropTypes.bool.isRequired,\n- scrollBlockingModalsGone: PropTypes.bool.isRequired,\n+ overlayableScrollViewState: overlayableScrollViewStatePropType,\ndispatchActionPromise: PropTypes.func.isRequired,\nfetchMessagesBeforeCursor: PropTypes.func.isRequired,\nfetchMostRecentMessages: PropTypes.func.isRequired,\n@@ -115,14 +118,11 @@ class MessageList extends React.PureComponent<Props, State> {\nconstructor(props: Props) {\nsuper(props);\n- const scrollDisabled = !props.scrollBlockingModalsClosed;\nthis.state = {\nfocusedMessageKey: null,\n- scrollDisabled,\nmessageListVerticalBounds: null,\nkeyboardShowing: false,\nflatListExtraData: {\n- scrollDisabled,\nkeyboardShowing: props.imageGalleryOpen,\nmessageListVerticalBounds: null,\nfocusedMessageKey: null,\n@@ -132,21 +132,18 @@ class MessageList extends React.PureComponent<Props, State> {\n}\nstatic flatListExtraDataSelector = createSelector(\n- (propsAndState: PropsAndState) => propsAndState.scrollDisabled,\n(propsAndState: PropsAndState) => propsAndState.keyboardShowing,\n(propsAndState: PropsAndState) => propsAndState.messageListVerticalBounds,\n(propsAndState: PropsAndState) => propsAndState.imageGalleryOpen,\n(propsAndState: PropsAndState) => propsAndState.focusedMessageKey,\n(propsAndState: PropsAndState) => propsAndState.navigation,\n(\n- scrollDisabled: bool,\nkeyboardShowing: bool,\nmessageListVerticalBounds: ?VerticalBounds,\nimageGalleryOpen: bool,\nfocusedMessageKey: ?string,\nnavigation: MessageListNavProp,\n) => ({\n- scrollDisabled,\nkeyboardShowing: keyboardShowing || imageGalleryOpen,\nmessageListVerticalBounds,\nfocusedMessageKey,\n@@ -205,6 +202,12 @@ class MessageList extends React.PureComponent<Props, State> {\n}\n}\n+ static scrollDisabled(props: Props) {\n+ const { overlayableScrollViewState } = props;\n+ return !!(overlayableScrollViewState &&\n+ overlayableScrollViewState.scrollDisabled);\n+ }\n+\ncomponentDidUpdate(prevProps: Props, prevState: State) {\nconst oldThreadInfo = prevProps.threadInfo;\nconst newThreadInfo = this.props.threadInfo;\n@@ -229,20 +232,6 @@ class MessageList extends React.PureComponent<Props, State> {\nthis.loadingFromScroll = false;\n}\n- if (\n- this.state.scrollDisabled &&\n- this.props.scrollBlockingModalsGone &&\n- !prevProps.scrollBlockingModalsGone\n- ) {\n- this.setState({ scrollDisabled: false });\n- } else if (\n- !this.state.scrollDisabled &&\n- !this.props.scrollBlockingModalsClosed &&\n- prevProps.scrollBlockingModalsClosed\n- ) {\n- this.setState({ scrollDisabled: true });\n- }\n-\nif (\nthis.props.scrollBlockingModalsClosed &&\n!prevProps.scrollBlockingModalsClosed\n@@ -250,9 +239,11 @@ class MessageList extends React.PureComponent<Props, State> {\nthis.setState({ focusedMessageKey: null });\n}\n- if (!prevState.scrollDisabled && this.state.scrollDisabled) {\n+ const scrollIsDisabled = MessageList.scrollDisabled(this.props);\n+ const scrollWasDisabled = MessageList.scrollDisabled(prevProps);\n+ if (!scrollWasDisabled && scrollIsDisabled) {\nthis.props.navigation.setParams({ gesturesDisabled: true });\n- } else if (prevState.scrollDisabled && !this.state.scrollDisabled) {\n+ } else if (scrollWasDisabled && !scrollIsDisabled) {\nthis.props.navigation.setParams({ gesturesDisabled: false });\n}\n}\n@@ -269,7 +260,6 @@ class MessageList extends React.PureComponent<Props, State> {\n}\nconst messageInfoItem: ChatMessageInfoItemWithHeight = row.item;\nconst {\n- scrollDisabled,\nkeyboardShowing,\nmessageListVerticalBounds,\nfocusedMessageKey,\n@@ -283,10 +273,8 @@ class MessageList extends React.PureComponent<Props, State> {\nfocused={focused}\nnavigation={navigation}\ntoggleFocus={this.toggleMessageFocus}\n- setScrollDisabled={this.setScrollDisabled}\nverticalBounds={messageListVerticalBounds}\nkeyboardShowing={keyboardShowing}\n- scrollDisabled={scrollDisabled}\n/>\n);\n}\n@@ -299,10 +287,6 @@ class MessageList extends React.PureComponent<Props, State> {\n}\n}\n- setScrollDisabled = (scrollDisabled: bool) => {\n- this.setState({ scrollDisabled });\n- }\n-\nstatic keyExtractor(item: ChatMessageItemWithHeight) {\nif (item.itemType === \"loader\") {\nreturn \"loader\";\n@@ -357,7 +341,7 @@ class MessageList extends React.PureComponent<Props, State> {\nonViewableItemsChanged={this.onViewableItemsChanged}\nListFooterComponent={footer}\nscrollsToTop={false}\n- scrollEnabled={!this.state.scrollDisabled}\n+ scrollEnabled={!MessageList.scrollDisabled(this.props)}\nextraData={this.state.flatListExtraData}\n/>\n</View>\n@@ -454,16 +438,12 @@ registerFetchKey(fetchMostRecentMessagesActionTypes);\nexport default connect(\n(state: AppState, ownProps: { threadInfo: ThreadInfo }) => {\nconst threadID = ownProps.threadInfo.id;\n- const scrollBlockingModalsClosed =\n- scrollBlockingChatModalsClosedSelector(state);\nreturn {\nviewerID: state.currentUserInfo && state.currentUserInfo.id,\nstartReached: !!(state.messageStore.threads[threadID] &&\nstate.messageStore.threads[threadID].startReached),\n- scrollBlockingModalsClosed,\n- scrollBlockingModalsGone: scrollBlockingModalsClosed &&\n- !lightboxTransitioningSelector(state),\n+ scrollBlockingModalsClosed: scrollBlockingChatModalsClosedSelector(state),\n};\n},\n{ fetchMessagesBeforeCursor, fetchMostRecentMessages },\n-)(MessageList);\n+)(withOverlayableScrollViewState(MessageList));\n" }, { "change_type": "MODIFY", "old_path": "native/chat/message.react.js", "new_path": "native/chat/message.react.js", "diff": "@@ -67,10 +67,8 @@ type Props = {|\nfocused: bool,\nnavigation: MessageListNavProp,\ntoggleFocus: (messageKey: string) => void,\n- setScrollDisabled: (scrollDisabled: bool) => void,\nverticalBounds: ?VerticalBounds,\nkeyboardShowing: bool,\n- scrollDisabled: bool,\n|};\nclass Message extends React.PureComponent<Props> {\n@@ -79,10 +77,8 @@ class Message extends React.PureComponent<Props> {\nfocused: PropTypes.bool.isRequired,\nnavigation: messageListNavPropType.isRequired,\ntoggleFocus: PropTypes.func.isRequired,\n- setScrollDisabled: PropTypes.func.isRequired,\nverticalBounds: verticalBoundsPropType,\nkeyboardShowing: PropTypes.bool.isRequired,\n- scrollDisabled: PropTypes.bool.isRequired,\n};\ncomponentDidUpdate(prevProps: Props) {\n@@ -103,7 +99,6 @@ class Message extends React.PureComponent<Props> {\nnavigation={this.props.navigation}\nfocused={this.props.focused}\ntoggleFocus={this.props.toggleFocus}\n- setScrollDisabled={this.props.setScrollDisabled}\nverticalBounds={this.props.verticalBounds}\nkeyboardShowing={this.props.keyboardShowing}\n/>\n@@ -115,10 +110,8 @@ class Message extends React.PureComponent<Props> {\nnavigation={this.props.navigation}\nfocused={this.props.focused}\ntoggleFocus={this.props.toggleFocus}\n- setScrollDisabled={this.props.setScrollDisabled}\nverticalBounds={this.props.verticalBounds}\nkeyboardShowing={this.props.keyboardShowing}\n- scrollDisabled={this.props.scrollDisabled}\n/>\n);\n} else {\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-message-multimedia.react.js", "new_path": "native/chat/multimedia-message-multimedia.react.js", "diff": "@@ -21,6 +21,11 @@ import {\ntype MessageListNavProp,\nmessageListNavPropType,\n} from './message-list-types';\n+import {\n+ type OverlayableScrollViewState,\n+ overlayableScrollViewStatePropType,\n+ withOverlayableScrollViewState,\n+} from '../navigation/overlayable-scroll-view-state';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n@@ -42,14 +47,14 @@ type Props = {|\nverticalBounds: ?VerticalBounds,\nverticalOffset: number,\nstyle: ImageStyle,\n- scrollDisabled: bool,\nlightboxPosition: ?Animated.Value,\npostInProgress: bool,\npendingUpload: ?PendingMultimediaUpload,\nkeyboardShowing: bool,\nmessageFocused: bool,\ntoggleMessageFocus: (messageKey: string) => void,\n- setScrollDisabled: (scrollDisabled: bool) => void,\n+ // withOverlayableScrollViewState\n+ overlayableScrollViewState: ?OverlayableScrollViewState,\n|};\ntype State = {|\nhidden: bool,\n@@ -63,14 +68,13 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\nnavigation: messageListNavPropType.isRequired,\nverticalBounds: verticalBoundsPropType,\nverticalOffset: PropTypes.number.isRequired,\n- scrollDisabled: PropTypes.bool.isRequired,\nlightboxPosition: PropTypes.instanceOf(Animated.Value),\npostInProgress: PropTypes.bool.isRequired,\npendingUpload: pendingMultimediaUploadPropType,\nkeyboardShowing: PropTypes.bool.isRequired,\nmessageFocused: PropTypes.bool.isRequired,\ntoggleMessageFocus: PropTypes.func.isRequired,\n- setScrollDisabled: PropTypes.func.isRequired,\n+ overlayableScrollViewState: overlayableScrollViewStatePropType,\n};\nview: ?View;\nclickable = true;\n@@ -84,7 +88,8 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\n}\nstatic getDerivedStateFromProps(props: Props, state: State) {\n- if (!props.scrollDisabled && state.hidden) {\n+ const scrollIsDisabled = MultimediaMessageMultimedia.scrollDisabled(props);\n+ if (!scrollIsDisabled && state.hidden) {\nreturn { hidden: false };\n}\nreturn null;\n@@ -105,12 +110,22 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\n);\n}\n+ static scrollDisabled(props: Props) {\n+ const { overlayableScrollViewState } = props;\n+ return !!(overlayableScrollViewState &&\n+ overlayableScrollViewState.scrollDisabled);\n+ }\n+\ncomponentDidUpdate(prevProps: Props) {\nif (this.props.lightboxPosition !== prevProps.lightboxPosition) {\nthis.setState({ opacity: this.getOpacity() });\n}\n- if (!this.props.scrollDisabled && prevProps.scrollDisabled) {\n+ const scrollIsDisabled =\n+ MultimediaMessageMultimedia.scrollDisabled(this.props);\n+ const scrollWasDisabled =\n+ MultimediaMessageMultimedia.scrollDisabled(prevProps);\n+ if (!scrollIsDisabled && scrollWasDisabled) {\nthis.clickable = true;\n}\n}\n@@ -160,8 +175,10 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\n}\nthis.clickable = false;\n- const { setScrollDisabled, mediaInfo } = this.props;\n- setScrollDisabled(true);\n+ const { overlayableScrollViewState, mediaInfo } = this.props;\n+ if (overlayableScrollViewState) {\n+ overlayableScrollViewState.setScrollDisabled(true);\n+ }\nview.measure((x, y, width, height, pageX, pageY) => {\nconst coordinates = { x: pageX, y: pageY, width, height };\n@@ -192,7 +209,6 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\nconst {\nmessageFocused,\ntoggleMessageFocus,\n- setScrollDisabled,\nitem,\nmediaInfo,\nverticalOffset,\n@@ -200,7 +216,11 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\nif (!messageFocused) {\ntoggleMessageFocus(messageKey(item.messageInfo));\n}\n- setScrollDisabled(true);\n+\n+ const { overlayableScrollViewState } = this.props;\n+ if (overlayableScrollViewState) {\n+ overlayableScrollViewState.setScrollDisabled(true);\n+ }\nview.measure((x, y, width, height, pageX, pageY) => {\nconst coordinates = { x: pageX, y: pageY, width, height };\n@@ -253,4 +273,4 @@ const styles = StyleSheet.create({\n},\n});\n-export default MultimediaMessageMultimedia;\n+export default withOverlayableScrollViewState(MultimediaMessageMultimedia);\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-message.react.js", "new_path": "native/chat/multimedia-message.react.js", "diff": "@@ -153,10 +153,8 @@ type Props = {|\nnavigation: MessageListNavProp,\nfocused: bool,\ntoggleFocus: (messageKey: string) => void,\n- setScrollDisabled: (scrollDisabled: bool) => void,\nverticalBounds: ?VerticalBounds,\nkeyboardShowing: bool,\n- scrollDisabled: bool,\n// withLightboxPositionContext\nlightboxPosition: ?Animated.Value,\n|};\n@@ -167,10 +165,8 @@ class MultimediaMessage extends React.PureComponent<Props> {\nnavigation: messageListNavPropType.isRequired,\nfocused: PropTypes.bool.isRequired,\ntoggleFocus: PropTypes.func.isRequired,\n- setScrollDisabled: PropTypes.func.isRequired,\nverticalBounds: verticalBoundsPropType,\nkeyboardShowing: PropTypes.bool.isRequired,\n- scrollDisabled: PropTypes.bool.isRequired,\nlightboxPosition: PropTypes.instanceOf(Animated.Value),\n};\n@@ -284,14 +280,12 @@ class MultimediaMessage extends React.PureComponent<Props> {\nverticalBounds={this.props.verticalBounds}\nverticalOffset={verticalOffset}\nstyle={[ style, roundedStyle ]}\n- scrollDisabled={this.props.scrollDisabled}\nlightboxPosition={this.props.lightboxPosition}\npostInProgress={!!pendingUploads}\npendingUpload={pendingUpload}\nkeyboardShowing={this.props.keyboardShowing}\nmessageFocused={this.props.focused}\ntoggleMessageFocus={this.props.toggleFocus}\n- setScrollDisabled={this.props.setScrollDisabled}\nitem={this.props.item}\nkey={index}\n/>\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message.react.js", "new_path": "native/chat/text-message.react.js", "diff": "@@ -14,6 +14,11 @@ import {\ntype MessageListNavProp,\nmessageListNavPropType,\n} from './message-list-types';\n+import {\n+ type OverlayableScrollViewState,\n+ overlayableScrollViewStatePropType,\n+ withOverlayableScrollViewState,\n+} from '../navigation/overlayable-scroll-view-state';\nimport * as React from 'react';\nimport { View } from 'react-native';\n@@ -69,9 +74,10 @@ type Props = {|\nnavigation: MessageListNavProp,\nfocused: bool,\ntoggleFocus: (messageKey: string) => void,\n- setScrollDisabled: (scrollDisabled: bool) => void,\nverticalBounds: ?VerticalBounds,\nkeyboardShowing: bool,\n+ // withOverlayableScrollViewState\n+ overlayableScrollViewState: ?OverlayableScrollViewState,\n|};\nclass TextMessage extends React.PureComponent<Props> {\n@@ -80,9 +86,9 @@ class TextMessage extends React.PureComponent<Props> {\nnavigation: messageListNavPropType.isRequired,\nfocused: PropTypes.bool.isRequired,\ntoggleFocus: PropTypes.func.isRequired,\n- setScrollDisabled: PropTypes.func.isRequired,\nverticalBounds: verticalBoundsPropType,\nkeyboardShowing: PropTypes.bool.isRequired,\n+ overlayableScrollViewState: overlayableScrollViewStatePropType,\n};\nmessage: ?View;\n@@ -126,11 +132,15 @@ class TextMessage extends React.PureComponent<Props> {\nreturn;\n}\n- const { focused, toggleFocus, item, setScrollDisabled } = this.props;\n+ const { focused, toggleFocus, item } = this.props;\nif (!focused) {\ntoggleFocus(messageKey(item.messageInfo));\n}\n- setScrollDisabled(true);\n+\n+ const { overlayableScrollViewState } = this.props;\n+ if (overlayableScrollViewState) {\n+ overlayableScrollViewState.setScrollDisabled(true);\n+ }\nmessage.measure((x, y, width, height, pageX, pageY) => {\nconst coordinates = { x: pageX, y: pageY, width, height };\n@@ -170,7 +180,9 @@ class TextMessage extends React.PureComponent<Props> {\n}\n+const WrappedTextMessage = withOverlayableScrollViewState(TextMessage);\n+\nexport {\n- TextMessage,\n+ WrappedTextMessage as TextMessage,\ntextMessageItemHeight,\n};\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/navigation-setup.js", "new_path": "native/navigation/navigation-setup.js", "diff": "@@ -107,7 +107,9 @@ import { createLightboxNavigator } from './lightbox-navigator.react';\nimport MultimediaModal from '../media/multimedia-modal.react';\nimport { MultimediaTooltipModal } from '../chat/multimedia-tooltip-modal.react';\nimport ChatInputStateContainer from '../chat/chat-input-state-container.react';\n-import ActionResultModal from '../navigation/action-result-modal.react';\n+import OverlayableScrollViewStateContainer\n+ from './overlayable-scroll-view-state-container.react';\n+import ActionResultModal from './action-result-modal.react';\nimport {\nTextMessageTooltipModal,\n} from '../chat/text-message-tooltip-modal.react';\n@@ -233,7 +235,9 @@ class WrappedAppNavigator\nrender() {\nreturn (\n<ChatInputStateContainer>\n+ <OverlayableScrollViewStateContainer>\n<AppNavigator navigation={this.props.navigation} />\n+ </OverlayableScrollViewStateContainer>\n</ChatInputStateContainer>\n);\n}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/navigation/overlayable-scroll-view-state-container.react.js", "diff": "+// @flow\n+\n+import type { AppState } from '../redux/redux-setup';\n+\n+import * as React from 'react';\n+import PropTypes from 'prop-types';\n+\n+import { connect } from 'lib/utils/redux-utils';\n+\n+import {\n+ scrollBlockingChatModalsClosedSelector,\n+ lightboxTransitioningSelector,\n+} from '../selectors/nav-selectors';\n+import { OverlayableScrollViewContext } from './overlayable-scroll-view-state';\n+\n+type Props = {|\n+ children: React.Node,\n+ // Redux state\n+ scrollBlockingModalsClosed: bool,\n+ scrollBlockingModalsGone: bool,\n+|};\n+type State = {|\n+ scrollDisabled: bool,\n+|};\n+class OverlayableScrollViewStateContainer extends React.PureComponent<\n+ Props,\n+ State,\n+> {\n+\n+ static propTypes = {\n+ children: PropTypes.node.isRequired,\n+ scrollBlockingModalsClosed: PropTypes.bool.isRequired,\n+ scrollBlockingModalsGone: PropTypes.bool.isRequired,\n+ };\n+\n+ constructor(props: Props) {\n+ super(props);\n+ this.state = {\n+ scrollDisabled: !props.scrollBlockingModalsClosed,\n+ };\n+ }\n+\n+ componentDidUpdate(prevProps: Props) {\n+ if (\n+ this.state.scrollDisabled &&\n+ this.props.scrollBlockingModalsGone &&\n+ !prevProps.scrollBlockingModalsGone\n+ ) {\n+ this.setScrollDisabled(false);\n+ } else if (\n+ !this.state.scrollDisabled &&\n+ !this.props.scrollBlockingModalsClosed &&\n+ prevProps.scrollBlockingModalsClosed\n+ ) {\n+ this.setScrollDisabled(true);\n+ }\n+ }\n+\n+ setScrollDisabled = (scrollDisabled: bool) => {\n+ this.setState({ scrollDisabled });\n+ }\n+\n+ render() {\n+ const overlayableScrollViewState = {\n+ scrollDisabled: this.state.scrollDisabled,\n+ setScrollDisabled: this.setScrollDisabled,\n+ };\n+ return (\n+ <OverlayableScrollViewContext.Provider value={overlayableScrollViewState}>\n+ {this.props.children}\n+ </OverlayableScrollViewContext.Provider>\n+ );\n+ }\n+\n+}\n+\n+export default connect(\n+ (state: AppState) => {\n+ const scrollBlockingModalsClosed =\n+ scrollBlockingChatModalsClosedSelector(state);\n+ return {\n+ scrollBlockingModalsClosed,\n+ scrollBlockingModalsGone: scrollBlockingModalsClosed &&\n+ !lightboxTransitioningSelector(state),\n+ };\n+ },\n+)(OverlayableScrollViewStateContainer);\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/navigation/overlayable-scroll-view-state.js", "diff": "+// @flow\n+\n+import * as React from 'react';\n+import PropTypes from 'prop-types';\n+\n+export type OverlayableScrollViewState = {|\n+ scrollDisabled: bool,\n+ setScrollDisabled: (scrollDisabled: bool) => void,\n+|};\n+\n+const overlayableScrollViewStatePropType = PropTypes.shape({\n+ scrollDisabled: PropTypes.bool.isRequired,\n+ setScrollDisabled: PropTypes.func.isRequired,\n+});\n+\n+const OverlayableScrollViewContext =\n+ React.createContext<?OverlayableScrollViewState>(null);\n+\n+function withOverlayableScrollViewState<\n+ AllProps: {},\n+ ComponentType: React.ComponentType<AllProps>,\n+>(Component: ComponentType): React.ComponentType<$Diff<\n+ React.ElementConfig<ComponentType>,\n+ { overlayableScrollViewState: ?OverlayableScrollViewState },\n+>> {\n+ class OverlayableScrollViewStateHOC extends React.PureComponent<$Diff<\n+ React.ElementConfig<ComponentType>,\n+ { overlayableScrollViewState: ?OverlayableScrollViewState },\n+ >> {\n+ render() {\n+ return (\n+ <OverlayableScrollViewContext.Consumer>\n+ {value => (\n+ <Component\n+ {...this.props}\n+ overlayableScrollViewState={value}\n+ />\n+ )}\n+ </OverlayableScrollViewContext.Consumer>\n+ );\n+ }\n+ }\n+ return OverlayableScrollViewStateHOC;\n+}\n+\n+export {\n+ overlayableScrollViewStatePropType,\n+ OverlayableScrollViewContext,\n+ withOverlayableScrollViewState,\n+};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] OverlayableScrollViewContainer
129,187
29.07.2019 17:52:20
14,400
fb2a3352ae04bb6f6485e56d2939ed53a9a1dbdb
[native] KeyboardStateContainer
[ { "change_type": "MODIFY", "old_path": "native/chat/chat-input-bar.react.js", "new_path": "native/chat/chat-input-bar.react.js", "diff": "@@ -22,6 +22,11 @@ import { loadingStatusPropType } from 'lib/types/loading-types';\nimport type { CalendarQuery } from 'lib/types/entry-types';\nimport type { KeyboardEvent } from '../keyboard';\nimport type { GalleryImageInfo } from '../media/image-gallery-image.react';\n+import {\n+ type KeyboardState,\n+ keyboardStatePropType,\n+ withKeyboardState,\n+} from '../navigation/keyboard-state';\nimport * as React from 'react';\nimport {\n@@ -43,7 +48,6 @@ import Animated, { Easing } from 'react-native-reanimated';\nimport {\nKeyboardAccessoryView,\nTextInputKeyboardMangerIOS,\n- KeyboardUtils,\n} from 'react-native-keyboard-input';\nimport { connect } from 'lib/utils/redux-utils';\n@@ -61,12 +65,7 @@ import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors';\nimport Button from '../components/button.react';\nimport { nonThreadCalendarQuery } from '../selectors/nav-selectors';\n-import {\n- getKeyboardHeight,\n- addKeyboardShowListener,\n- addKeyboardDismissListener,\n- removeKeyboardListener,\n-} from '../keyboard';\n+import { getKeyboardHeight } from '../keyboard';\nimport {\nimageGalleryKeyboardName,\nimageGalleryBackgroundColor,\n@@ -78,14 +77,14 @@ const draftKeyFromThreadID =\ntype Props = {|\nthreadInfo: ThreadInfo,\n- imageGalleryOpen: bool,\n- setImageGalleryOpen: (imageGalleryOpen: bool) => void,\n// Redux state\nviewerID: ?string,\ndraft: string,\njoinThreadLoadingStatus: LoadingStatus,\ncalendarQuery: () => CalendarQuery,\nnextLocalID: number,\n+ // withKeyboardState\n+ keyboardState: ?KeyboardState,\n// Redux dispatch functions\ndispatchActionPayload: DispatchActionPayload,\ndispatchActionPromise: DispatchActionPromise,\n@@ -106,13 +105,12 @@ class ChatInputBar extends React.PureComponent<Props, State> {\nstatic propTypes = {\nthreadInfo: threadInfoPropType.isRequired,\n- imageGalleryOpen: PropTypes.bool.isRequired,\n- setImageGalleryOpen: PropTypes.func.isRequired,\nviewerID: PropTypes.string,\ndraft: PropTypes.string.isRequired,\njoinThreadLoadingStatus: loadingStatusPropType.isRequired,\ncalendarQuery: PropTypes.func.isRequired,\nnextLocalID: PropTypes.number.isRequired,\n+ keyboardState: keyboardStatePropType,\ndispatchActionPayload: PropTypes.func.isRequired,\ndispatchActionPromise: PropTypes.func.isRequired,\nsendTextMessage: PropTypes.func.isRequired,\n@@ -123,12 +121,9 @@ class ChatInputBar extends React.PureComponent<Props, State> {\nbackgroundColor: imageGalleryBackgroundColor,\n};\ntextInput: ?TextInput;\n- keyboardShowListener: ?Object;\n- keyboardDismissListener: ?Object;\ncameraRollOpacity: Animated.Value;\nexpandOpacity: Animated.Value;\nexpandoButtonsWidth: Animated.Value;\n- keyboardShowing = false;\nconstructor(props: Props) {\nsuper(props);\n@@ -148,32 +143,18 @@ class ChatInputBar extends React.PureComponent<Props, State> {\n);\n}\n- componentDidMount() {\n- this.keyboardShowListener = addKeyboardShowListener(this.keyboardShow);\n- this.keyboardDismissListener = addKeyboardDismissListener(\n- this.keyboardDismiss,\n- );\n+ static imageGalleryOpen(props: Props) {\n+ const { keyboardState } = props;\n+ return !!(keyboardState && keyboardState.imageGalleryOpen);\n}\n- keyboardShow = () => {\n- this.keyboardShowing = true;\n- this.hideButtons();\n+ static systemKeyboardShowing(props: Props) {\n+ const { keyboardState } = props;\n+ return !!(keyboardState && keyboardState.systemKeyboardShowing);\n}\n- keyboardDismiss = () => {\n- this.keyboardShowing = false;\n- this.expandButtons();\n- }\n-\n- componentWillUnmount() {\n- if (this.keyboardShowListener) {\n- removeKeyboardListener(this.keyboardShowListener);\n- this.keyboardShowListener = null;\n- }\n- if (this.keyboardDismissListener) {\n- removeKeyboardListener(this.keyboardDismissListener);\n- this.keyboardDismissListener = null;\n- }\n+ get systemKeyboardShowing() {\n+ return ChatInputBar.systemKeyboardShowing(this.props);\n}\ncomponentDidUpdate(prevProps: Props, prevState: State) {\n@@ -186,16 +167,28 @@ class ChatInputBar extends React.PureComponent<Props, State> {\nLayoutAnimation.easeInEaseOut();\n}\n- if (!this.props.imageGalleryOpen && prevProps.imageGalleryOpen) {\n+ const systemKeyboardIsShowing =\n+ ChatInputBar.systemKeyboardShowing(this.props);\n+ const systemKeyboardWasShowing =\n+ ChatInputBar.systemKeyboardShowing(prevProps);\n+ if (systemKeyboardIsShowing && !systemKeyboardWasShowing) {\nthis.hideButtons();\n- } else if (this.props.imageGalleryOpen && !prevProps.imageGalleryOpen) {\n+ } else if (!systemKeyboardIsShowing && systemKeyboardWasShowing) {\n+ this.expandButtons();\n+ }\n+\n+ const imageGalleryIsOpen = ChatInputBar.imageGalleryOpen(this.props);\n+ const imageGalleryWasOpen = ChatInputBar.imageGalleryOpen(prevProps);\n+ if (!imageGalleryIsOpen && imageGalleryWasOpen) {\n+ this.hideButtons();\n+ } else if (imageGalleryIsOpen && !imageGalleryWasOpen) {\nthis.expandButtons();\nthis.setIOSKeyboardHeight();\n}\n}\nsetIOSKeyboardHeight() {\n- if (Platform.OS !== \"ios\" || this.keyboardShowing) {\n+ if (Platform.OS !== \"ios\" || this.systemKeyboardShowing) {\nreturn;\n}\nconst { textInput } = this;\n@@ -288,7 +281,7 @@ class ChatInputBar extends React.PureComponent<Props, State> {\n);\n}\ncontent = (\n- <TouchableWithoutFeedback onPress={KeyboardUtils.dismiss}>\n+ <TouchableWithoutFeedback onPress={this.dismissKeyboard}>\n<View style={styles.inputContainer}>\n<Animated.View style={this.expandoButtonsStyle}>\n<TouchableOpacity\n@@ -361,10 +354,9 @@ class ChatInputBar extends React.PureComponent<Props, State> {\n}\nlet keyboardAccessoryView = null;\n- if (Platform.OS !== \"android\" || this.props.imageGalleryOpen) {\n- const kbComponent = this.props.imageGalleryOpen\n- ? imageGalleryKeyboardName\n- : null;\n+ const imageGalleryIsOpen = ChatInputBar.imageGalleryOpen(this.props);\n+ if (Platform.OS !== \"android\" || imageGalleryIsOpen) {\n+ const kbComponent = imageGalleryIsOpen ? imageGalleryKeyboardName : null;\nkeyboardAccessoryView = (\n<KeyboardAccessoryView\nkbInputRef={this.textInput}\n@@ -490,8 +482,8 @@ class ChatInputBar extends React.PureComponent<Props, State> {\nhideButtons() {\nif (\n- this.props.imageGalleryOpen ||\n- !this.keyboardShowing ||\n+ ChatInputBar.imageGalleryOpen(this.props) ||\n+ !this.systemKeyboardShowing ||\n!this.state.buttonsExpanded\n) {\nreturn;\n@@ -507,24 +499,35 @@ class ChatInputBar extends React.PureComponent<Props, State> {\nif (!this.state.buttonsExpanded) {\nthis.expandButtons();\n} else {\n- this.props.setImageGalleryOpen(true);\n+ this.setImageGalleryOpen(true);\n}\n}\nhideCustomKeyboard = () => {\n- this.props.setImageGalleryOpen(false);\n+ this.setImageGalleryOpen(false);\n}\nonImageGalleryItemSelected = (\nkeyboardName: string,\nimageInfos: $ReadOnlyArray<GalleryImageInfo>,\n) => {\n- KeyboardUtils.dismiss();\n+ this.dismissKeyboard();\nconst chatInputState = this.context;\ninvariant(chatInputState, \"chatInputState should be set in ChatInputBar\");\nchatInputState.sendMultimediaMessage(this.props.threadInfo.id, imageInfos);\n}\n+ setImageGalleryOpen(imageGalleryOpen: bool) {\n+ const { keyboardState } = this.props;\n+ invariant(keyboardState, \"keyboardState should be initialized\");\n+ keyboardState.setImageGalleryOpen(imageGalleryOpen);\n+ }\n+\n+ dismissKeyboard = () => {\n+ const { keyboardState } = this.props;\n+ keyboardState && keyboardState.dismissKeyboard();\n+ }\n+\n}\nconst styles = StyleSheet.create({\n@@ -616,4 +619,4 @@ export default connect(\n};\n},\n{ sendTextMessage, joinThread },\n-)(ChatInputBar);\n+)(withKeyboardState(ChatInputBar));\n" }, { "change_type": "MODIFY", "old_path": "native/chat/message-list-container.react.js", "new_path": "native/chat/message-list-container.react.js", "diff": "@@ -68,7 +68,6 @@ type Props = {|\ntype State = {|\ntextToMeasure: TextToMeasure[],\nlistDataWithHeights: ?$ReadOnlyArray<ChatMessageItemWithHeight>,\n- imageGalleryOpen: bool,\n|};\nclass MessageListContainer extends React.PureComponent<Props, State> {\n@@ -112,7 +111,6 @@ class MessageListContainer extends React.PureComponent<Props, State> {\nthis.state = {\ntextToMeasure,\nlistDataWithHeights,\n- imageGalleryOpen: false,\n};\n}\n@@ -208,7 +206,6 @@ class MessageListContainer extends React.PureComponent<Props, State> {\nthreadInfo={threadInfo}\nmessageListData={listDataWithHeights}\nnavigation={this.props.navigation}\n- imageGalleryOpen={this.state.imageGalleryOpen}\n/>\n);\n} else {\n@@ -230,19 +227,11 @@ class MessageListContainer extends React.PureComponent<Props, State> {\nallHeightsMeasuredCallback={this.allHeightsMeasured}\n/>\n{messageList}\n- <ChatInputBar\n- threadInfo={threadInfo}\n- imageGalleryOpen={this.state.imageGalleryOpen}\n- setImageGalleryOpen={this.setImageGalleryOpen}\n- />\n+ <ChatInputBar threadInfo={threadInfo} />\n</View>\n);\n}\n- setImageGalleryOpen = (imageGalleryOpen: bool) => {\n- this.setState({ imageGalleryOpen });\n- }\n-\nallHeightsMeasured = (\ntextToMeasure: TextToMeasure[],\nnewTextHeights: Map<string, number>,\n" }, { "change_type": "MODIFY", "old_path": "native/chat/message-list.react.js", "new_path": "native/chat/message-list.react.js", "diff": "@@ -17,6 +17,11 @@ import {\noverlayableScrollViewStatePropType,\nwithOverlayableScrollViewState,\n} from '../navigation/overlayable-scroll-view-state';\n+import {\n+ type KeyboardState,\n+ keyboardStatePropType,\n+ withKeyboardState,\n+} from '../navigation/keyboard-state';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\n@@ -28,7 +33,6 @@ import {\n} from 'react-native';\nimport _sum from 'lodash/fp/sum';\nimport _find from 'lodash/fp/find';\n-import { KeyboardUtils } from 'react-native-keyboard-input';\nimport { createSelector } from 'reselect';\nimport { messageKey } from 'lib/shared/message-utils';\n@@ -49,11 +53,6 @@ import {\ntype ChatMessageInfoItemWithHeight,\n} from './message.react';\nimport ListLoadingIndicator from '../components/list-loading-indicator.react';\n-import {\n- addKeyboardShowListener,\n- addKeyboardDismissListener,\n- removeKeyboardListener,\n-} from '../keyboard';\nimport {\nscrollBlockingChatModalsClosedSelector,\n} from '../selectors/nav-selectors';\n@@ -62,13 +61,14 @@ type Props = {|\nthreadInfo: ThreadInfo,\nmessageListData: $ReadOnlyArray<ChatMessageItemWithHeight>,\nnavigation: MessageListNavProp,\n- imageGalleryOpen: bool,\n// Redux state\nviewerID: ?string,\nstartReached: bool,\nscrollBlockingModalsClosed: bool,\n// withOverlayableScrollViewState\noverlayableScrollViewState: ?OverlayableScrollViewState,\n+ // withKeyboardState\n+ keyboardState: ?KeyboardState,\n// Redux dispatch functions\ndispatchActionPromise: DispatchActionPromise,\n// async functions that hit server APIs\n@@ -83,7 +83,6 @@ type Props = {|\ntype State = {|\nfocusedMessageKey: ?string,\nmessageListVerticalBounds: ?VerticalBounds,\n- keyboardShowing: bool,\nflatListExtraData: FlatListExtraData,\n|};\ntype PropsAndState = {|\n@@ -91,7 +90,6 @@ type PropsAndState = {|\n...State,\n|};\ntype FlatListExtraData = {|\n- keyboardShowing: bool,\nmessageListVerticalBounds: ?VerticalBounds,\nfocusedMessageKey: ?string,\nnavigation: MessageListNavProp,\n@@ -102,28 +100,24 @@ class MessageList extends React.PureComponent<Props, State> {\nthreadInfo: threadInfoPropType.isRequired,\nmessageListData: PropTypes.arrayOf(chatMessageItemPropType).isRequired,\nnavigation: messageListNavPropType.isRequired,\n- imageGalleryOpen: PropTypes.bool.isRequired,\nviewerID: PropTypes.string,\nstartReached: PropTypes.bool.isRequired,\nscrollBlockingModalsClosed: PropTypes.bool.isRequired,\noverlayableScrollViewState: overlayableScrollViewStatePropType,\n+ keyboardState: keyboardStatePropType,\ndispatchActionPromise: PropTypes.func.isRequired,\nfetchMessagesBeforeCursor: PropTypes.func.isRequired,\nfetchMostRecentMessages: PropTypes.func.isRequired,\n};\nloadingFromScroll = false;\nflatListContainer: ?View;\n- keyboardShowListener: ?Object;\n- keyboardDismissListener: ?Object;\nconstructor(props: Props) {\nsuper(props);\nthis.state = {\nfocusedMessageKey: null,\nmessageListVerticalBounds: null,\n- keyboardShowing: false,\nflatListExtraData: {\n- keyboardShowing: props.imageGalleryOpen,\nmessageListVerticalBounds: null,\nfocusedMessageKey: null,\nnavigation: props.navigation,\n@@ -132,19 +126,14 @@ class MessageList extends React.PureComponent<Props, State> {\n}\nstatic flatListExtraDataSelector = createSelector(\n- (propsAndState: PropsAndState) => propsAndState.keyboardShowing,\n(propsAndState: PropsAndState) => propsAndState.messageListVerticalBounds,\n- (propsAndState: PropsAndState) => propsAndState.imageGalleryOpen,\n(propsAndState: PropsAndState) => propsAndState.focusedMessageKey,\n(propsAndState: PropsAndState) => propsAndState.navigation,\n(\n- keyboardShowing: bool,\nmessageListVerticalBounds: ?VerticalBounds,\n- imageGalleryOpen: bool,\nfocusedMessageKey: ?string,\nnavigation: MessageListNavProp,\n) => ({\n- keyboardShowing: keyboardShowing || imageGalleryOpen,\nmessageListVerticalBounds,\nfocusedMessageKey,\nnavigation,\n@@ -162,14 +151,6 @@ class MessageList extends React.PureComponent<Props, State> {\nreturn null;\n}\n- keyboardShow = () => {\n- this.setState({ keyboardShowing: true });\n- }\n-\n- keyboardDismiss = () => {\n- this.setState({ keyboardShowing: false });\n- }\n-\ncomponentDidMount() {\nconst { threadInfo } = this.props;\nif (!threadInChatList(threadInfo)) {\n@@ -179,11 +160,6 @@ class MessageList extends React.PureComponent<Props, State> {\nthis.props.fetchMostRecentMessages(threadInfo.id),\n);\n}\n-\n- this.keyboardShowListener = addKeyboardShowListener(this.keyboardShow);\n- this.keyboardDismissListener = addKeyboardDismissListener(\n- this.keyboardDismiss,\n- );\n}\ncomponentWillUnmount() {\n@@ -191,15 +167,6 @@ class MessageList extends React.PureComponent<Props, State> {\nif (!threadInChatList(threadInfo)) {\nthreadWatcher.removeID(threadInfo.id);\n}\n-\n- if (this.keyboardShowListener) {\n- removeKeyboardListener(this.keyboardShowListener);\n- this.keyboardShowListener = null;\n- }\n- if (this.keyboardDismissListener) {\n- removeKeyboardListener(this.keyboardDismissListener);\n- this.keyboardDismissListener = null;\n- }\n}\nstatic scrollDisabled(props: Props) {\n@@ -248,10 +215,15 @@ class MessageList extends React.PureComponent<Props, State> {\n}\n}\n+ dismissKeyboard = () => {\n+ const { keyboardState } = this.props;\n+ keyboardState && keyboardState.dismissKeyboard();\n+ }\n+\nrenderItem = (row: { item: ChatMessageItemWithHeight }) => {\nif (row.item.itemType === \"loader\") {\nreturn (\n- <TouchableWithoutFeedback onPress={KeyboardUtils.dismiss}>\n+ <TouchableWithoutFeedback onPress={this.dismissKeyboard}>\n<View style={styles.listLoadingIndicator}>\n<ListLoadingIndicator />\n</View>\n@@ -260,7 +232,6 @@ class MessageList extends React.PureComponent<Props, State> {\n}\nconst messageInfoItem: ChatMessageInfoItemWithHeight = row.item;\nconst {\n- keyboardShowing,\nmessageListVerticalBounds,\nfocusedMessageKey,\nnavigation,\n@@ -274,7 +245,6 @@ class MessageList extends React.PureComponent<Props, State> {\nnavigation={navigation}\ntoggleFocus={this.toggleMessageFocus}\nverticalBounds={messageListVerticalBounds}\n- keyboardShowing={keyboardShowing}\n/>\n);\n}\n@@ -446,4 +416,4 @@ export default connect(\n};\n},\n{ fetchMessagesBeforeCursor, fetchMostRecentMessages },\n-)(withOverlayableScrollViewState(MessageList));\n+)(withKeyboardState(withOverlayableScrollViewState(MessageList)));\n" }, { "change_type": "MODIFY", "old_path": "native/chat/message.react.js", "new_path": "native/chat/message.react.js", "diff": "@@ -18,6 +18,11 @@ import {\ntype MessageListNavProp,\nmessageListNavPropType,\n} from './message-list-types';\n+import {\n+ type KeyboardState,\n+ keyboardStatePropType,\n+ withKeyboardState,\n+} from '../navigation/keyboard-state';\nimport * as React from 'react';\nimport {\n@@ -27,7 +32,6 @@ import {\nPlatform,\n} from 'react-native';\nimport PropTypes from 'prop-types';\n-import { KeyboardUtils } from 'react-native-keyboard-input';\nimport { TextMessage, textMessageItemHeight } from './text-message.react';\nimport {\n@@ -68,7 +72,8 @@ type Props = {|\nnavigation: MessageListNavProp,\ntoggleFocus: (messageKey: string) => void,\nverticalBounds: ?VerticalBounds,\n- keyboardShowing: bool,\n+ // withKeyboardState\n+ keyboardState: ?KeyboardState,\n|};\nclass Message extends React.PureComponent<Props> {\n@@ -78,7 +83,7 @@ class Message extends React.PureComponent<Props> {\nnavigation: messageListNavPropType.isRequired,\ntoggleFocus: PropTypes.func.isRequired,\nverticalBounds: verticalBoundsPropType,\n- keyboardShowing: PropTypes.bool.isRequired,\n+ keyboardState: keyboardStatePropType,\n};\ncomponentDidUpdate(prevProps: Props) {\n@@ -100,7 +105,6 @@ class Message extends React.PureComponent<Props> {\nfocused={this.props.focused}\ntoggleFocus={this.props.toggleFocus}\nverticalBounds={this.props.verticalBounds}\n- keyboardShowing={this.props.keyboardShowing}\n/>\n);\n} else if (this.props.item.messageShapeType === \"multimedia\") {\n@@ -111,7 +115,6 @@ class Message extends React.PureComponent<Props> {\nfocused={this.props.focused}\ntoggleFocus={this.props.toggleFocus}\nverticalBounds={this.props.verticalBounds}\n- keyboardShowing={this.props.keyboardShowing}\n/>\n);\n} else {\n@@ -130,15 +133,22 @@ class Message extends React.PureComponent<Props> {\nreturn message;\n}\nreturn (\n- <TouchableWithoutFeedback onPress={KeyboardUtils.dismiss}>\n+ <TouchableWithoutFeedback onPress={this.dismissKeyboard}>\n{message}\n</TouchableWithoutFeedback>\n);\n}\n+ dismissKeyboard = () => {\n+ const { keyboardState } = this.props;\n+ keyboardState && keyboardState.dismissKeyboard();\n+ }\n+\n}\n+const WrappedMessage = withKeyboardState(Message);\n+\nexport {\n- Message,\n+ WrappedMessage as Message,\nmessageItemHeight,\n};\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-message-multimedia.react.js", "new_path": "native/chat/multimedia-message-multimedia.react.js", "diff": "@@ -26,12 +26,16 @@ import {\noverlayableScrollViewStatePropType,\nwithOverlayableScrollViewState,\n} from '../navigation/overlayable-scroll-view-state';\n+import {\n+ type KeyboardState,\n+ keyboardStatePropType,\n+ withKeyboardState,\n+} from '../navigation/keyboard-state';\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { View, StyleSheet } from 'react-native';\nimport Animated from 'react-native-reanimated';\n-import { KeyboardUtils } from 'react-native-keyboard-input';\nimport invariant from 'invariant';\nimport { messageKey } from 'lib/shared/message-utils';\n@@ -50,11 +54,12 @@ type Props = {|\nlightboxPosition: ?Animated.Value,\npostInProgress: bool,\npendingUpload: ?PendingMultimediaUpload,\n- keyboardShowing: bool,\nmessageFocused: bool,\ntoggleMessageFocus: (messageKey: string) => void,\n// withOverlayableScrollViewState\noverlayableScrollViewState: ?OverlayableScrollViewState,\n+ // withKeyboardState\n+ keyboardState: ?KeyboardState,\n|};\ntype State = {|\nhidden: bool,\n@@ -71,10 +76,10 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\nlightboxPosition: PropTypes.instanceOf(Animated.Value),\npostInProgress: PropTypes.bool.isRequired,\npendingUpload: pendingMultimediaUploadPropType,\n- keyboardShowing: PropTypes.bool.isRequired,\nmessageFocused: PropTypes.bool.isRequired,\ntoggleMessageFocus: PropTypes.func.isRequired,\noverlayableScrollViewState: overlayableScrollViewStatePropType,\n+ keyboardState: keyboardStatePropType,\n};\nview: ?View;\nclickable = true;\n@@ -160,8 +165,7 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\n}\nonPress = () => {\n- if (this.props.keyboardShowing) {\n- KeyboardUtils.dismiss();\n+ if (this.dismissKeyboardIfShowing()) {\nreturn;\n}\n@@ -191,8 +195,7 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\n}\nonLongPress = () => {\n- if (this.props.keyboardShowing) {\n- KeyboardUtils.dismiss();\n+ if (this.dismissKeyboardIfShowing()) {\nreturn;\n}\n@@ -261,6 +264,11 @@ class MultimediaMessageMultimedia extends React.PureComponent<Props, State> {\n});\n}\n+ dismissKeyboardIfShowing = () => {\n+ const { keyboardState } = this.props;\n+ return !!(keyboardState && keyboardState.dismissKeyboardIfShowing());\n+ }\n+\n}\nconst styles = StyleSheet.create({\n@@ -273,4 +281,6 @@ const styles = StyleSheet.create({\n},\n});\n-export default withOverlayableScrollViewState(MultimediaMessageMultimedia);\n+export default withKeyboardState(\n+ withOverlayableScrollViewState(MultimediaMessageMultimedia),\n+);\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-message.react.js", "new_path": "native/chat/multimedia-message.react.js", "diff": "@@ -154,7 +154,6 @@ type Props = {|\nfocused: bool,\ntoggleFocus: (messageKey: string) => void,\nverticalBounds: ?VerticalBounds,\n- keyboardShowing: bool,\n// withLightboxPositionContext\nlightboxPosition: ?Animated.Value,\n|};\n@@ -166,7 +165,6 @@ class MultimediaMessage extends React.PureComponent<Props> {\nfocused: PropTypes.bool.isRequired,\ntoggleFocus: PropTypes.func.isRequired,\nverticalBounds: verticalBoundsPropType,\n- keyboardShowing: PropTypes.bool.isRequired,\nlightboxPosition: PropTypes.instanceOf(Animated.Value),\n};\n@@ -283,7 +281,6 @@ class MultimediaMessage extends React.PureComponent<Props> {\nlightboxPosition={this.props.lightboxPosition}\npostInProgress={!!pendingUploads}\npendingUpload={pendingUpload}\n- keyboardShowing={this.props.keyboardShowing}\nmessageFocused={this.props.focused}\ntoggleMessageFocus={this.props.toggleFocus}\nitem={this.props.item}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message.react.js", "new_path": "native/chat/text-message.react.js", "diff": "@@ -19,11 +19,15 @@ import {\noverlayableScrollViewStatePropType,\nwithOverlayableScrollViewState,\n} from '../navigation/overlayable-scroll-view-state';\n+import {\n+ type KeyboardState,\n+ keyboardStatePropType,\n+ withKeyboardState,\n+} from '../navigation/keyboard-state';\nimport * as React from 'react';\nimport { View } from 'react-native';\nimport PropTypes from 'prop-types';\n-import { KeyboardUtils } from 'react-native-keyboard-input';\nimport { messageKey } from 'lib/shared/message-utils';\n@@ -75,9 +79,10 @@ type Props = {|\nfocused: bool,\ntoggleFocus: (messageKey: string) => void,\nverticalBounds: ?VerticalBounds,\n- keyboardShowing: bool,\n// withOverlayableScrollViewState\noverlayableScrollViewState: ?OverlayableScrollViewState,\n+ // withKeyboardState\n+ keyboardState: ?KeyboardState,\n|};\nclass TextMessage extends React.PureComponent<Props> {\n@@ -87,8 +92,8 @@ class TextMessage extends React.PureComponent<Props> {\nfocused: PropTypes.bool.isRequired,\ntoggleFocus: PropTypes.func.isRequired,\nverticalBounds: verticalBoundsPropType,\n- keyboardShowing: PropTypes.bool.isRequired,\noverlayableScrollViewState: overlayableScrollViewStatePropType,\n+ keyboardState: keyboardStatePropType,\n};\nmessage: ?View;\n@@ -122,8 +127,7 @@ class TextMessage extends React.PureComponent<Props> {\n}\nonPress = () => {\n- if (this.props.keyboardShowing) {\n- KeyboardUtils.dismiss();\n+ if (this.dismissKeyboardIfShowing()) {\nreturn;\n}\n@@ -178,9 +182,16 @@ class TextMessage extends React.PureComponent<Props> {\n});\n}\n+ dismissKeyboardIfShowing = () => {\n+ const { keyboardState } = this.props;\n+ return !!(keyboardState && keyboardState.dismissKeyboardIfShowing());\n+ }\n+\n}\n-const WrappedTextMessage = withOverlayableScrollViewState(TextMessage);\n+const WrappedTextMessage = withKeyboardState(\n+ withOverlayableScrollViewState(TextMessage),\n+);\nexport {\nWrappedTextMessage as TextMessage,\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/navigation/keyboard-state-container.react.js", "diff": "+// @flow\n+\n+import * as React from 'react';\n+import PropTypes from 'prop-types';\n+import { KeyboardUtils } from 'react-native-keyboard-input';\n+\n+import {\n+ addKeyboardShowListener,\n+ addKeyboardDismissListener,\n+ removeKeyboardListener,\n+} from '../keyboard';\n+import { KeyboardContext } from './keyboard-state';\n+\n+type Props = {|\n+ children: React.Node,\n+|};\n+type State = {|\n+ systemKeyboardShowing: bool,\n+ imageGalleryOpen: bool,\n+|};\n+class KeyboardStateContainer extends React.PureComponent<Props, State> {\n+\n+ static propTypes = {\n+ children: PropTypes.node.isRequired,\n+ };\n+ state = {\n+ systemKeyboardShowing: false,\n+ imageGalleryOpen: false,\n+ };\n+ keyboardShowListener: ?Object;\n+ keyboardDismissListener: ?Object;\n+\n+ keyboardShow = () => {\n+ this.setState({ systemKeyboardShowing: true });\n+ }\n+\n+ keyboardDismiss = () => {\n+ this.setState({ systemKeyboardShowing: false });\n+ }\n+\n+ componentDidMount() {\n+ this.keyboardShowListener = addKeyboardShowListener(this.keyboardShow);\n+ this.keyboardDismissListener = addKeyboardDismissListener(\n+ this.keyboardDismiss,\n+ );\n+ }\n+\n+ componentWillUnmount() {\n+ if (this.keyboardShowListener) {\n+ removeKeyboardListener(this.keyboardShowListener);\n+ this.keyboardShowListener = null;\n+ }\n+ if (this.keyboardDismissListener) {\n+ removeKeyboardListener(this.keyboardDismissListener);\n+ this.keyboardDismissListener = null;\n+ }\n+ }\n+\n+ dismissKeyboard = () => {\n+ KeyboardUtils.dismiss();\n+ }\n+\n+ dismissKeyboardIfShowing = () => {\n+ if (!this.keyboardShowing) {\n+ return false;\n+ }\n+ this.dismissKeyboard();\n+ return true;\n+ }\n+\n+ get keyboardShowing() {\n+ const { systemKeyboardShowing, imageGalleryOpen } = this.state;\n+ return systemKeyboardShowing || imageGalleryOpen;\n+ }\n+\n+ setImageGalleryOpen = (imageGalleryOpen: bool) => {\n+ this.setState({ imageGalleryOpen });\n+ }\n+\n+ render() {\n+ const { systemKeyboardShowing, imageGalleryOpen } = this.state;\n+ const {\n+ keyboardShowing,\n+ dismissKeyboard,\n+ dismissKeyboardIfShowing,\n+ setImageGalleryOpen,\n+ } = this;\n+ const keyboardState = {\n+ keyboardShowing,\n+ dismissKeyboard,\n+ dismissKeyboardIfShowing,\n+ systemKeyboardShowing,\n+ imageGalleryOpen,\n+ setImageGalleryOpen,\n+ };\n+ return (\n+ <KeyboardContext.Provider value={keyboardState}>\n+ {this.props.children}\n+ </KeyboardContext.Provider>\n+ );\n+ }\n+\n+}\n+\n+export default KeyboardStateContainer;\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/navigation/keyboard-state.js", "diff": "+// @flow\n+\n+import * as React from 'react';\n+import PropTypes from 'prop-types';\n+\n+export type KeyboardState = {|\n+ keyboardShowing: bool,\n+ dismissKeyboard: () => void,\n+ dismissKeyboardIfShowing: () => bool,\n+ systemKeyboardShowing: bool,\n+ imageGalleryOpen: bool,\n+ setImageGalleryOpen: (imageGalleryOpen: bool) => void,\n+|};\n+\n+const keyboardStatePropType = PropTypes.shape({\n+ keyboardShowing: PropTypes.bool.isRequired,\n+ dismissKeyboard: PropTypes.func.isRequired,\n+ dismissKeyboardIfShowing: PropTypes.func.isRequired,\n+ systemKeyboardShowing: PropTypes.bool.isRequired,\n+ imageGalleryOpen: PropTypes.bool.isRequired,\n+ setImageGalleryOpen: PropTypes.func.isRequired,\n+});\n+\n+const KeyboardContext = React.createContext<?KeyboardState>(null);\n+\n+function withKeyboardState<\n+ AllProps: {},\n+ ComponentType: React.ComponentType<AllProps>,\n+>(Component: ComponentType): React.ComponentType<$Diff<\n+ React.ElementConfig<ComponentType>,\n+ { keyboardState: ?KeyboardState },\n+>> {\n+ class KeyboardStateHOC extends React.PureComponent<$Diff<\n+ React.ElementConfig<ComponentType>,\n+ { keyboardState: ?KeyboardState },\n+ >> {\n+ render() {\n+ return (\n+ <KeyboardContext.Consumer>\n+ {value => (\n+ <Component\n+ {...this.props}\n+ keyboardState={value}\n+ />\n+ )}\n+ </KeyboardContext.Consumer>\n+ );\n+ }\n+ }\n+ return KeyboardStateHOC;\n+}\n+\n+export {\n+ keyboardStatePropType,\n+ KeyboardContext,\n+ withKeyboardState,\n+};\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/navigation-setup.js", "new_path": "native/navigation/navigation-setup.js", "diff": "@@ -109,6 +109,7 @@ import { MultimediaTooltipModal } from '../chat/multimedia-tooltip-modal.react';\nimport ChatInputStateContainer from '../chat/chat-input-state-container.react';\nimport OverlayableScrollViewStateContainer\nfrom './overlayable-scroll-view-state-container.react';\n+import KeyboardStateContainer from './keyboard-state-container.react';\nimport ActionResultModal from './action-result-modal.react';\nimport {\nTextMessageTooltipModal,\n@@ -236,7 +237,9 @@ class WrappedAppNavigator\nreturn (\n<ChatInputStateContainer>\n<OverlayableScrollViewStateContainer>\n+ <KeyboardStateContainer>\n<AppNavigator navigation={this.props.navigation} />\n+ </KeyboardStateContainer>\n</OverlayableScrollViewStateContainer>\n</ChatInputStateContainer>\n);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] KeyboardStateContainer
129,187
29.07.2019 18:37:26
14,400
0a14405373f4c3f3737b175170f8bd0860013ac1
[native] Get params necessary for modal display to ThreadSettingsMember
[ { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings-member.react.js", "new_path": "native/chat/settings/thread-settings-member.react.js", "diff": "@@ -12,6 +12,15 @@ import type { AppState } from '../../redux/redux-setup';\nimport type { LoadingStatus } from 'lib/types/loading-types';\nimport { loadingStatusPropType } from 'lib/types/loading-types';\nimport type { DispatchActionPromise } from 'lib/utils/action-utils';\n+import {\n+ type OverlayableScrollViewState,\n+ overlayableScrollViewStatePropType,\n+ withOverlayableScrollViewState,\n+} from '../../navigation/overlayable-scroll-view-state';\n+import {\n+ type VerticalBounds,\n+ verticalBoundsPropType,\n+} from '../../types/lightbox-types';\nimport * as React from 'react';\nimport {\n@@ -47,9 +56,12 @@ type Props = {|\nthreadInfo: ThreadInfo,\ncanEdit: bool,\nlastListItem: bool,\n+ verticalBounds: ?VerticalBounds,\n// Redux state\nremoveUserLoadingStatus: LoadingStatus,\nchangeRoleLoadingStatus: LoadingStatus,\n+ // withOverlayableScrollViewState\n+ overlayableScrollViewState: ?OverlayableScrollViewState,\n// Redux dispatch functions\ndispatchActionPromise: DispatchActionPromise,\n// async functions that hit server APIs\n@@ -73,8 +85,10 @@ class ThreadSettingsMember extends React.PureComponent<Props, State> {\nthreadInfo: threadInfoPropType.isRequired,\ncanEdit: PropTypes.bool.isRequired,\nlastListItem: PropTypes.bool.isRequired,\n+ verticalBounds: verticalBoundsPropType,\nremoveUserLoadingStatus: loadingStatusPropType.isRequired,\nchangeRoleLoadingStatus: loadingStatusPropType.isRequired,\n+ overlayableScrollViewState: overlayableScrollViewStatePropType,\ndispatchActionPromise: PropTypes.func.isRequired,\nremoveUsersFromThread: PropTypes.func.isRequired,\nchangeThreadMemberRoles: PropTypes.func.isRequired,\n@@ -345,4 +359,4 @@ export default connect(\n)(state),\n}),\n{ removeUsersFromThread, changeThreadMemberRoles },\n-)(ThreadSettingsMember);\n+)(withOverlayableScrollViewState(ThreadSettingsMember));\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings.react.js", "new_path": "native/chat/settings/thread-settings.react.js", "diff": "@@ -14,12 +14,19 @@ import {\nimport type { AppState } from '../../redux/redux-setup';\nimport type { CategoryType } from './thread-settings-category.react';\nimport type { Navigate } from '../../navigation/route-names';\n+import type { VerticalBounds } from '../../types/lightbox-types';\n+import {\n+ type OverlayableScrollViewState,\n+ overlayableScrollViewStatePropType,\n+ withOverlayableScrollViewState,\n+} from '../../navigation/overlayable-scroll-view-state';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n-import { FlatList, StyleSheet } from 'react-native';\n+import { View, FlatList, StyleSheet } from 'react-native';\nimport _isEqual from 'lodash/fp/isEqual';\nimport invariant from 'invariant';\n+import hoistNonReactStatics from 'hoist-non-react-statics';\nimport {\nrelativeMemberInfoSelectorForMembersOfThread,\n@@ -76,6 +83,7 @@ type NavProp = NavigationScreenProp<{|\n...NavigationLeafRoute,\nparams: {|\nthreadInfo: ThreadInfo,\n+ gesturesDisabled?: bool,\n|},\n|}>;\n@@ -154,6 +162,7 @@ type ChatSettingsItem =\nthreadInfo: ThreadInfo,\ncanEdit: bool,\nlastListItem: bool,\n+ verticalBounds: ?VerticalBounds,\n|}\n| {|\nitemType: \"addMember\",\n@@ -181,6 +190,8 @@ type Props = {|\nchildThreadInfos: ?ThreadInfo[],\nsomethingIsSaving: bool,\ntabActive: bool,\n+ // withOverlayableScrollViewState\n+ overlayableScrollViewState: ?OverlayableScrollViewState,\n|};\ntype State = {|\nshowMaxMembers: number,\n@@ -190,8 +201,9 @@ type State = {|\nnameTextHeight: ?number,\ndescriptionTextHeight: ?number,\ncolorEditValue: string,\n+ verticalBounds: ?VerticalBounds,\n|};\n-class InnerThreadSettings extends React.PureComponent<Props, State> {\n+class ThreadSettings extends React.PureComponent<Props, State> {\nstatic propTypes = {\nnavigation: PropTypes.shape({\n@@ -199,6 +211,7 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\nkey: PropTypes.string.isRequired,\nparams: PropTypes.shape({\nthreadInfo: threadInfoPropType.isRequired,\n+ gesturesDisabled: PropTypes.bool,\n}).isRequired,\n}).isRequired,\nnavigate: PropTypes.func.isRequired,\n@@ -209,11 +222,14 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\nchildThreadInfos: PropTypes.arrayOf(threadInfoPropType),\nsomethingIsSaving: PropTypes.bool.isRequired,\ntabActive: PropTypes.bool.isRequired,\n+ overlayableScrollViewState: overlayableScrollViewStatePropType,\n};\nstatic navigationOptions = ({ navigation }) => ({\ntitle: navigation.state.params.threadInfo.uiName,\nheaderBackTitle: \"Back\",\n+ gesturesEnabled: !navigation.state.params.gesturesDisabled,\n});\n+ flatListContainer: ?View;\nconstructor(props: Props) {\nsuper(props);\n@@ -230,6 +246,7 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\nnameTextHeight: null,\ndescriptionTextHeight: null,\ncolorEditValue: threadInfo.color,\n+ verticalBounds: null,\n};\n}\n@@ -237,9 +254,15 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\nreturn props.navigation.state.params.threadInfo;\n}\n+ static scrollDisabled(props: Props) {\n+ const { overlayableScrollViewState } = props;\n+ return !!(overlayableScrollViewState &&\n+ overlayableScrollViewState.scrollDisabled);\n+ }\n+\ncomponentDidMount() {\nregisterChatScreen(this.props.navigation.state.key, this);\n- const threadInfo = InnerThreadSettings.getThreadInfo(this.props);\n+ const threadInfo = ThreadSettings.getThreadInfo(this.props);\nif (!threadInChatList(threadInfo)) {\nthreadWatcher.watchID(threadInfo.id);\n}\n@@ -247,15 +270,15 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\ncomponentWillUnmount() {\nregisterChatScreen(this.props.navigation.state.key, null);\n- const threadInfo = InnerThreadSettings.getThreadInfo(this.props);\n+ const threadInfo = ThreadSettings.getThreadInfo(this.props);\nif (!threadInChatList(threadInfo)) {\nthreadWatcher.removeID(threadInfo.id);\n}\n}\n- componentWillReceiveProps(nextProps: Props) {\n- const oldThreadInfo = InnerThreadSettings.getThreadInfo(this.props);\n- const newThreadInfo = nextProps.threadInfo;\n+ componentDidUpdate(prevProps: Props, prevState: State) {\n+ const oldThreadInfo = ThreadSettings.getThreadInfo(prevProps);\n+ const newThreadInfo = this.props.threadInfo;\nif (\nthreadInChatList(oldThreadInfo) &&\n@@ -269,10 +292,7 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\nthreadWatcher.removeID(oldThreadInfo.id);\n}\n- if (!newThreadInfo) {\n- return;\n- }\n-\n+ if (newThreadInfo) {\nif (!_isEqual(newThreadInfo)(oldThreadInfo)) {\nthis.props.navigation.setParams({ threadInfo: newThreadInfo });\n}\n@@ -284,6 +304,15 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\n}\n}\n+ const scrollIsDisabled = ThreadSettings.scrollDisabled(this.props);\n+ const scrollWasDisabled = ThreadSettings.scrollDisabled(prevProps);\n+ if (!scrollWasDisabled && scrollIsDisabled) {\n+ this.props.navigation.setParams({ gesturesDisabled: true });\n+ } else if (scrollWasDisabled && !scrollIsDisabled) {\n+ this.props.navigation.setParams({ gesturesDisabled: false });\n+ }\n+ }\n+\nget canReset() {\nreturn this.props.tabActive &&\n(this.state.nameEditValue === null ||\n@@ -292,7 +321,7 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\n}\nrender() {\n- const threadInfo = InnerThreadSettings.getThreadInfo(this.props);\n+ const threadInfo = ThreadSettings.getThreadInfo(this.props);\nconst canStartEditing = this.canReset;\nconst canEditThread = threadHasPermission(\n@@ -463,6 +492,7 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\n} else {\nthreadMembers = this.props.threadMembers;\n}\n+ const { verticalBounds } = this.state;\nconst members = threadMembers.map(memberInfo => ({\nitemType: \"member\",\nkey: `member${memberInfo.id}`,\n@@ -470,6 +500,7 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\nthreadInfo,\ncanEdit: canStartEditing,\nlastListItem: false,\n+ verticalBounds,\n}));\nlet memberItems;\nif (seeMoreMembers) {\n@@ -552,14 +583,41 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\n}\nreturn (\n+ <View\n+ style={styles.container}\n+ ref={this.flatListContainerRef}\n+ onLayout={this.onFlatListContainerLayout}\n+ >\n<FlatList\ndata={listData}\ncontentContainerStyle={styles.flatList}\nrenderItem={this.renderItem}\n+ scrollEnabled={!ThreadSettings.scrollDisabled(this.props)}\n/>\n+ </View>\n);\n}\n+ flatListContainerRef = (flatListContainer: ?View) => {\n+ this.flatListContainer = flatListContainer;\n+ }\n+\n+ onFlatListContainerLayout = () => {\n+ const { flatListContainer } = this;\n+ if (!flatListContainer) {\n+ return;\n+ }\n+ flatListContainer.measure((x, y, width, height, pageX, pageY) => {\n+ if (\n+ height === null || height === undefined ||\n+ pageY === null || pageY === undefined\n+ ) {\n+ return;\n+ }\n+ this.setState({ verticalBounds: { height, y: pageY } });\n+ });\n+ }\n+\nrenderItem = (row: { item: ChatSettingsItem }) => {\nconst item = row.item;\nif (item.itemType === \"header\") {\n@@ -635,6 +693,7 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\nthreadInfo={item.threadInfo}\ncanEdit={item.canEdit}\nlastListItem={item.lastListItem}\n+ verticalBounds={item.verticalBounds}\n/>\n);\n} else if (item.itemType === \"addMember\") {\n@@ -678,7 +737,7 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\n}\nonPressComposeSubthread = () => {\n- const threadInfo = InnerThreadSettings.getThreadInfo(this.props);\n+ const threadInfo = ThreadSettings.getThreadInfo(this.props);\nthis.props.navigation.navigate(\nComposeSubthreadModalRouteName,\n{ threadInfo },\n@@ -686,7 +745,7 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\n}\nonPressAddMember = () => {\n- const threadInfo = InnerThreadSettings.getThreadInfo(this.props);\n+ const threadInfo = ThreadSettings.getThreadInfo(this.props);\nthis.props.navigation.navigate(\nAddUsersModalRouteName,\n{ threadInfo },\n@@ -708,6 +767,9 @@ class InnerThreadSettings extends React.PureComponent<Props, State> {\n}\nconst styles = StyleSheet.create({\n+ container: {\n+ flex: 1,\n+ },\nflatList: {\npaddingVertical: 16,\n},\n@@ -760,7 +822,7 @@ const somethingIsSaving = (\n};\nconst activeTabSelector = createActiveTabSelector(ChatRouteName);\n-const ThreadSettings = connect(\n+const WrappedThreadSettings = connect(\n(state: AppState, ownProps: { navigation: NavProp }) => {\nconst threadID = ownProps.navigation.state.params.threadInfo.id;\nconst threadMembers =\n@@ -773,6 +835,8 @@ const ThreadSettings = connect(\ntabActive: activeTabSelector(state),\n};\n},\n-)(InnerThreadSettings);\n+)(withOverlayableScrollViewState(ThreadSettings));\n+\n+hoistNonReactStatics(WrappedThreadSettings, ThreadSettings);\n-export default ThreadSettings;\n+export default WrappedThreadSettings;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Get params necessary for modal display to ThreadSettingsMember
129,187
29.07.2019 19:58:18
14,400
b7665559fda3cabb673c820dd243f2aa4fef3db0
[native] Fix arrow positioning on right-aligned tooltips
[ { "change_type": "MODIFY", "old_path": "native/components/tooltip2.react.js", "new_path": "native/components/tooltip2.react.js", "diff": "@@ -239,7 +239,7 @@ function createTooltip<\n}\nrender() {\n- const { navigation } = this.props;\n+ const { navigation, screenDimensions } = this.props;\nconst entries = tooltipSpec.entries.map((entry, index) => {\nconst style = index !== tooltipSpec.entries.length - 1\n@@ -256,11 +256,26 @@ function createTooltip<\n);\n});\n+ let triangleStyle;\n+ const { initialCoordinates } = navigation.state.params;\n+ const { x, width } = initialCoordinates;\n+ const extraLeftSpace = x;\n+ const extraRightSpace = screenDimensions.width - width - x;\n+ if (extraLeftSpace < extraRightSpace) {\n+ triangleStyle = {\n+ alignSelf: 'flex-start',\n+ left: extraLeftSpace + (width - 20) / 2,\n+ };\n+ } else {\n+ triangleStyle = {\n+ alignSelf: 'flex-end',\n+ right: extraRightSpace + (width - 20) / 2,\n+ };\n+ }\n+\nlet triangleDown = null;\nlet triangleUp = null;\n- const { location, initialCoordinates } = navigation.state.params;\n- const { x, width } = initialCoordinates;\n- const triangleStyle = { left: x + (width - 20) / 2 };\n+ const { location } = navigation.state.params;\nif (location === 'above') {\ntriangleDown = (\n<View style={[ styles.triangleDown, triangleStyle ]} />\n@@ -366,7 +381,6 @@ const styles = StyleSheet.create({\nborderBottomColor: \"#E1E1E1\",\n},\ntriangleDown: {\n- alignSelf: 'flex-start',\nwidth: 10,\nheight: 10,\nborderStyle: 'solid',\n@@ -381,7 +395,6 @@ const styles = StyleSheet.create({\ntop: Platform.OS === \"android\" ? -1 : 0,\n},\ntriangleUp: {\n- alignSelf: 'flex-start',\nwidth: 10,\nheight: 10,\nborderStyle: 'solid',\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Fix arrow positioning on right-aligned tooltips
129,187
29.07.2019 20:05:16
14,400
cdfb23475b31aab809914fbef6322ecda7e5b9fd
[native] ThreadSettingsMemberTooltipModal
[ { "change_type": "MODIFY", "old_path": "native/chat/settings/pencil-icon.react.js", "new_path": "native/chat/settings/pencil-icon.react.js", "diff": "@@ -18,7 +18,6 @@ function PencilIcon(props: {||}) {\nconst styles = StyleSheet.create({\neditIcon: {\nlineHeight: 20,\n- paddingLeft: 10,\npaddingTop: Platform.select({ android: 1, default: 0 }),\ntextAlign: 'right',\n},\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/chat/settings/thread-settings-member-tooltip-button.react.js", "diff": "+// @flow\n+\n+import type { ThreadInfo, RelativeMemberInfo } from 'lib/types/thread-types';\n+import type {\n+ NavigationScreenProp,\n+ NavigationLeafRoute,\n+} from 'react-navigation';\n+\n+import * as React from 'react';\n+import { TouchableOpacity } from 'react-native';\n+import PropTypes from 'prop-types';\n+\n+import PencilIcon from './pencil-icon.react';\n+\n+type Props = {\n+ navigation: NavigationScreenProp<NavigationLeafRoute>,\n+};\n+class ThreadSettingsMemberTooltipButton extends React.PureComponent<Props> {\n+\n+ static propTypes = {\n+ navigation: PropTypes.shape({\n+ goBack: PropTypes.func.isRequired,\n+ }).isRequired,\n+ };\n+\n+ render() {\n+ return (\n+ <TouchableOpacity onPress={this.onPress}>\n+ <PencilIcon />\n+ </TouchableOpacity>\n+ );\n+ }\n+\n+ onPress = () => {\n+ this.props.navigation.goBack();\n+ }\n+\n+}\n+\n+export default ThreadSettingsMemberTooltipButton;\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/chat/settings/thread-settings-member-tooltip-modal.react.js", "diff": "+// @flow\n+\n+import type { ThreadInfo, RelativeMemberInfo } from 'lib/types/thread-types';\n+\n+import { StyleSheet } from 'react-native';\n+\n+import { createTooltip } from '../../components/tooltip2.react';\n+import ThreadSettingsMemberTooltipButton\n+ from './thread-settings-member-tooltip-button.react';\n+\n+type CustomProps = {\n+ memberInfo: RelativeMemberInfo,\n+ threadInfo: ThreadInfo,\n+};\n+\n+const styles = StyleSheet.create({\n+ popoverLabelStyle: {\n+ textAlign: 'center',\n+ color: '#444',\n+ },\n+});\n+\n+function onRemoveUser(props: CustomProps) {\n+}\n+\n+function onToggleAdmin(props: CustomProps) {\n+}\n+\n+const spec = {\n+ entries: [\n+ { text: \"Remove user\", onPress: onRemoveUser },\n+ { text: \"Remove admin\", onPress: onToggleAdmin },\n+ { text: \"Make admin\", onPress: onToggleAdmin },\n+ ],\n+ labelStyle: styles.popoverLabelStyle,\n+};\n+\n+const ThreadSettingsMemberTooltipModal = createTooltip(\n+ ThreadSettingsMemberTooltipButton,\n+ spec,\n+);\n+\n+export default ThreadSettingsMemberTooltipModal;\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings-member.react.js", "new_path": "native/chat/settings/thread-settings-member.react.js", "diff": "@@ -21,6 +21,15 @@ import {\ntype VerticalBounds,\nverticalBoundsPropType,\n} from '../../types/lightbox-types';\n+import {\n+ type KeyboardState,\n+ keyboardStatePropType,\n+ withKeyboardState,\n+} from '../../navigation/keyboard-state';\n+import {\n+ type Navigate,\n+ ThreadSettingsMemberTooltipModalRouteName,\n+} from '../../navigation/route-names';\nimport * as React from 'react';\nimport {\n@@ -30,6 +39,7 @@ import {\nPlatform,\nAlert,\nActivityIndicator,\n+ TouchableOpacity,\n} from 'react-native';\nimport PropTypes from 'prop-types';\nimport _isEqual from 'lodash/fp/isEqual';\n@@ -55,6 +65,7 @@ type Props = {|\nmemberInfo: RelativeMemberInfo,\nthreadInfo: ThreadInfo,\ncanEdit: bool,\n+ navigate: Navigate,\nlastListItem: bool,\nverticalBounds: ?VerticalBounds,\n// Redux state\n@@ -62,6 +73,8 @@ type Props = {|\nchangeRoleLoadingStatus: LoadingStatus,\n// withOverlayableScrollViewState\noverlayableScrollViewState: ?OverlayableScrollViewState,\n+ // withKeyboardState\n+ keyboardState: ?KeyboardState,\n// Redux dispatch functions\ndispatchActionPromise: DispatchActionPromise,\n// async functions that hit server APIs\n@@ -84,15 +97,18 @@ class ThreadSettingsMember extends React.PureComponent<Props, State> {\nmemberInfo: relativeMemberInfoPropType.isRequired,\nthreadInfo: threadInfoPropType.isRequired,\ncanEdit: PropTypes.bool.isRequired,\n+ navigate: PropTypes.func.isRequired,\nlastListItem: PropTypes.bool.isRequired,\nverticalBounds: verticalBoundsPropType,\nremoveUserLoadingStatus: loadingStatusPropType.isRequired,\nchangeRoleLoadingStatus: loadingStatusPropType.isRequired,\noverlayableScrollViewState: overlayableScrollViewStatePropType,\n+ keyboardState: keyboardStatePropType,\ndispatchActionPromise: PropTypes.func.isRequired,\nremoveUsersFromThread: PropTypes.func.isRequired,\nchangeThreadMemberRoles: PropTypes.func.isRequired,\n};\n+ editButton: ?View;\nstatic memberIsAdmin(props: Props) {\nconst role = props.memberInfo.role &&\n@@ -177,11 +193,11 @@ class ThreadSettingsMember extends React.PureComponent<Props, State> {\neditButton = <ActivityIndicator size=\"small\" />;\n} else if (this.state.popoverConfig.length !== 0) {\neditButton = (\n- <Tooltip\n- buttonComponent={icon}\n- items={this.state.popoverConfig}\n- labelStyle={styles.popoverLabelStyle}\n- />\n+ <TouchableOpacity onPress={this.onPressEdit} style={styles.editButton}>\n+ <View onLayout={this.onEditButtonLayout} ref={this.editButtonRef}>\n+ <PencilIcon />\n+ </View>\n+ </TouchableOpacity>\n);\n}\n@@ -225,6 +241,44 @@ class ThreadSettingsMember extends React.PureComponent<Props, State> {\n);\n}\n+ editButtonRef = (editButton: ?View) => {\n+ this.editButton = editButton;\n+ }\n+\n+ onEditButtonLayout = () => {}\n+\n+ onPressEdit = () => {\n+ if (this.dismissKeyboardIfShowing()) {\n+ return;\n+ }\n+\n+ const { editButton, props: { verticalBounds } } = this;\n+ if (!editButton || !verticalBounds) {\n+ return;\n+ }\n+\n+ const { overlayableScrollViewState } = this.props;\n+ if (overlayableScrollViewState) {\n+ overlayableScrollViewState.setScrollDisabled(true);\n+ }\n+\n+ editButton.measure((x, y, width, height, pageX, pageY) => {\n+ const coordinates = { x: pageX, y: pageY, width, height };\n+ this.props.navigate({\n+ routeName: ThreadSettingsMemberTooltipModalRouteName,\n+ params: {\n+ initialCoordinates: coordinates,\n+ verticalBounds,\n+ },\n+ });\n+ });\n+ }\n+\n+ dismissKeyboardIfShowing = () => {\n+ const { keyboardState } = this.props;\n+ return !!(keyboardState && keyboardState.dismissKeyboardIfShowing());\n+ }\n+\nshowRemoveUserConfirmation = () => {\nconst userText = stringForUser(this.props.memberInfo);\nAlert.alert(\n@@ -329,10 +383,6 @@ const styles = StyleSheet.create({\nfontStyle: 'italic',\ncolor: \"#888888\",\n},\n- popoverLabelStyle: {\n- textAlign: 'center',\n- color: '#444',\n- },\nrole: {\nflex: 1,\nfontSize: 14,\n@@ -343,10 +393,11 @@ const styles = StyleSheet.create({\npaddingTop: 8,\npaddingBottom: Platform.OS === \"ios\" ? 12 : 10,\n},\n+ editButton: {\n+ paddingLeft: 10,\n+ },\n});\n-const icon = <PencilIcon />;\n-\nexport default connect(\n(state: AppState, ownProps: { memberInfo: RelativeMemberInfo }) => ({\nremoveUserLoadingStatus: createLoadingStatusSelector(\n@@ -359,4 +410,4 @@ export default connect(\n)(state),\n}),\n{ removeUsersFromThread, changeThreadMemberRoles },\n-)(withOverlayableScrollViewState(ThreadSettingsMember));\n+)(withKeyboardState(withOverlayableScrollViewState(ThreadSettingsMember)));\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings.react.js", "new_path": "native/chat/settings/thread-settings.react.js", "diff": "@@ -161,6 +161,7 @@ type ChatSettingsItem =\nmemberInfo: RelativeMemberInfo,\nthreadInfo: ThreadInfo,\ncanEdit: bool,\n+ navigate: Navigate,\nlastListItem: bool,\nverticalBounds: ?VerticalBounds,\n|}\n@@ -499,6 +500,7 @@ class ThreadSettings extends React.PureComponent<Props, State> {\nmemberInfo,\nthreadInfo,\ncanEdit: canStartEditing,\n+ navigate: this.props.navigation.navigate,\nlastListItem: false,\nverticalBounds,\n}));\n@@ -692,6 +694,7 @@ class ThreadSettings extends React.PureComponent<Props, State> {\nmemberInfo={item.memberInfo}\nthreadInfo={item.threadInfo}\ncanEdit={item.canEdit}\n+ navigate={item.navigate}\nlastListItem={item.lastListItem}\nverticalBounds={item.verticalBounds}\n/>\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/navigation-setup.js", "new_path": "native/navigation/navigation-setup.js", "diff": "@@ -91,6 +91,7 @@ import {\nMultimediaTooltipModalRouteName,\nActionResultModalRouteName,\nTextMessageTooltipModalRouteName,\n+ ThreadSettingsMemberTooltipModalRouteName,\naccountModals,\n} from './route-names';\nimport {\n@@ -114,6 +115,8 @@ import ActionResultModal from './action-result-modal.react';\nimport {\nTextMessageTooltipModal,\n} from '../chat/text-message-tooltip-modal.react';\n+import ThreadSettingsMemberTooltipModal\n+ from '../chat/settings/thread-settings-member-tooltip-modal.react';\nuseScreens();\n@@ -178,6 +181,7 @@ const AppNavigator = createLightboxNavigator(\n[MultimediaTooltipModalRouteName]: MultimediaTooltipModal,\n[ActionResultModalRouteName]: ActionResultModal,\n[TextMessageTooltipModalRouteName]: TextMessageTooltipModal,\n+ [ThreadSettingsMemberTooltipModalRouteName]: ThreadSettingsMemberTooltipModal,\n},\n);\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/route-names.js", "new_path": "native/navigation/route-names.js", "diff": "@@ -39,6 +39,8 @@ export const MultimediaModalRouteName = 'MultimediaModal';\nexport const MultimediaTooltipModalRouteName = 'MultimediaTooltipModal';\nexport const ActionResultModalRouteName = 'ActionResultModal';\nexport const TextMessageTooltipModalRouteName = 'TextMessageTooltipModal';\n+export const ThreadSettingsMemberTooltipModalRouteName =\n+ 'ThreadSettingsMemberTooltipModal';\nexport const accountModals = [\nLoggedOutModalRouteName,\n@@ -49,4 +51,5 @@ export const scrollBlockingChatModals = [\nMultimediaModalRouteName,\nMultimediaTooltipModalRouteName,\nTextMessageTooltipModalRouteName,\n+ ThreadSettingsMemberTooltipModalRouteName,\n];\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] ThreadSettingsMemberTooltipModal
129,187
29.07.2019 20:12:27
14,400
d570a9e34dc36bd5a8136ee67966804ee6002cd1
[native] Kill popoverConfig
[ { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings-member.react.js", "new_path": "native/chat/settings/thread-settings-member.react.js", "diff": "@@ -42,7 +42,6 @@ import {\nTouchableOpacity,\n} from 'react-native';\nimport PropTypes from 'prop-types';\n-import _isEqual from 'lodash/fp/isEqual';\nimport invariant from 'invariant';\nimport { threadHasPermission } from 'lib/shared/thread-utils';\n@@ -88,10 +87,7 @@ type Props = {|\nnewRole: string,\n) => Promise<ChangeThreadSettingsResult>,\n|};\n-type State = {|\n- popoverConfig: $ReadOnlyArray<{ label: string, onPress: () => void }>,\n-|};\n-class ThreadSettingsMember extends React.PureComponent<Props, State> {\n+class ThreadSettingsMember extends React.PureComponent<Props> {\nstatic propTypes = {\nmemberInfo: relativeMemberInfoPropType.isRequired,\n@@ -116,60 +112,47 @@ class ThreadSettingsMember extends React.PureComponent<Props, State> {\nreturn role && !role.isDefault && role.name === \"Admins\";\n}\n- generatePopoverConfig(props: Props) {\n- const role = props.memberInfo.role;\n- if (!props.canEdit || !role) {\n+ enabledEntries() {\n+ const role = this.props.memberInfo.role;\n+ if (!this.props.canEdit || !role) {\nreturn [];\n}\nconst canRemoveMembers = threadHasPermission(\n- props.threadInfo,\n+ this.props.threadInfo,\nthreadPermissions.REMOVE_MEMBERS,\n);\nconst canChangeRoles = threadHasPermission(\n- props.threadInfo,\n+ this.props.threadInfo,\nthreadPermissions.CHANGE_ROLE,\n);\nconst result = [];\nif (\ncanRemoveMembers &&\n- !props.memberInfo.isViewer &&\n+ !this.props.memberInfo.isViewer &&\n(\ncanChangeRoles ||\n(\n- props.threadInfo.roles[role] &&\n- props.threadInfo.roles[role].isDefault\n+ this.props.threadInfo.roles[role] &&\n+ this.props.threadInfo.roles[role].isDefault\n)\n)\n) {\n- result.push({ label: \"Remove user\", onPress: this.showRemoveUserConfirmation });\n+ result.push(\"Remove user\");\n}\n- if (canChangeRoles && props.memberInfo.username) {\n- const adminText = ThreadSettingsMember.memberIsAdmin(props)\n+ if (canChangeRoles && this.props.memberInfo.username) {\n+ result.push(\n+ ThreadSettingsMember.memberIsAdmin(this.props)\n? \"Remove admin\"\n- : \"Make admin\";\n- result.push({ label: adminText, onPress: this.showMakeAdminConfirmation });\n+ : \"Make admin\"\n+ );\n}\nreturn result;\n}\n- constructor(props: Props) {\n- super(props);\n- this.state = {\n- popoverConfig: this.generatePopoverConfig(props),\n- };\n- }\n-\n- componentWillReceiveProps(nextProps: Props) {\n- const nextPopoverConfig = this.generatePopoverConfig(nextProps);\n- if (!_isEqual(this.state.popoverConfig)(nextPopoverConfig)) {\n- this.setState({ popoverConfig: nextPopoverConfig });\n- }\n- }\n-\nrender() {\nconst userText = stringForUser(this.props.memberInfo);\nlet userInfo = null;\n@@ -191,7 +174,7 @@ class ThreadSettingsMember extends React.PureComponent<Props, State> {\nthis.props.changeRoleLoadingStatus === \"loading\"\n) {\neditButton = <ActivityIndicator size=\"small\" />;\n- } else if (this.state.popoverConfig.length !== 0) {\n+ } else if (this.enabledEntries().length !== 0) {\neditButton = (\n<TouchableOpacity onPress={this.onPressEdit} style={styles.editButton}>\n<View onLayout={this.onEditButtonLayout} ref={this.editButtonRef}>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Kill popoverConfig
129,187
30.07.2019 11:11:07
14,400
53132e9372621ebda35799417b80465af730d0af
[native] Move popoverLabelStyle to TooltipItem
[ { "change_type": "MODIFY", "old_path": "native/chat/inner-text-message.react.js", "new_path": "native/chat/inner-text-message.react.js", "diff": "@@ -107,10 +107,6 @@ const styles = StyleSheet.create({\ncolor: \"#129AFF\",\ntextDecorationLine: \"underline\",\n},\n- popoverLabelStyle: {\n- textAlign: 'center',\n- color: '#444',\n- },\n});\nexport default InnerTextMessage;\n" }, { "change_type": "MODIFY", "old_path": "native/chat/multimedia-tooltip-modal.react.js", "new_path": "native/chat/multimedia-tooltip-modal.react.js", "diff": "@@ -5,8 +5,6 @@ import type {\nChatMultimediaMessageInfoItem,\n} from './multimedia-message.react';\n-import { StyleSheet } from 'react-native';\n-\nimport { createTooltip, tooltipHeight } from '../components/tooltip2.react';\nimport MultimediaTooltipButton from './multimedia-tooltip-button.react';\nimport { saveImage } from '../media/save-image';\n@@ -21,18 +19,10 @@ function onPressSave(props: CustomProps) {\nreturn saveImage(props.mediaInfo);\n}\n-const styles = StyleSheet.create({\n- popoverLabelStyle: {\n- textAlign: 'center',\n- color: '#444',\n- },\n-});\n-\nconst spec = {\nentries: [\n{ text: \"Save\", onPress: onPressSave },\n],\n- labelStyle: styles.popoverLabelStyle,\n};\nconst MultimediaTooltipModal = createTooltip(MultimediaTooltipButton, spec);\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings-member-tooltip-modal.react.js", "new_path": "native/chat/settings/thread-settings-member-tooltip-modal.react.js", "diff": "import type { ThreadInfo, RelativeMemberInfo } from 'lib/types/thread-types';\n-import { StyleSheet } from 'react-native';\n-\nimport { createTooltip } from '../../components/tooltip2.react';\nimport ThreadSettingsMemberTooltipButton\nfrom './thread-settings-member-tooltip-button.react';\n@@ -13,13 +11,6 @@ type CustomProps = {\nthreadInfo: ThreadInfo,\n};\n-const styles = StyleSheet.create({\n- popoverLabelStyle: {\n- textAlign: 'center',\n- color: '#444',\n- },\n-});\n-\nfunction onRemoveUser(props: CustomProps) {\n}\n@@ -32,7 +23,6 @@ const spec = {\n{ text: \"Remove admin\", onPress: onToggleAdmin },\n{ text: \"Make admin\", onPress: onToggleAdmin },\n],\n- labelStyle: styles.popoverLabelStyle,\n};\nconst ThreadSettingsMemberTooltipModal = createTooltip(\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message-tooltip-modal.react.js", "new_path": "native/chat/text-message-tooltip-modal.react.js", "diff": "import type { ChatTextMessageInfoItemWithHeight } from './text-message.react';\n-import { Clipboard, StyleSheet } from 'react-native';\n+import { Clipboard } from 'react-native';\nimport { createTooltip, tooltipHeight } from '../components/tooltip2.react';\nimport TextMessageTooltipButton from './text-message-tooltip-button.react';\n@@ -19,18 +19,10 @@ function onPressCopy(props: CustomProps) {\nsetTimeout(confirmCopy);\n}\n-const styles = StyleSheet.create({\n- popoverLabelStyle: {\n- textAlign: 'center',\n- color: '#444',\n- },\n-});\n-\nconst spec = {\nentries: [\n{ text: \"Copy\", onPress: onPressCopy },\n],\n- labelStyle: styles.popoverLabelStyle,\n};\nconst TextMessageTooltipModal = createTooltip(TextMessageTooltipButton, spec);\n" }, { "change_type": "MODIFY", "old_path": "native/components/tooltip2-item.react.js", "new_path": "native/components/tooltip2-item.react.js", "diff": "@@ -39,7 +39,10 @@ class TooltipItem<CP: {}> extends React.PureComponent<Props<CP>> {\nreturn (\n<View style={[styles.itemContainer, this.props.containerStyle]}>\n<TouchableOpacity onPress={this.onPress}>\n- <Text style={this.props.labelStyle} numberOfLines={1}>\n+ <Text\n+ style={[ styles.label, this.props.labelStyle ]}\n+ numberOfLines={1}\n+ >\n{this.props.spec.text}\n</Text>\n</TouchableOpacity>\n@@ -57,6 +60,12 @@ const styles = StyleSheet.create({\nitemContainer: {\npadding: 10,\n},\n+ label: {\n+ textAlign: 'center',\n+ color: '#444',\n+ fontSize: 14,\n+ lineHeight: 17,\n+ },\n});\nexport default TooltipItem;\n" }, { "change_type": "MODIFY", "old_path": "native/components/tooltip2.react.js", "new_path": "native/components/tooltip2.react.js", "diff": "@@ -251,7 +251,7 @@ function createTooltip<\nspec={entry}\nonPress={this.onPressEntry}\ncontainerStyle={style}\n- labelStyle={[ styles.label, tooltipSpec.labelStyle ]}\n+ labelStyle={tooltipSpec.labelStyle}\n/>\n);\n});\n@@ -407,10 +407,6 @@ const styles = StyleSheet.create({\nborderRightColor: 'transparent',\nborderLeftColor: 'transparent',\n},\n- label: {\n- fontSize: 14,\n- lineHeight: 17,\n- },\n});\nfunction tooltipHeight(numEntries: number) {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Move popoverLabelStyle to TooltipItem
129,187
30.07.2019 11:11:55
14,400
3c104c7f6bdf59d9b6ceaf57e1fff7fad8a0080f
[native] Delete legacy Tooltip
[ { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings-member.react.js", "new_path": "native/chat/settings/thread-settings-member.react.js", "diff": "@@ -57,7 +57,6 @@ import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors';\nimport EditSettingButton from '../../components/edit-setting-button.react';\nimport Button from '../../components/button.react';\n-import Tooltip from '../../components/tooltip.react';\nimport PencilIcon from './pencil-icon.react';\ntype Props = {|\n" }, { "change_type": "DELETE", "old_path": "native/components/tooltip-item.react.js", "new_path": null, "diff": "-// @flow\n-\n-import type { ViewStyle, TextStyle } from '../types/styles';\n-\n-import * as React from 'react';\n-import {\n- View,\n- TouchableOpacity,\n- StyleSheet,\n- Text,\n- ViewPropTypes,\n-} from 'react-native';\n-import PropTypes from 'prop-types';\n-\n-export type Label = string | () => React.Node;\n-export const labelPropType = PropTypes.oneOfType([\n- PropTypes.string,\n- PropTypes.func,\n-]);\n-\n-type Props = {\n- onPress: (userCallback: () => void) => void,\n- onPressUserCallback: () => void,\n- label: Label,\n- containerStyle: ?ViewStyle,\n- labelStyle: ?TextStyle,\n-};\n-class TooltipItem extends React.PureComponent<Props> {\n-\n- static propTypes = {\n- onPress: PropTypes.func.isRequired,\n- onPressUserCallback: PropTypes.func.isRequired,\n- label: labelPropType.isRequired,\n- containerStyle: ViewPropTypes.style,\n- labelStyle: Text.propTypes.style,\n- };\n- static defaultProps = {\n- labelStyle: null,\n- containerStyle: null,\n- };\n-\n- render() {\n- const label = typeof this.props.label === 'string'\n- ? <Text style={this.props.labelStyle}>{this.props.label}</Text>\n- : this.props.label();\n- return (\n- <View style={[styles.itemContainer, this.props.containerStyle]}>\n- <TouchableOpacity onPress={this.onPress}>\n- {label}\n- </TouchableOpacity>\n- </View>\n- );\n- }\n-\n- onPress = () => {\n- this.props.onPress(this.props.onPressUserCallback);\n- }\n-\n-}\n-\n-const styles = StyleSheet.create({\n- itemContainer: {\n- padding: 10,\n- },\n-});\n-\n-export default TooltipItem;\n" }, { "change_type": "DELETE", "old_path": "native/components/tooltip.react.js", "new_path": null, "diff": "-// @flow\n-\n-import type { ViewStyle, TextStyle } from '../types/styles';\n-import { type Dimensions, dimensionsPropType } from 'lib/types/media-types';\n-import type { AppState } from '../redux/redux-setup';\n-\n-import * as React from 'react';\n-import {\n- View,\n- Modal,\n- Animated,\n- TouchableOpacity,\n- StyleSheet,\n- Text,\n- Easing,\n- ViewPropTypes,\n- Platform,\n-} from 'react-native';\n-import PropTypes from 'prop-types';\n-import invariant from 'invariant';\n-\n-import { connect } from 'lib/utils/redux-utils';\n-\n-import TooltipItem, { type Label, labelPropType } from './tooltip-item.react';\n-import { dimensionsSelector } from '../selectors/dimension-selectors';\n-\n-export type TooltipItemData = { +label: Label, onPress: () => mixed };\n-\n-type Props = {\n- buttonComponent: React.Node,\n- buttonComponentExpandRatio: number,\n- items: $ReadOnlyArray<{ +label: Label, onPress: () => void }>,\n- componentWrapperStyle?: ViewStyle,\n- overlayStyle?: ViewStyle,\n- tooltipContainerStyle?: ViewStyle,\n- labelContainerStyle?: ViewStyle,\n- labelSeparatorColor: string,\n- labelStyle?: TextStyle,\n- setBelow: bool,\n- animationType?: \"timing\" | \"spring\",\n- onRequestClose: () => void,\n- triangleOffset: number,\n- delayLongPress: number,\n- onOpenTooltipMenu?: () => void,\n- onCloseTooltipMenu?: () => void,\n- componentContainerStyle?: ViewStyle,\n- timingConfig?: { duration?: number },\n- springConfig?: { tension?: number, friction?: number },\n- opacityChangeDuration?: number,\n- innerRef?: (tooltip: ?Tooltip) => void,\n- onPressOverride?: () => void,\n- onLongPress?: () => void,\n- // Redux state\n- dimensions: Dimensions,\n-};\n-type State = {\n- isModalOpen: bool,\n- x: number,\n- y: number,\n- width: number,\n- height: number,\n- opacity: Animated.Value,\n- tooltipContainerScale: Animated.Value,\n- buttonComponentContainerScale: number | Animated.Interpolation,\n- tooltipTriangleDown: bool,\n- tooltipTriangleLeftMargin: number,\n- triangleOffset: number,\n- willPopUp: bool,\n- oppositeOpacity: ?Animated.Interpolation,\n- tooltipContainerX: ?Animated.Interpolation,\n- tooltipContainerY: ?Animated.Interpolation,\n- buttonComponentOpacity: number,\n-};\n-class Tooltip extends React.PureComponent<Props, State> {\n-\n- static propTypes = {\n- buttonComponent: PropTypes.node.isRequired,\n- buttonComponentExpandRatio: PropTypes.number,\n- items: PropTypes.arrayOf(PropTypes.shape({\n- label: labelPropType.isRequired,\n- onPress: PropTypes.func.isRequired,\n- })).isRequired,\n- componentWrapperStyle: ViewPropTypes.style,\n- overlayStyle: ViewPropTypes.style,\n- tooltipContainerStyle: ViewPropTypes.style,\n- labelContainerStyle: ViewPropTypes.style,\n- labelSeparatorColor: PropTypes.string,\n- labelStyle: Text.propTypes.style,\n- setBelow: PropTypes.bool,\n- animationType: PropTypes.oneOf([ \"timing\", \"spring\" ]),\n- onRequestClose: PropTypes.func,\n- triangleOffset: PropTypes.number,\n- delayLongPress: PropTypes.number,\n- onOpenTooltipMenu: PropTypes.func,\n- onCloseTooltipMenu: PropTypes.func,\n- componentContainerStyle: ViewPropTypes.style,\n- timingConfig: PropTypes.object,\n- springConfig: PropTypes.object,\n- opacityChangeDuration: PropTypes.number,\n- innerRef: PropTypes.func,\n- onPressOverride: PropTypes.func,\n- onLongPress: PropTypes.func,\n- dimensions: dimensionsPropType.isRequired,\n- };\n- static defaultProps = {\n- buttonComponentExpandRatio: 1.0,\n- labelSeparatorColor: \"#E1E1E1\",\n- onRequestClose: () => {},\n- setBelow: false,\n- delayLongPress: 100,\n- triangleOffset: 0,\n- };\n- wrapperComponent: ?TouchableOpacity;\n- callOnDismiss: ?(() => void) = null;\n-\n- constructor(props: Props) {\n- super(props);\n- this.state = {\n- isModalOpen: false,\n- x: 0,\n- y: 0,\n- width: 0,\n- height: 0,\n- opacity: new Animated.Value(0),\n- tooltipContainerScale: new Animated.Value(0),\n- buttonComponentContainerScale: 1,\n- tooltipTriangleDown: !props.setBelow,\n- tooltipTriangleLeftMargin: 0,\n- triangleOffset: props.triangleOffset,\n- willPopUp: false,\n- oppositeOpacity: undefined,\n- tooltipContainerX: undefined,\n- tooltipContainerY: undefined,\n- buttonComponentOpacity: 0,\n- };\n- }\n-\n- componentDidMount() {\n- const newOppositeOpacity = this.state.opacity.interpolate({\n- inputRange: [0, 1],\n- outputRange: [1, 0],\n- });\n- this.setState({ oppositeOpacity: newOppositeOpacity });\n- if (this.props.innerRef) {\n- this.props.innerRef(this);\n- }\n- }\n-\n- componentWillUnmount() {\n- if (this.props.innerRef) {\n- this.props.innerRef(null);\n- }\n- }\n-\n- toggleModal = () => {\n- this.setState({ isModalOpen: !this.state.isModalOpen });\n- }\n-\n- openModal = () => {\n- this.setState({ willPopUp: true });\n- this.toggleModal();\n- this.props.onOpenTooltipMenu && this.props.onOpenTooltipMenu();\n- }\n-\n- hideModal = () => {\n- this.setState({ willPopUp: false });\n- this.showZoomingOutAnimation();\n- this.props.onCloseTooltipMenu && this.props.onCloseTooltipMenu();\n- }\n-\n- onPressItem = (userCallback: () => void) => {\n- if (this.state.isModalOpen && Platform.OS === \"ios\") {\n- this.callOnDismiss = userCallback;\n- } else {\n- userCallback();\n- }\n- this.toggle();\n- }\n-\n- onInnerContainerLayout = (\n- event: { nativeEvent: { layout: { height: number, width: number } } },\n- ) => {\n- const tooltipContainerWidth = event.nativeEvent.layout.width;\n- const tooltipContainerHeight = event.nativeEvent.layout.height;\n- if (\n- !this.state.willPopUp ||\n- tooltipContainerWidth === 0 ||\n- tooltipContainerHeight === 0\n- ) {\n- return;\n- }\n-\n- const componentWrapper = this.wrapperComponent;\n- invariant(componentWrapper, \"should be set\");\n- const { width: windowWidth, height: windowHeight } = this.props.dimensions;\n- componentWrapper.measure((x, y, width, height, pageX, pageY) => {\n- const fullWidth = pageX + tooltipContainerWidth\n- + (width - tooltipContainerWidth) / 2;\n- const tooltipContainerX_final = fullWidth > windowWidth\n- ? windowWidth - tooltipContainerWidth\n- : pageX + (width - tooltipContainerWidth) / 2;\n- let tooltipContainerY_final = this.state.tooltipTriangleDown\n- ? pageY - tooltipContainerHeight - 20\n- : pageY + tooltipContainerHeight - 20;\n- let tooltipTriangleDown = this.state.tooltipTriangleDown;\n- if (pageY - tooltipContainerHeight - 20 < 0) {\n- tooltipContainerY_final = pageY + height + 20;\n- tooltipTriangleDown = false;\n- }\n- if (pageY + tooltipContainerHeight + 80 > windowHeight) {\n- tooltipContainerY_final = pageY - tooltipContainerHeight - 20;\n- tooltipTriangleDown = true;\n- }\n- const tooltipContainerX = this.state.tooltipContainerScale.interpolate({\n- inputRange: [0, 1],\n- outputRange: [tooltipContainerX_final, tooltipContainerX_final],\n- });\n- const tooltipContainerY = this.state.tooltipContainerScale.interpolate({\n- inputRange: [0, 1],\n- outputRange: [\n- tooltipContainerY_final + tooltipContainerHeight / 2 + 20,\n- tooltipContainerY_final,\n- ],\n- });\n- const buttonComponentContainerScale =\n- this.state.tooltipContainerScale.interpolate({\n- inputRange: [0, 1],\n- outputRange: [1, this.props.buttonComponentExpandRatio],\n- });\n- const tooltipTriangleLeftMargin =\n- pageX + width / 2 - tooltipContainerX_final - 10;\n- this.setState(\n- {\n- x: pageX,\n- y: pageY,\n- width,\n- height,\n- tooltipContainerX,\n- tooltipContainerY,\n- tooltipTriangleDown,\n- tooltipTriangleLeftMargin,\n- buttonComponentContainerScale,\n- buttonComponentOpacity: 1,\n- },\n- this.showZoomingInAnimation,\n- );\n- });\n- this.setState({ willPopUp: false });\n- }\n-\n- render() {\n- const tooltipContainerStyle = {\n- left: this.state.tooltipContainerX,\n- top: this.state.tooltipContainerY,\n- transform: [\n- { scale: this.state.tooltipContainerScale },\n- ],\n- };\n-\n- const items = this.props.items.map((item, index) => {\n- const classes = [ this.props.labelContainerStyle ];\n-\n- if (index !== this.props.items.length - 1) {\n- classes.push([\n- styles.tooltipMargin,\n- { borderBottomColor: this.props.labelSeparatorColor },\n- ]);\n- }\n-\n- return (\n- <TooltipItem\n- key={index}\n- label={item.label}\n- onPressUserCallback={item.onPress}\n- onPress={this.onPressItem}\n- containerStyle={classes}\n- labelStyle={this.props.labelStyle}\n- />\n- );\n- });\n-\n- const labelContainerStyle = this.props.labelContainerStyle;\n- const borderStyle =\n- labelContainerStyle && labelContainerStyle.backgroundColor\n- ? { borderTopColor: labelContainerStyle.backgroundColor }\n- : null;\n- let triangleDown = null;\n- let triangleUp = null;\n- if (this.state.tooltipTriangleDown) {\n- triangleDown = (\n- <View style={[\n- styles.triangleDown,\n- {\n- marginLeft: this.state.tooltipTriangleLeftMargin,\n- left: this.state.triangleOffset,\n- },\n- borderStyle,\n- ]} />\n- );\n- } else {\n- triangleUp = (\n- <View style={[\n- styles.triangleUp,\n- {\n- marginLeft: this.state.tooltipTriangleLeftMargin,\n- left: this.state.triangleOffset,\n- },\n- borderStyle,\n- ]} />\n- );\n- }\n-\n- return (\n- <TouchableOpacity\n- ref={this.wrapperRef}\n- style={this.props.componentWrapperStyle}\n- onPress={this.onPress}\n- onLongPress={this.onLongPress}\n- delayLongPress={this.props.delayLongPress}\n- activeOpacity={1.0}\n- >\n- <Animated.View style={[\n- { opacity: this.state.oppositeOpacity },\n- this.props.componentContainerStyle,\n- ]}>\n- {this.props.buttonComponent}\n- </Animated.View>\n- <Modal\n- visible={this.state.isModalOpen}\n- onRequestClose={this.props.onRequestClose}\n- onDismiss={this.onDismiss}\n- transparent\n- >\n- <Animated.View style={[\n- styles.overlay,\n- this.props.overlayStyle,\n- { opacity: this.state.opacity },\n- ]}>\n- <TouchableOpacity\n- activeOpacity={1}\n- focusedOpacity={1}\n- style={styles.button}\n- onPress={this.toggle}\n- >\n- <Animated.View\n- style={[\n- styles.tooltipContainer,\n- this.props.tooltipContainerStyle,\n- tooltipContainerStyle,\n- ]}\n- >\n- <View\n- onLayout={this.onInnerContainerLayout}\n- style={styles.innerContainer}\n- >\n- {triangleUp}\n- <View style={[\n- styles.allItemContainer,\n- this.props.tooltipContainerStyle,\n- ]}>\n- {items}\n- </View>\n- {triangleDown}\n- </View>\n- </Animated.View>\n- </TouchableOpacity>\n- </Animated.View>\n- <Animated.View style={{\n- position: 'absolute',\n- left: this.state.x,\n- top: this.state.y,\n- width: this.state.width,\n- height: this.state.height,\n- backgroundColor: 'transparent',\n- // At the first frame, the button will be rendered in the top-left\n- // corner. So we don't render until the position has been calculated\n- opacity: this.state.buttonComponentOpacity,\n- transform: [\n- { scale: this.state.buttonComponentContainerScale },\n- ],\n- }}>\n- <TouchableOpacity\n- onPress={this.onPress}\n- activeOpacity={1.0}\n- style={this.props.componentContainerStyle}\n- >\n- {this.props.buttonComponent}\n- </TouchableOpacity>\n- </Animated.View>\n- </Modal>\n- </TouchableOpacity>\n- );\n- }\n-\n- wrapperRef = (wrapperComponent: ?TouchableOpacity) => {\n- this.wrapperComponent = wrapperComponent;\n- }\n-\n- showZoomingInAnimation = () => {\n- let tooltipAnimation = Animated.timing(\n- this.state.tooltipContainerScale,\n- {\n- toValue: 1,\n- duration: this.props.timingConfig && this.props.timingConfig.duration\n- ? this.props.timingConfig.duration\n- : 200,\n- }\n- );\n- if (this.props.animationType == 'spring') {\n- tooltipAnimation = Animated.spring(\n- this.state.tooltipContainerScale,\n- {\n- toValue: 1,\n- tension: this.props.springConfig && this.props.springConfig.tension\n- ? this.props.springConfig.tension\n- : 100,\n- friction: this.props.springConfig && this.props.springConfig.friction\n- ? this.props.springConfig.friction\n- : 7,\n- },\n- );\n- }\n- Animated.parallel([\n- tooltipAnimation,\n- Animated.timing(\n- this.state.opacity,\n- {\n- toValue: 1,\n- duration: this.props.opacityChangeDuration\n- ? this.props.opacityChangeDuration\n- : 200,\n- },\n- ),\n- ]).start();\n- }\n-\n- showZoomingOutAnimation() {\n- Animated.parallel([\n- Animated.timing(\n- this.state.tooltipContainerScale,\n- {\n- toValue: 0,\n- duration: this.props.opacityChangeDuration\n- ? this.props.opacityChangeDuration\n- : 200,\n- },\n- ),\n- Animated.timing(\n- this.state.opacity,\n- {\n- toValue: 0,\n- duration: this.props.opacityChangeDuration\n- ? this.props.opacityChangeDuration\n- : 200,\n- },\n- ),\n- ]).start(this.toggleModal);\n- }\n-\n- onPress = () => {\n- if (this.props.onPressOverride) {\n- this.props.onPressOverride();\n- } else {\n- this.toggle();\n- }\n- }\n-\n- onLongPress = () => {\n- if (this.props.onLongPress) {\n- this.props.onLongPress();\n- } else if (this.props.onPressOverride) {\n- this.props.onPressOverride();\n- } else {\n- this.toggle();\n- }\n- }\n-\n- toggle = () => {\n- if (this.state.isModalOpen) {\n- this.hideModal();\n- } else {\n- this.openModal();\n- }\n- }\n-\n- onDismiss = () => {\n- if (this.callOnDismiss) {\n- this.callOnDismiss();\n- this.callOnDismiss = null;\n- }\n- }\n-\n-}\n-\n-const styles = StyleSheet.create({\n- overlay: {\n- backgroundColor: 'rgba(0,0,0,0.5)',\n- flex: 1,\n- },\n- innerContainer: {\n- backgroundColor: 'transparent',\n- alignItems: 'flex-start'\n- },\n- tooltipMargin: {\n- borderBottomWidth: 1,\n- },\n- tooltipContainer: {\n- backgroundColor: 'transparent',\n- position: 'absolute',\n- },\n- triangleDown: {\n- width: 10,\n- height: 10,\n- backgroundColor: 'transparent',\n- borderStyle: 'solid',\n- borderTopWidth: 10,\n- borderRightWidth: 10,\n- borderBottomWidth: 0,\n- borderLeftWidth: 10,\n- borderTopColor: 'white',\n- borderRightColor: 'transparent',\n- borderBottomColor: 'transparent',\n- borderLeftColor: 'transparent',\n- },\n- triangleUp: {\n- width: 10,\n- height: 10,\n- backgroundColor: 'transparent',\n- borderStyle: 'solid',\n- borderTopWidth: 0,\n- borderRightWidth: 10,\n- borderBottomWidth: 10,\n- borderLeftWidth: 10,\n- borderBottomColor: 'white',\n- borderTopColor: 'transparent',\n- borderRightColor: 'transparent',\n- borderLeftColor: 'transparent',\n- },\n- button: {\n- flex: 1,\n- },\n- allItemContainer: {\n- borderRadius: 5,\n- backgroundColor: 'white',\n- alignSelf: 'stretch',\n- overflow: 'hidden',\n- },\n-});\n-\n-export default connect(\n- (state: AppState) => ({\n- dimensions: dimensionsSelector(state),\n- }),\n-)(Tooltip);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Delete legacy Tooltip
129,187
30.07.2019 11:14:01
14,400
d23237c366efbb628401b9624f7b630a8346685e
[native] components/tooltip2 -> navigation/tooltip
[ { "change_type": "MODIFY", "old_path": "native/chat/multimedia-tooltip-modal.react.js", "new_path": "native/chat/multimedia-tooltip-modal.react.js", "diff": "@@ -5,7 +5,7 @@ import type {\nChatMultimediaMessageInfoItem,\n} from './multimedia-message.react';\n-import { createTooltip, tooltipHeight } from '../components/tooltip2.react';\n+import { createTooltip, tooltipHeight } from '../navigation/tooltip.react';\nimport MultimediaTooltipButton from './multimedia-tooltip-button.react';\nimport { saveImage } from '../media/save-image';\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings-member-tooltip-modal.react.js", "new_path": "native/chat/settings/thread-settings-member-tooltip-modal.react.js", "diff": "import type { ThreadInfo, RelativeMemberInfo } from 'lib/types/thread-types';\n-import { createTooltip } from '../../components/tooltip2.react';\n+import { createTooltip } from '../../navigation/tooltip.react';\nimport ThreadSettingsMemberTooltipButton\nfrom './thread-settings-member-tooltip-button.react';\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message-tooltip-modal.react.js", "new_path": "native/chat/text-message-tooltip-modal.react.js", "diff": "@@ -4,7 +4,7 @@ import type { ChatTextMessageInfoItemWithHeight } from './text-message.react';\nimport { Clipboard } from 'react-native';\n-import { createTooltip, tooltipHeight } from '../components/tooltip2.react';\n+import { createTooltip, tooltipHeight } from '../navigation/tooltip.react';\nimport TextMessageTooltipButton from './text-message-tooltip-button.react';\nimport { displayActionResultModal } from '../navigation/action-result-modal';\n" }, { "change_type": "RENAME", "old_path": "native/components/tooltip2-item.react.js", "new_path": "native/navigation/tooltip-item.react.js", "diff": "" }, { "change_type": "RENAME", "old_path": "native/components/tooltip2.react.js", "new_path": "native/navigation/tooltip.react.js", "diff": "@@ -15,7 +15,7 @@ import {\nimport type { AppState } from '../redux/redux-setup';\nimport { type Dimensions, dimensionsPropType } from 'lib/types/media-types';\nimport type { ViewStyle } from '../types/styles';\n-import type { TooltipEntry } from './tooltip2-item.react';\n+import type { TooltipEntry } from './tooltip-item.react';\nimport * as React from 'react';\nimport Animated from 'react-native-reanimated';\n@@ -33,7 +33,7 @@ import {\ncontentBottomOffset,\ndimensionsSelector,\n} from '../selectors/dimension-selectors';\n-import TooltipItem from './tooltip2-item.react';\n+import TooltipItem from './tooltip-item.react';\nconst {\nValue,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] components/tooltip2 -> navigation/tooltip
129,187
30.07.2019 13:05:41
14,400
f2cbce40991464a35dede9ab797399b1434857c8
[native] Fix updating of nav params ThreadInfo from Redux
[ { "change_type": "MODIFY", "old_path": "native/chat/message-list.react.js", "new_path": "native/chat/message-list.react.js", "diff": "@@ -178,17 +178,14 @@ class MessageList extends React.PureComponent<Props, State> {\ncomponentDidUpdate(prevProps: Props, prevState: State) {\nconst oldThreadInfo = prevProps.threadInfo;\nconst newThreadInfo = this.props.threadInfo;\n- if (\n- threadInChatList(oldThreadInfo) &&\n- !threadInChatList(newThreadInfo)\n- ) {\n- threadWatcher.watchID(oldThreadInfo.id);\n- } else if (\n- !threadInChatList(oldThreadInfo) &&\n- threadInChatList(newThreadInfo)\n- ) {\n+ if (oldThreadInfo.id !== newThreadInfo.id) {\n+ if (!threadInChatList(oldThreadInfo)) {\nthreadWatcher.removeID(oldThreadInfo.id);\n}\n+ if (!threadInChatList(newThreadInfo)) {\n+ threadWatcher.watchID(newThreadInfo.id);\n+ }\n+ }\nconst newListData = this.props.messageListData;\nconst oldListData = prevProps.messageListData;\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/delete-thread.react.js", "new_path": "native/chat/settings/delete-thread.react.js", "diff": "@@ -104,15 +104,11 @@ class InnerDeleteThread extends React.PureComponent<Props, State> {\nthis.mounted = false;\n}\n- componentWillReceiveProps(nextProps: Props) {\n- const newThreadInfo = nextProps.threadInfo;\n- if (!newThreadInfo) {\n- return;\n- }\n-\n- const oldThreadInfo = InnerDeleteThread.getThreadInfo(this.props);\n- if (!_isEqual(newThreadInfo)(oldThreadInfo)) {\n- this.props.navigation.setParams({ threadInfo: newThreadInfo });\n+ componentDidUpdate(prevProps: Props) {\n+ const oldReduxThreadInfo = prevProps.threadInfo;\n+ const newReduxThreadInfo = this.props.threadInfo;\n+ if (newReduxThreadInfo && newReduxThreadInfo !== oldReduxThreadInfo) {\n+ this.props.navigation.setParams({ threadInfo: newReduxThreadInfo });\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings.react.js", "new_path": "native/chat/settings/thread-settings.react.js", "diff": "@@ -278,31 +278,27 @@ class ThreadSettings extends React.PureComponent<Props, State> {\n}\ncomponentDidUpdate(prevProps: Props, prevState: State) {\n- const oldThreadInfo = ThreadSettings.getThreadInfo(prevProps);\n- const newThreadInfo = this.props.threadInfo;\n-\n- if (\n- threadInChatList(oldThreadInfo) &&\n- !threadInChatList(newThreadInfo)\n- ) {\n- threadWatcher.watchID(oldThreadInfo.id);\n- } else if (\n- !threadInChatList(oldThreadInfo) &&\n- threadInChatList(newThreadInfo)\n- ) {\n- threadWatcher.removeID(oldThreadInfo.id);\n+ const oldReduxThreadInfo = prevProps.threadInfo;\n+ const newReduxThreadInfo = this.props.threadInfo;\n+ if (newReduxThreadInfo && newReduxThreadInfo !== oldReduxThreadInfo) {\n+ this.props.navigation.setParams({ threadInfo: newReduxThreadInfo });\n}\n- if (newThreadInfo) {\n- if (!_isEqual(newThreadInfo)(oldThreadInfo)) {\n- this.props.navigation.setParams({ threadInfo: newThreadInfo });\n+ const oldNavThreadInfo = ThreadSettings.getThreadInfo(prevProps);\n+ const newNavThreadInfo = ThreadSettings.getThreadInfo(this.props);\n+ if (oldNavThreadInfo.id !== newNavThreadInfo.id) {\n+ if (!threadInChatList(oldNavThreadInfo)) {\n+ threadWatcher.removeID(oldNavThreadInfo.id);\n+ }\n+ if (!threadInChatList(newNavThreadInfo)) {\n+ threadWatcher.watchID(newNavThreadInfo.id);\n+ }\n}\nif (\n- newThreadInfo.color !== oldThreadInfo.color &&\n- this.state.colorEditValue === oldThreadInfo.color\n+ newNavThreadInfo.color !== oldNavThreadInfo.color &&\n+ this.state.colorEditValue === oldNavThreadInfo.color\n) {\n- this.setState({ colorEditValue: newThreadInfo.color });\n- }\n+ this.setState({ colorEditValue: newNavThreadInfo.color });\n}\nconst scrollIsDisabled = ThreadSettings.scrollDisabled(this.props);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Fix updating of nav params ThreadInfo from Redux
129,187
30.07.2019 13:09:00
14,400
78f538de5d2033e1b593b50fc6d5ec468ad1e715
[native] Tooltip visibleEntryIDs
[ { "change_type": "MODIFY", "old_path": "native/chat/multimedia-tooltip-modal.react.js", "new_path": "native/chat/multimedia-tooltip-modal.react.js", "diff": "@@ -21,7 +21,7 @@ function onPressSave(props: CustomProps) {\nconst spec = {\nentries: [\n- { text: \"Save\", onPress: onPressSave },\n+ { id: \"save\", text: \"Save\", onPress: onPressSave },\n],\n};\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings-member-tooltip-modal.react.js", "new_path": "native/chat/settings/thread-settings-member-tooltip-modal.react.js", "diff": "@@ -19,9 +19,9 @@ function onToggleAdmin(props: CustomProps) {\nconst spec = {\nentries: [\n- { text: \"Remove user\", onPress: onRemoveUser },\n- { text: \"Remove admin\", onPress: onToggleAdmin },\n- { text: \"Make admin\", onPress: onToggleAdmin },\n+ { id: \"remove_user\", text: \"Remove user\", onPress: onRemoveUser },\n+ { id: \"remove_admin\", text: \"Remove admin\", onPress: onToggleAdmin },\n+ { id: \"make_admin\", text: \"Make admin\", onPress: onToggleAdmin },\n],\n};\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings-member.react.js", "new_path": "native/chat/settings/thread-settings-member.react.js", "diff": "@@ -111,7 +111,7 @@ class ThreadSettingsMember extends React.PureComponent<Props> {\nreturn role && !role.isDefault && role.name === \"Admins\";\n}\n- enabledEntries() {\n+ visibleEntryIDs() {\nconst role = this.props.memberInfo.role;\nif (!this.props.canEdit || !role) {\nreturn [];\n@@ -138,14 +138,14 @@ class ThreadSettingsMember extends React.PureComponent<Props> {\n)\n)\n) {\n- result.push(\"Remove user\");\n+ result.push(\"remove_user\");\n}\nif (canChangeRoles && this.props.memberInfo.username) {\nresult.push(\nThreadSettingsMember.memberIsAdmin(this.props)\n- ? \"Remove admin\"\n- : \"Make admin\"\n+ ? \"remove_admin\"\n+ : \"make_admin\"\n);\n}\n@@ -173,7 +173,7 @@ class ThreadSettingsMember extends React.PureComponent<Props> {\nthis.props.changeRoleLoadingStatus === \"loading\"\n) {\neditButton = <ActivityIndicator size=\"small\" />;\n- } else if (this.enabledEntries().length !== 0) {\n+ } else if (this.visibleEntryIDs().length !== 0) {\neditButton = (\n<TouchableOpacity onPress={this.onPressEdit} style={styles.editButton}>\n<View onLayout={this.onEditButtonLayout} ref={this.editButtonRef}>\n@@ -251,6 +251,7 @@ class ThreadSettingsMember extends React.PureComponent<Props> {\nparams: {\ninitialCoordinates: coordinates,\nverticalBounds,\n+ visibleEntryIDs: this.visibleEntryIDs(),\n},\n});\n});\n" }, { "change_type": "MODIFY", "old_path": "native/chat/text-message-tooltip-modal.react.js", "new_path": "native/chat/text-message-tooltip-modal.react.js", "diff": "@@ -21,7 +21,7 @@ function onPressCopy(props: CustomProps) {\nconst spec = {\nentries: [\n- { text: \"Copy\", onPress: onPressCopy },\n+ { id: \"copy\", text: \"Copy\", onPress: onPressCopy },\n],\n};\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/tooltip-item.react.js", "new_path": "native/navigation/tooltip-item.react.js", "diff": "@@ -13,6 +13,7 @@ import {\nimport PropTypes from 'prop-types';\nexport type TooltipEntry<CustomProps> = {|\n+ id: string,\ntext: string,\nonPress: (props: CustomProps) => mixed,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/tooltip.react.js", "new_path": "native/navigation/tooltip.react.js", "diff": "@@ -56,6 +56,7 @@ type NavProp<CustomProps> = NavigationScreenProp<{|\nverticalBounds: VerticalBounds,\nlocation?: 'above' | 'below',\nmargin?: number,\n+ visibleEntryIDs?: $ReadOnlyArray<string>,\n},\n|}>;\n@@ -89,6 +90,9 @@ function createTooltip<\nparams: PropTypes.shape({\ninitialCoordinates: layoutCoordinatesPropType.isRequired,\nverticalBounds: verticalBoundsPropType.isRequired,\n+ location: PropTypes.oneOf([ \"above\", \"below\" ]),\n+ margin: PropTypes.number,\n+ visibleEntryIDs: PropTypes.arrayOf(PropTypes.string),\n}).isRequired,\n}).isRequired,\ngoBack: PropTypes.func.isRequired,\n@@ -129,7 +133,7 @@ function createTooltip<\nconst { initialCoordinates } = props.navigation.state.params;\nconst { y, height } = initialCoordinates;\n- const entryCount = tooltipSpec.entries.length;\n+ const entryCount = this.entries.length;\nconst { margin } = this;\nthis.tooltipVerticalAbove = interpolate(\nthis.progress,\n@@ -154,6 +158,16 @@ function createTooltip<\n);\n}\n+ get entries() {\n+ const { entries } = tooltipSpec;\n+ const { visibleEntryIDs } = this.props.navigation.state.params;\n+ if (!visibleEntryIDs) {\n+ return entries;\n+ }\n+ const visibleSet = new Set(visibleEntryIDs);\n+ return entries.filter(entry => visibleSet.has(entry.id));\n+ }\n+\nget opacityStyle() {\nreturn {\n...styles.backdrop,\n@@ -241,8 +255,9 @@ function createTooltip<\nrender() {\nconst { navigation, screenDimensions } = this.props;\n- const entries = tooltipSpec.entries.map((entry, index) => {\n- const style = index !== tooltipSpec.entries.length - 1\n+ const { entries } = this;\n+ const items = entries.map((entry, index) => {\n+ const style = index !== entries.length - 1\n? styles.itemMargin\n: null;\nreturn (\n@@ -303,8 +318,8 @@ function createTooltip<\nonLayout={this.onTooltipContainerLayout}\n>\n{triangleUp}\n- <View style={styles.entries}>\n- {entries}\n+ <View style={styles.items}>\n+ {items}\n</View>\n{triangleDown}\n</Animated.View>\n@@ -371,7 +386,7 @@ const styles = StyleSheet.create({\nflex: 1,\noverflow: \"hidden\",\n},\n- entries: {\n+ items: {\nborderRadius: 5,\nbackgroundColor: 'white',\noverflow: 'hidden',\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Tooltip visibleEntryIDs
129,187
30.07.2019 13:23:15
14,400
126ef2f4728faa2d955e2bc29926d0d702cde89d
[native] Default location calculation for Tooltip `above` vs. `below`
[ { "change_type": "MODIFY", "old_path": "native/navigation/tooltip.react.js", "new_path": "native/navigation/tooltip.react.js", "diff": "@@ -133,13 +133,12 @@ function createTooltip<\nconst { initialCoordinates } = props.navigation.state.params;\nconst { y, height } = initialCoordinates;\n- const entryCount = this.entries.length;\nconst { margin } = this;\nthis.tooltipVerticalAbove = interpolate(\nthis.progress,\n{\ninputRange: [ 0, 1 ],\n- outputRange: [ margin + tooltipHeight(entryCount) / 2, 0 ],\n+ outputRange: [ margin + this.tooltipHeight / 2, 0 ],\nextrapolate: Extrapolate.CLAMP,\n},\n);\n@@ -147,7 +146,7 @@ function createTooltip<\nthis.progress,\n{\ninputRange: [ 0, 1 ],\n- outputRange: [ -margin - tooltipHeight(entryCount) / 2, 0 ],\n+ outputRange: [ -margin - this.tooltipHeight / 2, 0 ],\nextrapolate: Extrapolate.CLAMP,\n},\n);\n@@ -168,6 +167,36 @@ function createTooltip<\nreturn entries.filter(entry => visibleSet.has(entry.id));\n}\n+ get tooltipHeight(): number {\n+ return tooltipHeight(this.entries.length);\n+ }\n+\n+ get location(): ('above' | 'below') {\n+ const { params } = this.props.navigation.state;\n+ const { location } = params;\n+ if (location) {\n+ return location;\n+ }\n+\n+ const { initialCoordinates, verticalBounds } = params;\n+ const { y, height } = initialCoordinates;\n+ const contentTop = y;\n+ const contentBottom = y + height;\n+ const boundsTop = verticalBounds.y;\n+ const boundsBottom = verticalBounds.y + verticalBounds.height;\n+\n+ const { margin, tooltipHeight } = this;\n+ const fullHeight = tooltipHeight + margin;\n+ if (\n+ contentBottom + fullHeight > boundsBottom &&\n+ contentTop - fullHeight > boundsTop\n+ ) {\n+ return 'above';\n+ }\n+\n+ return 'below';\n+ }\n+\nget opacityStyle() {\nreturn {\n...styles.backdrop,\n@@ -209,13 +238,9 @@ function createTooltip<\nget tooltipContainerStyle() {\nconst { screenDimensions, navigation } = this.props;\n- const {\n- initialCoordinates,\n- verticalBounds,\n- location,\n- } = navigation.state.params;\n+ const { initialCoordinates, verticalBounds } = navigation.state.params;\nconst { x, y, width, height } = initialCoordinates;\n- const { margin } = this;\n+ const { margin, location } = this;\nconst style: ViewStyle = {\nposition: 'absolute',\n@@ -290,7 +315,7 @@ function createTooltip<\nlet triangleDown = null;\nlet triangleUp = null;\n- const { location } = navigation.state.params;\n+ const { location } = this;\nif (location === 'above') {\ntriangleDown = (\n<View style={[ styles.triangleDown, triangleStyle ]} />\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Default location calculation for Tooltip `above` vs. `below`
129,187
30.07.2019 15:32:19
14,400
830c56e0992ad1abc244f47bcad1d73a79d5b90c
Mechanism to allow Tooltip onPress to dispatch server calls
[ { "change_type": "MODIFY", "old_path": "lib/utils/action-utils.js", "new_path": "lib/utils/action-utils.js", "diff": "@@ -108,12 +108,12 @@ export type DispatchActionPromise = <\nstartingPayload?: $PropertyType<A, 'payload'>,\n) => Promise<void>;\n-type BoundActions = {\n+export type DispatchFunctions = {\ndispatch: Dispatch,\ndispatchActionPayload: DispatchActionPayload,\ndispatchActionPromise: DispatchActionPromise,\n};\n-function includeDispatchActionProps(dispatch: Dispatch): BoundActions {\n+function includeDispatchActionProps(dispatch: Dispatch): DispatchFunctions {\nconst dispatchActionPromise =\nfunction<A: BaseAction, B: BaseAction, C: BaseAction>(\nactionTypes: ActionTypes<\n@@ -336,7 +336,10 @@ function bindCookieAndUtilsIntoFetchJSON(params: BindServerCallsParams): FetchJS\n);\n}\n-type ActionFunc = (fetchJSON: FetchJSON, ...rest: $FlowFixMe) => Promise<*>;\n+export type ActionFunc = (\n+ fetchJSON: FetchJSON,\n+ ...rest: $FlowFixMe\n+) => Promise<*>;\ntype BindServerCallsParams = {|\ndispatch: Dispatch,\ncookie: ?string,\n@@ -382,10 +385,14 @@ const baseCreateBoundServerCallsSelector = (actionFunc: ActionFunc) => {\n},\n);\n}\n-const createBoundServerCallsSelector = _memoize(baseCreateBoundServerCallsSelector);\n+const createBoundServerCallsSelector: (\n+ actionFunc: ActionFunc,\n+) => (\n+ state: BindServerCallsParams,\n+) => BoundServerCall = _memoize(baseCreateBoundServerCallsSelector);\n-type ServerCall = (fetchJSON: FetchJSON, ...rest: $FlowFixMe) => Promise<any>;\n-export type ServerCalls = {[name: string]: ServerCall};\n+export type ServerCalls = {[name: string]: ActionFunc};\n+export type BoundServerCall = (...rest: $FlowFixMe) => Promise<any>;\nfunction bindServerCalls(serverCalls: ServerCalls) {\nreturn (\n@@ -437,6 +444,7 @@ export {\nsetNewSessionActionType,\nincludeDispatchActionProps,\nfetchNewCookieFromNativeCredentials,\n+ createBoundServerCallsSelector,\nbindServerCalls,\nregisterActiveSocket,\n};\n" }, { "change_type": "MODIFY", "old_path": "lib/utils/redux-utils.js", "new_path": "lib/utils/redux-utils.js", "diff": "import type { ServerCalls } from './action-utils';\nimport type { AppState } from '../types/redux-types';\n-import type { ConnectionStatus } from '../types/socket-types';\n+import {\n+ type ConnectionStatus,\n+ connectionStatusPropType,\n+} from '../types/socket-types';\nimport { connect as reactReduxConnect } from 'react-redux';\nimport invariant from 'invariant';\n+import { createSelector } from 'reselect';\n+import PropTypes from 'prop-types';\nimport {\nincludeDispatchActionProps,\nbindServerCalls,\n} from './action-utils';\n+export type ServerCallState = {|\n+ cookie: ?string,\n+ urlPrefix: string,\n+ sessionID: ?string,\n+ currentUserInfoLoggedIn: bool,\n+ connectionStatus: ConnectionStatus,\n+|};\n+\n+const serverCallStatePropType = PropTypes.shape({\n+ cookie: PropTypes.string,\n+ urlPrefix: PropTypes.string.isRequired,\n+ sessionID: PropTypes.string,\n+ currentUserInfoLoggedIn: PropTypes.bool.isRequired,\n+ connectionStatus: connectionStatusPropType.isRequired,\n+});\n+\n+const serverCallStateSelector: (\n+ state: AppState,\n+) => ServerCallState = createSelector(\n+ (state: AppState) => state.cookie,\n+ (state: AppState) => state.urlPrefix,\n+ (state: AppState) => state.sessionID,\n+ (state: AppState) =>\n+ !!(state.currentUserInfo && !state.currentUserInfo.anonymous && true),\n+ (state: AppState) => state.connection.status,\n+ (\n+ cookie: ?string,\n+ urlPrefix: string,\n+ sessionID: ?string,\n+ currentUserInfoLoggedIn: bool,\n+ connectionStatus: ConnectionStatus,\n+ ) => ({\n+ cookie,\n+ urlPrefix,\n+ sessionID,\n+ currentUserInfoLoggedIn,\n+ connectionStatus,\n+ }),\n+);\n+\nfunction connect<S: AppState, OP: Object, SP: Object>(\ninputMapStateToProps: ?((state: S, ownProps: OP) => SP),\nserverCalls?: ?ServerCalls,\n@@ -30,12 +75,7 @@ function connect<S: AppState, OP: Object, SP: Object>(\nconnectionStatus: ConnectionStatus,\n} => ({\n...mapStateToProps(state, ownProps),\n- cookie: state.cookie,\n- urlPrefix: state.urlPrefix,\n- sessionID: state.sessionID,\n- currentUserInfoLoggedIn:\n- !!(state.currentUserInfo && !state.currentUserInfo.anonymous && true),\n- connectionStatus: state.connection.status,\n+ ...serverCallStateSelector(state),\n});\n} else if (serverCallExists && mapStateToProps) {\nmapState = (state: S): {\n@@ -48,30 +88,12 @@ function connect<S: AppState, OP: Object, SP: Object>(\n} => ({\n// $FlowFixMe\n...mapStateToProps(state),\n- cookie: state.cookie,\n- urlPrefix: state.urlPrefix,\n- sessionID: state.sessionID,\n- currentUserInfoLoggedIn:\n- !!(state.currentUserInfo && !state.currentUserInfo.anonymous && true),\n- connectionStatus: state.connection.status,\n+ ...serverCallStateSelector(state),\n});\n} else if (mapStateToProps) {\nmapState = mapStateToProps;\n} else if (serverCallExists) {\n- mapState = (state: S): {\n- cookie: ?string,\n- urlPrefix: string,\n- sessionID: ?string,\n- currentUserInfoLoggedIn: bool,\n- connectionStatus: ConnectionStatus,\n- } => ({\n- cookie: state.cookie,\n- urlPrefix: state.urlPrefix,\n- sessionID: state.sessionID,\n- currentUserInfoLoggedIn:\n- !!(state.currentUserInfo && !state.currentUserInfo.anonymous && true),\n- connectionStatus: state.connection.status,\n- });\n+ mapState = serverCallStateSelector;\n}\nconst dispatchIncluded = includeDispatch === true\n|| (includeDispatch === undefined && serverCallExists);\n@@ -101,5 +123,7 @@ function connect<S: AppState, OP: Object, SP: Object>(\n}\nexport {\n+ serverCallStatePropType,\n+ serverCallStateSelector,\nconnect,\n};\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/tooltip-item.react.js", "new_path": "native/navigation/tooltip-item.react.js", "diff": "// @flow\nimport type { ViewStyle, TextStyle } from '../types/styles';\n+import type {\n+ DispatchFunctions,\n+ ActionFunc,\n+ BoundServerCall,\n+} from 'lib/utils/action-utils';\nimport * as React from 'react';\nimport {\n@@ -15,7 +20,11 @@ import PropTypes from 'prop-types';\nexport type TooltipEntry<CustomProps> = {|\nid: string,\ntext: string,\n- onPress: (props: CustomProps) => mixed,\n+ onPress: (\n+ props: CustomProps,\n+ dispatchFunctions: DispatchFunctions,\n+ bindServerCall: (serverCall: ActionFunc) => BoundServerCall,\n+ ) => mixed,\n|};\ntype Props<CustomProps: {}> = {\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/tooltip.react.js", "new_path": "native/navigation/tooltip.react.js", "diff": "@@ -16,6 +16,12 @@ import type { AppState } from '../redux/redux-setup';\nimport { type Dimensions, dimensionsPropType } from 'lib/types/media-types';\nimport type { ViewStyle } from '../types/styles';\nimport type { TooltipEntry } from './tooltip-item.react';\n+import type { Dispatch } from 'lib/types/redux-types';\n+import type {\n+ DispatchActionPayload,\n+ DispatchActionPromise,\n+ ActionFunc,\n+} from 'lib/utils/action-utils';\nimport * as React from 'react';\nimport Animated from 'react-native-reanimated';\n@@ -27,7 +33,13 @@ import {\n} from 'react-native';\nimport PropTypes from 'prop-types';\n-import { connect } from 'lib/utils/redux-utils';\n+import {\n+ type ServerCallState,\n+ serverCallStatePropType,\n+ serverCallStateSelector,\n+ connect,\n+} from 'lib/utils/redux-utils';\n+import { createBoundServerCallsSelector } from 'lib/utils/action-utils';\nimport {\ncontentBottomOffset,\n@@ -70,18 +82,23 @@ type TooltipProps<Navigation> = {\nscene: NavigationScene,\ntransitionProps: NavigationTransitionProps,\nposition: Value,\n+ // Redux state\nscreenDimensions: Dimensions,\n+ serverCallState: ServerCallState,\n+ // Redux dispatch functions\n+ dispatch: Dispatch,\n+ dispatchActionPayload: DispatchActionPayload,\n+ dispatchActionPromise: DispatchActionPromise,\n};\nfunction createTooltip<\nCustomProps: {},\nNavigation: NavProp<CustomProps>,\nTooltipPropsType: TooltipProps<Navigation>,\nButtonComponentType: React.ComponentType<ButtonProps<Navigation>>,\n- TooltipComponent: React.ComponentType<TooltipPropsType>,\n>(\nButtonComponent: ButtonComponentType,\ntooltipSpec: TooltipSpec<CustomProps>,\n-): TooltipComponent {\n+) {\nclass Tooltip extends React.PureComponent<TooltipPropsType> {\nstatic propTypes = {\n@@ -101,6 +118,10 @@ function createTooltip<\nscene: PropTypes.object.isRequired,\nposition: PropTypes.instanceOf(Value).isRequired,\nscreenDimensions: dimensionsPropType.isRequired,\n+ serverCallState: serverCallStatePropType.isRequired,\n+ dispatch: PropTypes.func.isRequired,\n+ dispatchActionPayload: PropTypes.func.isRequired,\n+ dispatchActionPromise: PropTypes.func.isRequired,\n};\nprogress: Value;\nbackdropOpacity: Value;\n@@ -362,10 +383,39 @@ function createTooltip<\ninitialCoordinates,\nverticalBounds,\nlocation,\n+ margin,\n+ visibleEntryIDs,\n...customProps\n} = this.props.navigation.state.params;\nthis.props.navigation.goBack();\n- entry.onPress(customProps);\n+ const dispatchFunctions = {\n+ dispatch: this.props.dispatch,\n+ dispatchActionPayload: this.props.dispatchActionPayload,\n+ dispatchActionPromise: this.props.dispatchActionPromise,\n+ };\n+ entry.onPress(\n+ customProps,\n+ dispatchFunctions,\n+ this.bindServerCall,\n+ );\n+ }\n+\n+ bindServerCall = (serverCall: ActionFunc) => {\n+ const {\n+ cookie,\n+ urlPrefix,\n+ sessionID,\n+ currentUserInfoLoggedIn: loggedIn,\n+ connectionStatus,\n+ } = this.props.serverCallState;\n+ return createBoundServerCallsSelector(serverCall)({\n+ dispatch: this.props.dispatch,\n+ cookie,\n+ urlPrefix,\n+ sessionID,\n+ loggedIn,\n+ connectionStatus,\n+ });\n}\nonTooltipContainerLayout = (\n@@ -391,7 +441,10 @@ function createTooltip<\nreturn connect(\n(state: AppState) => ({\nscreenDimensions: dimensionsSelector(state),\n+ serverCallState: serverCallStateSelector(state),\n}),\n+ null,\n+ true,\n)(Tooltip);\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Mechanism to allow Tooltip onPress to dispatch server calls
129,187
30.07.2019 15:50:24
14,400
e723580c0090f3099783cceed9dbd4d217bdf216
Move ThreadSettingsMember action logic to ThreadSettingsMemberTooltipModal
[ { "change_type": "MODIFY", "old_path": "lib/shared/thread-utils.js", "new_path": "lib/shared/thread-utils.js", "diff": "@@ -6,6 +6,7 @@ import {\ntype ThreadPermission,\ntype MemberInfo,\ntype ServerThreadInfo,\n+ type RelativeMemberInfo,\nthreadTypes,\nthreadPermissions,\n} from '../types/thread-types';\n@@ -246,6 +247,14 @@ function usersInThreadInfo(\nreturn [...userIDs];\n}\n+function memberIsAdmin(\n+ memberInfo: RelativeMemberInfo,\n+ threadInfo: ThreadInfo,\n+) {\n+ const role = memberInfo.role && threadInfo.roles[memberInfo.role];\n+ return role && !role.isDefault && role.name === \"Admins\";\n+}\n+\nexport {\ncolorIsDark,\ngenerateRandomColor,\n@@ -263,4 +272,5 @@ export {\nrawThreadInfoFromThreadInfo,\nthreadTypeDescriptions,\nusersInThreadInfo,\n+ memberIsAdmin,\n}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings-member-tooltip-modal.react.js", "new_path": "native/chat/settings/thread-settings-member-tooltip-modal.react.js", "diff": "// @flow\nimport type { ThreadInfo, RelativeMemberInfo } from 'lib/types/thread-types';\n+import type {\n+ DispatchFunctions,\n+ ActionFunc,\n+ BoundServerCall,\n+} from 'lib/utils/action-utils';\n+\n+import { Alert } from 'react-native';\n+import invariant from 'invariant';\n+\n+import { stringForUser } from 'lib/shared/user-utils';\n+import {\n+ removeUsersFromThreadActionTypes,\n+ removeUsersFromThread,\n+ changeThreadMemberRolesActionTypes,\n+ changeThreadMemberRoles,\n+} from 'lib/actions/thread-actions';\n+import { memberIsAdmin } from 'lib/shared/thread-utils';\nimport { createTooltip } from '../../navigation/tooltip.react';\nimport ThreadSettingsMemberTooltipButton\n@@ -11,10 +28,82 @@ type CustomProps = {\nthreadInfo: ThreadInfo,\n};\n-function onRemoveUser(props: CustomProps) {\n+function onRemoveUser(\n+ props: CustomProps,\n+ dispatchFunctions: DispatchFunctions,\n+ bindServerCall: (serverCall: ActionFunc) => BoundServerCall,\n+) {\n+ const boundRemoveUsersFromThread = bindServerCall(removeUsersFromThread);\n+ const onConfirmRemoveUser = () => {\n+ const customKeyName = removeUsersFromThreadActionTypes.started +\n+ `:${props.memberInfo.id}`;\n+ dispatchFunctions.dispatchActionPromise(\n+ removeUsersFromThreadActionTypes,\n+ boundRemoveUsersFromThread(\n+ props.threadInfo.id,\n+ [ props.memberInfo.id ],\n+ ),\n+ { customKeyName },\n+ );\n+ }\n+\n+ const userText = stringForUser(props.memberInfo);\n+ Alert.alert(\n+ \"Confirm removal\",\n+ `Are you sure you want to remove ${userText} from this thread?`,\n+ [\n+ { text: 'Cancel', style: 'cancel' },\n+ { text: 'OK', onPress: onConfirmRemoveUser },\n+ ],\n+ );\n}\n-function onToggleAdmin(props: CustomProps) {\n+function onToggleAdmin(\n+ props: CustomProps,\n+ dispatchFunctions: DispatchFunctions,\n+ bindServerCall: (serverCall: ActionFunc) => BoundServerCall,\n+) {\n+ const isCurrentlyAdmin = memberIsAdmin(props.memberInfo, props.threadInfo);\n+ const boundChangeThreadMemberRoles = bindServerCall(changeThreadMemberRoles);\n+ const onConfirmMakeAdmin = () => {\n+ let newRole = null;\n+ for (let roleID in props.threadInfo.roles) {\n+ const role = props.threadInfo.roles[roleID];\n+ if (isCurrentlyAdmin && role.isDefault) {\n+ newRole = role.id;\n+ break;\n+ } else if (!isCurrentlyAdmin && role.name === \"Admins\") {\n+ newRole = role.id;\n+ break;\n+ }\n+ }\n+ invariant(newRole !== null, \"Could not find new role\");\n+\n+ const customKeyName = changeThreadMemberRolesActionTypes.started +\n+ `:${props.memberInfo.id}`;\n+ dispatchFunctions.dispatchActionPromise(\n+ changeThreadMemberRolesActionTypes,\n+ boundChangeThreadMemberRoles(\n+ props.threadInfo.id,\n+ [ props.memberInfo.id ],\n+ newRole,\n+ ),\n+ { customKeyName },\n+ );\n+ }\n+\n+ const userText = stringForUser(props.memberInfo);\n+ const actionClause = isCurrentlyAdmin\n+ ? `remove ${userText} as an admin`\n+ : `make ${userText} an admin`;\n+ Alert.alert(\n+ \"Confirm action\",\n+ `Are you sure you want to ${actionClause} of this thread?`,\n+ [\n+ { text: 'Cancel', style: 'cancel' },\n+ { text: 'OK', onPress: onConfirmMakeAdmin },\n+ ],\n+ );\n}\nconst spec = {\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings-member.react.js", "new_path": "native/chat/settings/thread-settings-member.react.js", "diff": "@@ -6,12 +6,10 @@ import {\nthreadInfoPropType,\nthreadPermissions,\nrelativeMemberInfoPropType,\n- type ChangeThreadSettingsResult,\n} from 'lib/types/thread-types';\nimport type { AppState } from '../../redux/redux-setup';\nimport type { LoadingStatus } from 'lib/types/loading-types';\nimport { loadingStatusPropType } from 'lib/types/loading-types';\n-import type { DispatchActionPromise } from 'lib/utils/action-utils';\nimport {\ntype OverlayableScrollViewState,\noverlayableScrollViewStatePropType,\n@@ -37,21 +35,18 @@ import {\nText,\nStyleSheet,\nPlatform,\n- Alert,\nActivityIndicator,\nTouchableOpacity,\n} from 'react-native';\nimport PropTypes from 'prop-types';\nimport invariant from 'invariant';\n-import { threadHasPermission } from 'lib/shared/thread-utils';\n+import { threadHasPermission, memberIsAdmin } from 'lib/shared/thread-utils';\nimport { stringForUser } from 'lib/shared/user-utils';\nimport { connect } from 'lib/utils/redux-utils';\nimport {\nremoveUsersFromThreadActionTypes,\n- removeUsersFromThread,\nchangeThreadMemberRolesActionTypes,\n- changeThreadMemberRoles,\n} from 'lib/actions/thread-actions';\nimport { createLoadingStatusSelector } from 'lib/selectors/loading-selectors';\n@@ -73,18 +68,6 @@ type Props = {|\noverlayableScrollViewState: ?OverlayableScrollViewState,\n// withKeyboardState\nkeyboardState: ?KeyboardState,\n- // Redux dispatch functions\n- dispatchActionPromise: DispatchActionPromise,\n- // async functions that hit server APIs\n- removeUsersFromThread: (\n- threadID: string,\n- userIDs: string[],\n- ) => Promise<ChangeThreadSettingsResult>,\n- changeThreadMemberRoles: (\n- threadID: string,\n- userIDs: string[],\n- newRole: string,\n- ) => Promise<ChangeThreadSettingsResult>,\n|};\nclass ThreadSettingsMember extends React.PureComponent<Props> {\n@@ -99,18 +82,9 @@ class ThreadSettingsMember extends React.PureComponent<Props> {\nchangeRoleLoadingStatus: loadingStatusPropType.isRequired,\noverlayableScrollViewState: overlayableScrollViewStatePropType,\nkeyboardState: keyboardStatePropType,\n- dispatchActionPromise: PropTypes.func.isRequired,\n- removeUsersFromThread: PropTypes.func.isRequired,\n- changeThreadMemberRoles: PropTypes.func.isRequired,\n};\neditButton: ?View;\n- static memberIsAdmin(props: Props) {\n- const role = props.memberInfo.role &&\n- props.threadInfo.roles[props.memberInfo.role];\n- return role && !role.isDefault && role.name === \"Admins\";\n- }\n-\nvisibleEntryIDs() {\nconst role = this.props.memberInfo.role;\nif (!this.props.canEdit || !role) {\n@@ -143,7 +117,7 @@ class ThreadSettingsMember extends React.PureComponent<Props> {\nif (canChangeRoles && this.props.memberInfo.username) {\nresult.push(\n- ThreadSettingsMember.memberIsAdmin(this.props)\n+ memberIsAdmin(this.props.memberInfo, this.props.threadInfo)\n? \"remove_admin\"\n: \"make_admin\"\n);\n@@ -184,7 +158,7 @@ class ThreadSettingsMember extends React.PureComponent<Props> {\n}\nlet roleInfo = null;\n- if (ThreadSettingsMember.memberIsAdmin(this.props)) {\n+ if (memberIsAdmin(this.props.memberInfo, this.props.threadInfo)) {\nroleInfo = (\n<View style={styles.row}>\n<Text style={styles.role}>admin</Text>\n@@ -252,6 +226,8 @@ class ThreadSettingsMember extends React.PureComponent<Props> {\ninitialCoordinates: coordinates,\nverticalBounds,\nvisibleEntryIDs: this.visibleEntryIDs(),\n+ memberInfo: this.props.memberInfo,\n+ threadInfo: this.props.threadInfo,\n},\n});\n});\n@@ -262,81 +238,6 @@ class ThreadSettingsMember extends React.PureComponent<Props> {\nreturn !!(keyboardState && keyboardState.dismissKeyboardIfShowing());\n}\n- showRemoveUserConfirmation = () => {\n- const userText = stringForUser(this.props.memberInfo);\n- Alert.alert(\n- \"Confirm removal\",\n- `Are you sure you want to remove ${userText} from this thread?`,\n- [\n- { text: 'Cancel', style: 'cancel' },\n- { text: 'OK', onPress: this.onConfirmRemoveUser },\n- ],\n- );\n- }\n-\n- onConfirmRemoveUser = () => {\n- const customKeyName = removeUsersFromThreadActionTypes.started +\n- `:${this.props.memberInfo.id}`;\n- this.props.dispatchActionPromise(\n- removeUsersFromThreadActionTypes,\n- this.removeUser(),\n- { customKeyName },\n- );\n- }\n-\n- async removeUser() {\n- return await this.props.removeUsersFromThread(\n- this.props.threadInfo.id,\n- [ this.props.memberInfo.id ],\n- );\n- }\n-\n- showMakeAdminConfirmation = () => {\n- const userText = stringForUser(this.props.memberInfo);\n- const actionClause = ThreadSettingsMember.memberIsAdmin(this.props)\n- ? `remove ${userText} as an admin`\n- : `make ${userText} an admin`;\n- Alert.alert(\n- \"Confirm action\",\n- `Are you sure you want to ${actionClause} of this thread?`,\n- [\n- { text: 'Cancel', style: 'cancel' },\n- { text: 'OK', onPress: this.onConfirmMakeAdmin },\n- ],\n- );\n- }\n-\n- onConfirmMakeAdmin = () => {\n- const isCurrentlyAdmin = ThreadSettingsMember.memberIsAdmin(this.props);\n- let newRole = null;\n- for (let roleID in this.props.threadInfo.roles) {\n- const role = this.props.threadInfo.roles[roleID];\n- if (isCurrentlyAdmin && role.isDefault) {\n- newRole = role.id;\n- break;\n- } else if (!isCurrentlyAdmin && role.name === \"Admins\") {\n- newRole = role.id;\n- break;\n- }\n- }\n- invariant(newRole !== null, \"Could not find new role\");\n- const customKeyName = changeThreadMemberRolesActionTypes.started +\n- `:${this.props.memberInfo.id}`;\n- this.props.dispatchActionPromise(\n- changeThreadMemberRolesActionTypes,\n- this.makeAdmin(newRole),\n- { customKeyName },\n- );\n- }\n-\n- async makeAdmin(newRole: string) {\n- return await this.props.changeThreadMemberRoles(\n- this.props.threadInfo.id,\n- [ this.props.memberInfo.id ],\n- newRole,\n- );\n- }\n-\n}\nconst styles = StyleSheet.create({\n@@ -392,5 +293,4 @@ export default connect(\n`${changeThreadMemberRolesActionTypes.started}:${ownProps.memberInfo.id}`,\n)(state),\n}),\n- { removeUsersFromThread, changeThreadMemberRoles },\n)(withKeyboardState(withOverlayableScrollViewState(ThreadSettingsMember)));\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Move ThreadSettingsMember action logic to ThreadSettingsMemberTooltipModal
129,187
30.07.2019 17:27:12
14,400
32d7c1490e4685fdee0c3d8d81cd8c7de6d5f376
[native] Don't show dark MessageHeader just because focused
[ { "change_type": "MODIFY", "old_path": "native/chat/message-header.react.js", "new_path": "native/chat/message-header.react.js", "diff": "@@ -21,7 +21,7 @@ function MessageHeader(props: Props) {\nlet authorName = null;\nif (!isViewer && (item.startsCluster || focused)) {\n- const style = color === 'light'\n+ const style = color === 'light' || !item.startsCluster\n? [ styles.authorName, styles.light ]\n: [ styles.authorName, styles.dark ];\nauthorName = (\n@@ -31,8 +31,11 @@ function MessageHeader(props: Props) {\n);\n}\n+ const timestampColor = color === 'light' || !item.startsConversation\n+ ? 'light'\n+ : 'dark';\nconst timestamp = focused || item.startsConversation\n- ? <Timestamp time={time} color={color} />\n+ ? <Timestamp time={time} color={timestampColor} />\n: null;\nif (!timestamp && !authorName) {\nreturn null;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Don't show dark MessageHeader just because focused
129,187
30.07.2019 17:53:06
14,400
bbc19111058ef8c2c6dd0a405c38aef9d6803142
[native] Scroll to top of ChatThreadList on Chat tab press
[ { "change_type": "MODIFY", "old_path": "native/chat/chat-navigator.react.js", "new_path": "native/chat/chat-navigator.react.js", "diff": "@@ -57,9 +57,6 @@ ChatNavigator.navigationOptions = ({ navigation }) => ({\nreturn;\n}\nconst state = navigation.state;\n- if (state.index === 0) {\n- return;\n- }\nconst currentRoute = state.routes[state.index];\nconst chatScreen = getChatScreen(currentRoute.key);\nif (!chatScreen) {\n" }, { "change_type": "MODIFY", "old_path": "native/chat/chat-thread-list.react.js", "new_path": "native/chat/chat-thread-list.react.js", "diff": "@@ -58,7 +58,7 @@ type State = {|\nsearchText: string,\nsearchResults: Set<string>,\n|};\n-class InnerChatThreadList extends React.PureComponent<Props, State> {\n+class ChatThreadList extends React.PureComponent<Props, State> {\nstatic propTypes = {\nnavigation: PropTypes.shape({\n@@ -79,6 +79,7 @@ class InnerChatThreadList extends React.PureComponent<Props, State> {\nheaderBackTitle: \"Back\",\n});\nsearchInput: ?TextInput;\n+ flatList: ?FlatList;\nconstructor(props: Props) {\nsuper(props);\n@@ -87,7 +88,7 @@ class InnerChatThreadList extends React.PureComponent<Props, State> {\nsearchText: \"\",\nsearchResults: new Set(),\n};\n- this.state.listData = InnerChatThreadList.listData(props, this.state);\n+ this.state.listData = ChatThreadList.listData(props, this.state);\n}\ncomponentDidMount() {\n@@ -101,7 +102,7 @@ class InnerChatThreadList extends React.PureComponent<Props, State> {\ncomponentWillReceiveProps(newProps: Props) {\nif (newProps.chatListData !== this.props.chatListData) {\nthis.setState((prevState: State) => ({\n- listData: InnerChatThreadList.listData(newProps, prevState),\n+ listData: ChatThreadList.listData(newProps, prevState),\n}));\n}\n}\n@@ -109,12 +110,15 @@ class InnerChatThreadList extends React.PureComponent<Props, State> {\ncomponentWillUpdate(nextProps: Props, nextState: State) {\nif (nextState.searchText !== this.state.searchText) {\nthis.setState((prevState: State) => ({\n- listData: InnerChatThreadList.listData(nextProps, nextState),\n+ listData: ChatThreadList.listData(nextProps, nextState),\n}));\n}\n}\nget canReset() {\n+ if (this.flatList) {\n+ this.flatList.scrollToOffset({ offset: 0, animated: true });\n+ }\nreturn false;\n}\n@@ -189,9 +193,9 @@ class InnerChatThreadList extends React.PureComponent<Props, State> {\nreturn { length: 0, offset: 0, index };\n}\nconst offset =\n- InnerChatThreadList.heightOfItems(data.filter((_, i) => i < index));\n+ ChatThreadList.heightOfItems(data.filter((_, i) => i < index));\nconst item = data[index];\n- const length = item ? InnerChatThreadList.itemHeight(item) : 0;\n+ const length = item ? ChatThreadList.itemHeight(item) : 0;\nreturn { length, offset, index };\n}\n@@ -203,7 +207,7 @@ class InnerChatThreadList extends React.PureComponent<Props, State> {\n}\nstatic heightOfItems(data: $ReadOnlyArray<Item>): number {\n- return _sum(data.map(InnerChatThreadList.itemHeight));\n+ return _sum(data.map(ChatThreadList.itemHeight));\n}\nstatic listData(props: Props, state: State) {\n@@ -242,18 +246,23 @@ class InnerChatThreadList extends React.PureComponent<Props, State> {\n<FlatList\ndata={this.state.listData}\nrenderItem={this.renderItem}\n- keyExtractor={InnerChatThreadList.keyExtractor}\n- getItemLayout={InnerChatThreadList.getItemLayout}\n+ keyExtractor={ChatThreadList.keyExtractor}\n+ getItemLayout={ChatThreadList.getItemLayout}\nextraData={this.props.viewerID}\ninitialNumToRender={11}\nkeyboardShouldPersistTaps=\"handled\"\nstyle={styles.flatList}\n+ ref={this.flatListRef}\n/>\n{floatingAction}\n</View>\n);\n}\n+ flatListRef = (flatList: ?FlatList) => {\n+ this.flatList = flatList;\n+ }\n+\nonChangeSearchText = (searchText: string) => {\nconst results = this.props.threadSearchIndex.getSearchResults(searchText);\nthis.setState({ searchText, searchResults: new Set(results) });\n@@ -326,10 +335,8 @@ const styles = StyleSheet.create({\n},\n});\n-const ChatThreadList = connect((state: AppState) => ({\n+export default connect((state: AppState) => ({\nchatListData: chatListData(state),\nviewerID: state.currentUserInfo && state.currentUserInfo.id,\nthreadSearchIndex: threadSearchIndex(state),\n-}))(InnerChatThreadList);\n-\n-export default ChatThreadList;\n+}))(ChatThreadList);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Scroll to top of ChatThreadList on Chat tab press
129,187
30.07.2019 18:08:53
14,400
876b79f7c0a3780ff9c8a32cac1d13652c59c538
[native] RootNavigator should only handle dismiss keyboard for its own routes
[ { "change_type": "MODIFY", "old_path": "native/navigation/navigation-setup.js", "new_path": "native/navigation/navigation-setup.js", "diff": "@@ -284,6 +284,9 @@ const RootNavigator = createStackNavigator(\nconst { route } = scene;\nconst { scene: prevScene } = prevTransitionProps;\nconst { route: prevRoute } = prevScene;\n+ if (route.key === prevRoute.key) {\n+ return;\n+ }\nif (\nroute.routeName !== AppRouteName ||\nprevRoute.routeName !== ThreadPickerModalRouteName\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] RootNavigator should only handle dismiss keyboard for its own routes
129,187
31.07.2019 10:59:19
14,400
6d427566f180151157cdf9e29fc90350ef9e4e37
[native] Update react-native-reanimated and react-native-gesture-handler
[ { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"react-native-firebase\": \"^5.3.1\",\n\"react-native-floating-action\": \"^1.9.0\",\n\"react-native-fs\": \"^2.13.3\",\n- \"react-native-gesture-handler\": \"git+https://git@github.com/kmagiera/react-native-gesture-handler.git#99dce5e787f0c0e87cf748bc78d32fb65fcdb0e8\",\n+ \"react-native-gesture-handler\": \"^1.3.0\",\n\"react-native-hyperlink\": \"git+https://git@github.com/ashoat/react-native-hyperlink.git#both\",\n\"react-native-image-resizer\": \"^1.0.1\",\n\"react-native-in-app-notification\": \"^2.1.0\",\n\"react-native-onepassword\": \"git+https://git@github.com/DriveWealth/react-native-onepassword.git#aed794d8c6f0f2560b62a0012449abf6f1b3576c\",\n\"react-native-orientation-locker\": \"^1.1.5\",\n\"react-native-progress\": \"^3.6.0\",\n- \"react-native-reanimated\": \"git+https://git@github.com/kmagiera/react-native-reanimated.git#0a6405dc21ed76185969a2970f642911519a59c1\",\n+ \"react-native-reanimated\": \"^1.1.0\",\n\"react-native-screens\": \"1.0.0-alpha.17\",\n\"react-native-segmented-control-tab\": \"^3.2.1\",\n\"react-native-splash-screen\": \"^3.1.1\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -10720,9 +10720,10 @@ react-native-fs@^2.13.3:\nbase-64 \"^0.1.0\"\nutf8 \"^2.1.1\"\n-\"react-native-gesture-handler@git+https://git@github.com/kmagiera/react-native-gesture-handler.git#99dce5e787f0c0e87cf748bc78d32fb65fcdb0e8\":\n- version \"1.1.0\"\n- resolved \"git+https://git@github.com/kmagiera/react-native-gesture-handler.git#99dce5e787f0c0e87cf748bc78d32fb65fcdb0e8\"\n+react-native-gesture-handler@^1.3.0:\n+ version \"1.3.0\"\n+ resolved \"https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.3.0.tgz#d0386f565928ccc1849537f03f2e37fd5f6ad43f\"\n+ integrity sha512-ASRFIXBuKRvqlmwkWJhV8yP2dTpvcqVrLNpd7FKVBFHYWr6SAxjGyO9Ik8w1lAxDhMlRP2IcJ9p9eq5X2WWeLQ==\ndependencies:\nhoist-non-react-statics \"^2.3.1\"\ninvariant \"^2.2.2\"\n@@ -10790,9 +10791,10 @@ react-native-progress@^3.6.0:\ndependencies:\nprop-types \"^15.7.2\"\n-\"react-native-reanimated@git+https://git@github.com/kmagiera/react-native-reanimated.git#0a6405dc21ed76185969a2970f642911519a59c1\":\n- version \"1.0.1\"\n- resolved \"git+https://git@github.com/kmagiera/react-native-reanimated.git#0a6405dc21ed76185969a2970f642911519a59c1\"\n+react-native-reanimated@^1.1.0:\n+ version \"1.1.0\"\n+ resolved \"https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-1.1.0.tgz#ba6864055ec3a206cdd5209a293fe653ce276206\"\n+ integrity sha512-UGDVNfvuIkMqYUx6aytSzihuzv6sWubn0MQi8dRcw7BjgezhjJnVnJ/NSOcpL3cO+Ld7lFcRX6GKcskwkHdPkw==\nreact-native-safe-area-view@^0.14.1:\nversion \"0.14.6\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Update react-native-reanimated and react-native-gesture-handler
129,187
31.07.2019 11:06:34
14,400
c582ab8df9c8b1caa5beadefee408bab02f2496c
[native] Don't show tooltip container before transforms It looks like when your first render of a `View` has transforms, React Native will first render without the transforms so it knows what the baseline is. We want to prevent the user from seeing this first render.
[ { "change_type": "MODIFY", "old_path": "native/navigation/tooltip.react.js", "new_path": "native/navigation/tooltip.react.js", "diff": "@@ -125,6 +125,7 @@ function createTooltip<\n};\nprogress: Value;\nbackdropOpacity: Value;\n+ tooltipContainerOpacity: Value;\ntooltipVerticalAbove: Value;\ntooltipVerticalBelow: Value;\ntooltipHorizontalOffset = new Animated.Value(0);\n@@ -151,6 +152,14 @@ function createTooltip<\nextrapolate: Extrapolate.CLAMP,\n},\n);\n+ this.tooltipContainerOpacity = interpolate(\n+ this.progress,\n+ {\n+ inputRange: [ 0, 0.1 ],\n+ outputRange: [ 0, 1 ],\n+ extrapolate: Extrapolate.CLAMP,\n+ },\n+ );\nconst { initialCoordinates } = props.navigation.state.params;\nconst { y, height } = initialCoordinates;\n@@ -266,6 +275,7 @@ function createTooltip<\nconst style: ViewStyle = {\nposition: 'absolute',\nalignItems: 'center',\n+ opacity: this.tooltipContainerOpacity,\ntransform: [\n{ translateX: this.tooltipHorizontal },\n],\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Don't show tooltip container before transforms It looks like when your first render of a `View` has transforms, React Native will first render without the transforms so it knows what the baseline is. We want to prevent the user from seeing this first render.
129,187
31.07.2019 13:49:55
14,400
e5320b62dea15b17938a4c1135f87838ec0849ac
[native] Also `reactotron-redux@^3.1.1`
[ { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"react-navigation-redux-helpers\": \"^3.0.2\",\n\"react-navigation-stack\": \"~1.4.0\",\n\"react-redux\": \"^5.0.6\",\n- \"reactotron-react-native\": \"^2.0.0\",\n- \"reactotron-redux\": \"^2.0.0\",\n+ \"reactotron-react-native\": \"4.0.0-beta.1\",\n+ \"reactotron-redux\": \"^3.1.1\",\n\"redux\": \"^4.0.1\",\n\"redux-devtools-extension\": \"^2.13.2\",\n\"redux-persist\": \"^5.4.0\",\n" }, { "change_type": "MODIFY", "old_path": "native/reactotron.js", "new_path": "native/reactotron.js", "diff": "// @flow\n+import AsyncStorage from '@react-native-community/async-storage';\n+\nlet reactotron = null;\nif (__DEV__) {\nconst { default: Reactotron } = require('reactotron-react-native');\nconst { reactotronRedux } = require('reactotron-redux');\nreactotron = Reactotron\n.configure()\n+ .setAsyncStorageHandler(AsyncStorage)\n.useReactNative()\n.use(reactotronRedux())\n.connect();\n" }, { "change_type": "MODIFY", "old_path": "native/redux/redux-setup.js", "new_path": "native/redux/redux-setup.js", "diff": "@@ -35,7 +35,7 @@ import React from 'react';\nimport invariant from 'invariant';\nimport thunk from 'redux-thunk';\nimport {\n- createStore as defaultCreateStore,\n+ createStore,\napplyMiddleware,\ntype Store,\n} from 'redux';\n@@ -92,10 +92,6 @@ import { ComposeThreadRouteName } from '../navigation/route-names';\nimport reactotron from '../reactotron';\nimport reduceDrafts from '../reducers/draft-reducer';\n-const createStore = reactotron\n- ? reactotron.createStore\n- : defaultCreateStore;\n-\nexport type AppState = {|\nnavInfo: NavInfo,\ncurrentUserInfo: ?CurrentUserInfo,\n@@ -407,15 +403,25 @@ function appBecameInactive() {\nappLastBecameInactive = Date.now();\n}\n+let enhancers;\nconst reactNavigationMiddleware = createReactNavigationReduxMiddleware(\n(state: AppState) => state.navInfo.navigationState,\n);\n+if (reactotron) {\n+ enhancers = composeWithDevTools(\n+ applyMiddleware(thunk, reactNavigationMiddleware, reduxLoggerMiddleware),\n+ reactotron.createEnhancer(),\n+ );\n+} else {\n+ enhancers = composeWithDevTools(\n+ applyMiddleware(thunk, reactNavigationMiddleware, reduxLoggerMiddleware),\n+ );\n+}\n+\nconst store: Store<AppState, *> = createStore(\npersistReducer(persistConfig, reducer),\ndefaultState,\n- composeWithDevTools(\n- applyMiddleware(thunk, reactNavigationMiddleware, reduxLoggerMiddleware),\n- ),\n+ enhancers,\n);\nconst persistor = persistStore(store);\nsetPersistor(persistor);\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -7636,11 +7636,6 @@ locate-path@^3.0.0:\np-locate \"^3.0.0\"\npath-exists \"^3.0.0\"\n-lodash-es@^4.2.1:\n- version \"4.17.11\"\n- resolved \"https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.11.tgz#145ab4a7ac5c5e52a3531fb4f310255a152b4be0\"\n- integrity sha512-DHb1ub+rMjjrxqlB3H56/6MXtm1lSksDp2rA2cNWjG8mlDUYFhUj3Di2Zn5IwSU87xLv8tNIQ7sSwE/YOX/D/Q==\n-\nlodash.assign@^4.0.3, lodash.assign@^4.0.6, lodash.assign@^4.2.0:\nversion \"4.2.0\"\nresolved \"https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7\"\n@@ -7756,7 +7751,7 @@ lodash@^3.2.0:\nresolved \"https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6\"\nintegrity sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=\n-lodash@^4.0.0, lodash@^4.0.1, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.1, lodash@^4.6.1:\n+lodash@^4.0.0, lodash@^4.0.1, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.5.1, lodash@^4.6.1:\nversion \"4.17.11\"\nresolved \"https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d\"\nintegrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==\n@@ -8516,7 +8511,7 @@ mississippi@^3.0.0:\nstream-each \"^1.1.0\"\nthrough2 \"^2.0.0\"\n-mitt@^1.1.2:\n+mitt@1.1.3:\nversion \"1.1.3\"\nresolved \"https://registry.yarnpkg.com/mitt/-/mitt-1.1.3.tgz#528c506238a05dce11cd914a741ea2cc332da9b8\"\nintegrity sha512-mUDCnVNsAi+eD6qA0HkRkwYczbLHJ49z17BGe2PYRhZL4wpZUFZGJHU7/5tmvohoma+Hdn0Vh/oJTiPEmgSruA==\n@@ -10429,15 +10424,7 @@ qs@6.5.2, qs@~6.5.2:\nresolved \"https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36\"\nintegrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==\n-query-string@^4.1.0:\n- version \"4.3.4\"\n- resolved \"https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb\"\n- integrity sha1-u7aTucqRXCMlFbIosaArYJBD2+s=\n- dependencies:\n- object-assign \"^4.1.0\"\n- strict-uri-encode \"^1.0.0\"\n-\n-query-string@^6.4.2:\n+query-string@6.8.1, query-string@^6.4.2:\nversion \"6.8.1\"\nresolved \"https://registry.yarnpkg.com/query-string/-/query-string-6.8.1.tgz#62c54a7ef37d01b538c8fd56f95740c81d438a26\"\nintegrity sha512-g6y0Lbq10a5pPQpjlFuojfMfV1Pd2Jw9h75ypiYPPia3Gcq2rgkKiIwbkS6JxH7c5f5u/B/sB+d13PU+g1eu4Q==\n@@ -10446,6 +10433,14 @@ query-string@^6.4.2:\nsplit-on-first \"^1.0.0\"\nstrict-uri-encode \"^2.0.0\"\n+query-string@^4.1.0:\n+ version \"4.3.4\"\n+ resolved \"https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb\"\n+ integrity sha1-u7aTucqRXCMlFbIosaArYJBD2+s=\n+ dependencies:\n+ object-assign \"^4.1.0\"\n+ strict-uri-encode \"^1.0.0\"\n+\nquerystring-es3@^0.2.0:\nversion \"0.2.1\"\nresolved \"https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73\"\n@@ -10461,18 +10456,6 @@ querystringify@^2.0.0:\nresolved \"https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.0.tgz#7ded8dfbf7879dcc60d0a644ac6754b283ad17ef\"\nintegrity sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg==\n-ramda@^0.24.1:\n- version \"0.24.1\"\n- resolved \"https://registry.yarnpkg.com/ramda/-/ramda-0.24.1.tgz#c3b7755197f35b8dc3502228262c4c91ddb6b857\"\n- integrity sha1-w7d1UZfzW43DUCIoJixMkd22uFc=\n-\n-ramdasauce@^2.0.0:\n- version \"2.1.0\"\n- resolved \"https://registry.yarnpkg.com/ramdasauce/-/ramdasauce-2.1.0.tgz#65ea157a9cfc17841a7dd6499d3f9f421dc2eb36\"\n- integrity sha512-BdHm//tlCCmeXxY5EvIvlczuWvZU5QcRybdxZ4mkDOIasWzbBs+bjt3iEVsThKCMWLIiFZpggtQmIyjtL7eOvA==\n- dependencies:\n- ramda \"^0.24.1\"\n-\nrandomatic@^3.0.0:\nversion \"3.1.1\"\nresolved \"https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed\"\n@@ -11078,29 +11061,25 @@ reactcss@^1.2.0:\ndependencies:\nlodash \"^4.0.1\"\n-reactotron-core-client@^2.1.0:\n- version \"2.1.0\"\n- resolved \"https://registry.yarnpkg.com/reactotron-core-client/-/reactotron-core-client-2.1.0.tgz#d36f806eaf14a9f8c4595a9866f8cbfaafc1ee8c\"\n- integrity sha512-YnTWbnpuo6Jy3kgBLUqzjbkgdyWlrosQvt1Q2LRPlo39o3n/lfncN/bmO9JQh9hD8A3L7DEQ7XCPpVPek1BJPA==\n+reactotron-core-client@2.8.3:\n+ version \"2.8.3\"\n+ resolved \"https://registry.yarnpkg.com/reactotron-core-client/-/reactotron-core-client-2.8.3.tgz#e8ce782f21ba3c04eb3c678297edceac283857ff\"\n+ integrity sha512-TAidkKZvU2KyCSkRyorLm0RZ/8KnYMIWsawyMsXcSNm2aEOku/5RbBh/7yPNZHU1X7199UMs4T1TAedlK6/w6A==\n-reactotron-react-native@^2.0.0:\n- version \"2.1.0\"\n- resolved \"https://registry.yarnpkg.com/reactotron-react-native/-/reactotron-react-native-2.1.0.tgz#eefafb8d146e96f037c33ef5d57e5a4ada3124f7\"\n- integrity sha512-dx0r6w81K1EHns13Oq3LblaXeWsZ8/0vjX4dgR5W2Jp4l7XpEBirpE+g8J1g+rWhiZObn7Jp3jmCJJoheRAncA==\n+reactotron-react-native@4.0.0-beta.1:\n+ version \"4.0.0-beta.1\"\n+ resolved \"https://registry.yarnpkg.com/reactotron-react-native/-/reactotron-react-native-4.0.0-beta.1.tgz#424a5c54aea9c41252a063d30c157132f95ec84d\"\n+ integrity sha512-eHgSfUAcfhhe1Sa5Q9fiU1Ib5I6hGerHmb2ESPZ/aOmBJDcH0izO4hZSzScm94bx2RLxZvs/653lF2thv8sX7Q==\ndependencies:\n- mitt \"^1.1.2\"\n- prop-types \"^15.5.10\"\n- reactotron-core-client \"^2.1.0\"\n+ mitt \"1.1.3\"\n+ query-string \"6.8.1\"\n+ reactotron-core-client \"2.8.3\"\n+ rn-host-detect \"1.1.5\"\n-reactotron-redux@^2.0.0:\n- version \"2.1.0\"\n- resolved \"https://registry.yarnpkg.com/reactotron-redux/-/reactotron-redux-2.1.0.tgz#69568912e2894cb3d996843bdaa759c3ec59a45a\"\n- integrity sha512-HWfDIZN5stZJrdQXp5AWgH12rgGLpXoSV2rC3va0BP9XxwgG+SKA1f2DQ8W2MrDz5wZ47PGLfhHPjqJQUM20dQ==\n- dependencies:\n- ramda \"^0.24.1\"\n- ramdasauce \"^2.0.0\"\n- reactotron-core-client \"^2.1.0\"\n- redux \"^3.7.1\"\n+reactotron-redux@^3.1.1:\n+ version \"3.1.1\"\n+ resolved \"https://registry.yarnpkg.com/reactotron-redux/-/reactotron-redux-3.1.1.tgz#eed516afa7f26d6202355e777fbc38ed12ae5f29\"\n+ integrity sha512-8tnF952oUy5bd1UmXchegumNuvO/v8o1KiU7uOsutN8ZZ2/RQ91Vew/bLF7JxzeJBWaiU2kxItMFeZucFm4slw==\nread-pkg-up@^1.0.1:\nversion \"1.0.1\"\n@@ -11311,16 +11290,6 @@ redux-thunk@^2.2.0:\nresolved \"https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622\"\nintegrity sha512-km6dclyFnmcvxhAcrQV2AkZmPQjzPDjgVlQtR0EQjxZPyJ0BnMf3in1ryuR8A2qU0HldVRfxYXbFSKlI3N7Slw==\n-redux@^3.7.1:\n- version \"3.7.2\"\n- resolved \"https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b\"\n- integrity sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==\n- dependencies:\n- lodash \"^4.2.1\"\n- lodash-es \"^4.2.1\"\n- loose-envify \"^1.1.0\"\n- symbol-observable \"^1.0.3\"\n-\nredux@^4.0.1:\nversion \"4.0.1\"\nresolved \"https://registry.yarnpkg.com/redux/-/redux-4.0.1.tgz#436cae6cc40fbe4727689d7c8fae44808f1bfef5\"\n@@ -11663,6 +11632,11 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:\nhash-base \"^3.0.0\"\ninherits \"^2.0.1\"\n+rn-host-detect@1.1.5:\n+ version \"1.1.5\"\n+ resolved \"https://registry.yarnpkg.com/rn-host-detect/-/rn-host-detect-1.1.5.tgz#fbecb982b73932f34529e97932b9a63e58d8deb6\"\n+ integrity sha512-ufk2dFT3QeP9HyZ/xTuMtW27KnFy815CYitJMqQm+pgG3ZAtHBsrU8nXizNKkqXGy3bQmhEoloVbrfbvMJMqkg==\n+\nrsvp@^3.3.3:\nversion \"3.6.2\"\nresolved \"https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a\"\n@@ -12619,7 +12593,7 @@ svgo@^1.0.0:\nunquote \"~1.1.1\"\nutil.promisify \"~1.0.0\"\n-symbol-observable@^1.0.3, symbol-observable@^1.0.4, symbol-observable@^1.2.0:\n+symbol-observable@^1.0.4, symbol-observable@^1.2.0:\nversion \"1.2.0\"\nresolved \"https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804\"\nintegrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] reactotron-react-native@4.0.0-beta.1 Also `reactotron-redux@^3.1.1`
129,187
31.07.2019 14:03:42
14,400
33f76a961828ffcd5a5d9070ae7fc2aa34e32994
[native] Allow Calendar scrollers to trigger fetch if loadingStatus inactive I've been seeing edge cases where it becomes impossible to trigger a fetch. Hopefully this fixes it...
[ { "change_type": "MODIFY", "old_path": "native/calendar/calendar.react.js", "new_path": "native/calendar/calendar.react.js", "diff": "@@ -1040,7 +1040,7 @@ class InnerCalendar extends React.PureComponent<Props, State> {\nif (\ntopLoader &&\n!this.topLoaderWaitingToLeaveView &&\n- !this.topLoadingFromScroll\n+ (!this.topLoadingFromScroll || this.props.loadingStatus === \"inactive\")\n) {\nthis.topLoaderWaitingToLeaveView = true;\nconst start = dateFromString(this.props.startDate);\n@@ -1056,7 +1056,7 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n} else if (\nbottomLoader &&\n!this.bottomLoaderWaitingToLeaveView &&\n- !this.bottomLoadingFromScroll\n+ (!this.bottomLoadingFromScroll || this.props.loadingStatus === \"inactive\")\n) {\nthis.bottomLoaderWaitingToLeaveView = true;\nconst end = dateFromString(this.props.endDate);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Allow Calendar scrollers to trigger fetch if loadingStatus inactive I've been seeing edge cases where it becomes impossible to trigger a fetch. Hopefully this fixes it...
129,187
31.07.2019 14:12:37
14,400
ec11dd8552e14b0de8a70fdd35563f20aa9f6aae
[lib] Include year in old timestamps
[ { "change_type": "MODIFY", "old_path": "lib/utils/date-utils.js", "new_path": "lib/utils/date-utils.js", "diff": "@@ -79,6 +79,7 @@ function dateFromString(dayString: string): Date {\nconst millisecondsInDay = 24 * 60 * 60 * 1000;\nconst millisecondsInWeek = millisecondsInDay * 7;\n+const millisecondsInYear = millisecondsInDay * 365;\n// Takes a millisecond timestamp and displays the time in the local timezone\nfunction shortAbsoluteDate(timestamp: number) {\n@@ -88,8 +89,10 @@ function shortAbsoluteDate(timestamp: number) {\nreturn dateFormat(timestamp, \"h:MM TT\");\n} else if (msSince < millisecondsInWeek) {\nreturn dateFormat(timestamp, \"ddd\");\n- } else {\n+ } else if (msSince < millisecondsInYear) {\nreturn dateFormat(timestamp, \"mmm d\");\n+ } else {\n+ return dateFormat(timestamp, \"mmm d yyyy\");\n}\n}\n@@ -101,8 +104,10 @@ function longAbsoluteDate(timestamp: number) {\nreturn dateFormat(timestamp, \"h:MM TT\");\n} else if (msSince < millisecondsInWeek) {\nreturn dateFormat(timestamp, \"ddd h:MM TT\");\n- } else {\n+ } else if (msSince < millisecondsInYear) {\nreturn dateFormat(timestamp, \"mmmm d, h:MM TT\");\n+ } else {\n+ return dateFormat(timestamp, \"mmmm d yyyy, h:MM TT\");\n}\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Include year in old timestamps
129,187
31.07.2019 17:31:00
14,400
8d0bcc5e6c0f55c17d5bc5b28f40fdea0371b42e
[native] codeVersion -> 32
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -113,8 +113,8 @@ android {\napplicationId \"org.squadcal\"\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 31\n- versionName \"0.0.31\"\n+ versionCode 32\n+ versionName \"0.0.32\"\n}\nsplits {\nabi {\n" }, { "change_type": "MODIFY", "old_path": "native/ios/SquadCal/Info.plist", "new_path": "native/ios/SquadCal/Info.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.31</string>\n+ <string>0.0.32</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>31</string>\n+ <string>32</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/redux/persist.js", "new_path": "native/redux/persist.js", "diff": "@@ -142,7 +142,7 @@ const persistConfig = {\nmigrate: createMigrate(migrations, { debug: __DEV__ }),\n};\n-const codeVersion = 31;\n+const codeVersion = 32;\n// This local exists to avoid a circular dependency where redux-setup needs to\n// import all the navigation and screen stuff, but some of those screens want to\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] codeVersion -> 32
129,187
07.08.2019 10:13:18
14,400
3519260d1f967b6eed3950aab6bfb2e39903e8e4
[native] Update Podfile
[ { "change_type": "MODIFY", "old_path": "native/ios/Podfile", "new_path": "native/ios/Podfile", "diff": "@@ -46,9 +46,4 @@ target 'SquadCal' do\npod 'react-native-image-resizer', :path => '../../node_modules/react-native-image-resizer'\npod 'RNFS', :path => '../../node_modules/react-native-fs'\n- target 'SquadCalTests' do\n- inherit! :search_paths\n- # Pods for testing\n- end\n-\nend\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Podfile.lock", "new_path": "native/ios/Podfile.lock", "diff": "@@ -231,6 +231,6 @@ SPEC CHECKSUMS:\nSDWebImage: 920f1a2ff1ca8296ad34f6e0510a1ef1d70ac965\nyoga: 92b2102c3d373d1a790db4ab761d2b0ffc634f64\n-PODFILE CHECKSUM: 557d6ad2cd7fd4073717f3c874bbe0ea71279370\n+PODFILE CHECKSUM: 17d86d8a0399fc6a4a1e2dd4da61fa4957bf418e\n-COCOAPODS: 1.6.1\n+COCOAPODS: 1.7.5\n" }, { "change_type": "MODIFY", "old_path": "native/ios/SquadCal.xcodeproj/project.pbxproj", "new_path": "native/ios/SquadCal.xcodeproj/project.pbxproj", "diff": "13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };\n13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };\n13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };\n- 164ABF33429CFE672F0D2509 /* libPods-SquadCal.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0DD07F9928C5FD45DC1BEA6 /* libPods-SquadCal.a */; };\n18985E4AA5904D639E79FF24 /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D93876C58814C70A51B11CA /* SimpleLineIcons.ttf */; };\n2765B03152DC46AA9BF9C619 /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 679D0ED4D6CD443282915074 /* Octicons.ttf */; };\n2E72CD8C0A0E45EA96D7DE39 /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C8642FC942DA484383E738BC /* Foundation.ttf */; };\nB623ACE13EBF4A499897718B /* Entypo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 76DBEB73A008439E97F240AC /* Entypo.ttf */; };\nD6934A274A584CD1A9BA225D /* EvilIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EB874B1A580F4300A923B4A0 /* EvilIcons.ttf */; };\nEB37E3DA34EE413AB9DDD891 /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 385405DD37934EDF872A9264 /* MaterialIcons.ttf */; };\n+ EC1D8862480F431D658EC317 /* libPods-SquadCal.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9D7454B8E941C3B33A417A5F /* libPods-SquadCal.a */; };\n/* End PBXBuildFile section */\n/* Begin PBXFileReference section */\n008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = \"<group>\"; };\n- 014977C8FB73A1BAFFC6A440 /* Pods-SquadCal.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-SquadCal.release.xcconfig\"; path = \"Target Support Files/Pods-SquadCal/Pods-SquadCal.release.xcconfig\"; sourceTree = \"<group>\"; };\n- 0C7EDB01EA89B2CC28DB5C92 /* Pods-SquadCal.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-SquadCal.debug.xcconfig\"; path = \"Target Support Files/Pods-SquadCal/Pods-SquadCal.debug.xcconfig\"; sourceTree = \"<group>\"; };\n13B07F961A680F5B00A75B9A /* SquadCal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SquadCal.app; sourceTree = BUILT_PRODUCTS_DIR; };\n13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = SquadCal/AppDelegate.h; sourceTree = \"<group>\"; };\n13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = SquadCal/AppDelegate.m; sourceTree = \"<group>\"; };\n679D0ED4D6CD443282915074 /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = \"../node_modules/react-native-vector-icons/Fonts/Octicons.ttf\"; sourceTree = \"<group>\"; };\n6D556981F43D459CB36250F9 /* Zocial.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Zocial.ttf; path = \"../node_modules/react-native-vector-icons/Fonts/Zocial.ttf\"; sourceTree = \"<group>\"; };\n76DBEB73A008439E97F240AC /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = \"../node_modules/react-native-vector-icons/Fonts/Entypo.ttf\"; sourceTree = \"<group>\"; };\n+ 7EE5A7681B39319D3AF09109 /* Pods-SquadCal.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-SquadCal.release.xcconfig\"; path = \"Target Support Files/Pods-SquadCal/Pods-SquadCal.release.xcconfig\"; sourceTree = \"<group>\"; };\n7F761E292201141E001B6FB7 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };\n7FB58ABB1E7F6BC600B4C1B1 /* Anaheim-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = \"Anaheim-Regular.ttf\"; sourceTree = \"<group>\"; };\n7FB58ABC1E7F6BC600B4C1B1 /* OpenSans-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = \"OpenSans-Regular.ttf\"; sourceTree = \"<group>\"; };\n7FB58ABD1E7F6BC600B4C1B1 /* OpenSans-Semibold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = \"OpenSans-Semibold.ttf\"; sourceTree = \"<group>\"; };\n7FCFD8BD1E81B8DF00629B0E /* SquadCal.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = SquadCal.entitlements; path = SquadCal/SquadCal.entitlements; sourceTree = \"<group>\"; };\n- A0DD07F9928C5FD45DC1BEA6 /* libPods-SquadCal.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = \"libPods-SquadCal.a\"; sourceTree = BUILT_PRODUCTS_DIR; };\n- AE948BDFEBFF0E001C92466E /* Pods-SquadCalTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-SquadCalTests.release.xcconfig\"; path = \"Target Support Files/Pods-SquadCalTests/Pods-SquadCalTests.release.xcconfig\"; sourceTree = \"<group>\"; };\n- C31F1DCD54AFD77F728CBF09 /* Pods-SquadCalTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-SquadCalTests.debug.xcconfig\"; path = \"Target Support Files/Pods-SquadCalTests/Pods-SquadCalTests.debug.xcconfig\"; sourceTree = \"<group>\"; };\n+ 8C0A50BD3E650F9A49DACD73 /* Pods-SquadCal.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-SquadCal.debug.xcconfig\"; path = \"Target Support Files/Pods-SquadCal/Pods-SquadCal.debug.xcconfig\"; sourceTree = \"<group>\"; };\n+ 9D7454B8E941C3B33A417A5F /* libPods-SquadCal.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = \"libPods-SquadCal.a\"; sourceTree = BUILT_PRODUCTS_DIR; };\nC8642FC942DA484383E738BC /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = \"../node_modules/react-native-vector-icons/Fonts/Foundation.ttf\"; sourceTree = \"<group>\"; };\nD70A534A191746A08CD82B83 /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = \"../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf\"; sourceTree = \"<group>\"; };\nE594F1B870984E85B20C0622 /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = \"../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf\"; sourceTree = \"<group>\"; };\nbuildActionMask = 2147483647;\nfiles = (\n7F761E602201141E001B6FB7 /* JavaScriptCore.framework in Frameworks */,\n- 164ABF33429CFE672F0D2509 /* libPods-SquadCal.a in Frameworks */,\n+ EC1D8862480F431D658EC317 /* libPods-SquadCal.a in Frameworks */,\n);\nrunOnlyForDeploymentPostprocessing = 0;\n};\nisa = PBXGroup;\nchildren = (\n7F761E292201141E001B6FB7 /* JavaScriptCore.framework */,\n- A0DD07F9928C5FD45DC1BEA6 /* libPods-SquadCal.a */,\n+ 9D7454B8E941C3B33A417A5F /* libPods-SquadCal.a */,\n);\nname = Frameworks;\nsourceTree = \"<group>\";\nD533B93718E3B9684B508006 /* Pods */ = {\nisa = PBXGroup;\nchildren = (\n- 0C7EDB01EA89B2CC28DB5C92 /* Pods-SquadCal.debug.xcconfig */,\n- 014977C8FB73A1BAFFC6A440 /* Pods-SquadCal.release.xcconfig */,\n- C31F1DCD54AFD77F728CBF09 /* Pods-SquadCalTests.debug.xcconfig */,\n- AE948BDFEBFF0E001C92466E /* Pods-SquadCalTests.release.xcconfig */,\n+ 8C0A50BD3E650F9A49DACD73 /* Pods-SquadCal.debug.xcconfig */,\n+ 7EE5A7681B39319D3AF09109 /* Pods-SquadCal.release.xcconfig */,\n);\npath = Pods;\nsourceTree = \"<group>\";\nisa = PBXNativeTarget;\nbuildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget \"SquadCal\" */;\nbuildPhases = (\n- 71A3C0E6E4C594516228C60A /* [CP] Check Pods Manifest.lock */,\n+ 3FE01AD85986FDE151C2E50A /* [CP] Check Pods Manifest.lock */,\n13B07F871A680F5B00A75B9A /* Sources */,\n13B07F8C1A680F5B00A75B9A /* Frameworks */,\n13B07F8E1A680F5B00A75B9A /* Resources */,\n00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,\n- 7E9A2F093C5F94FE0B812FE7 /* [CP] Copy Pods Resources */,\n+ DC10C46355D57CB12F6B6D49 /* [CP] Copy Pods Resources */,\n);\nbuildRules = (\n);\nshellPath = /bin/sh;\nshellScript = \"export NODE_BINARY=node\\n../node_modules/react-native/scripts/react-native-xcode.sh\\n\";\n};\n- 71A3C0E6E4C594516228C60A /* [CP] Check Pods Manifest.lock */ = {\n+ 3FE01AD85986FDE151C2E50A /* [CP] Check Pods Manifest.lock */ = {\nisa = PBXShellScriptBuildPhase;\nbuildActionMask = 2147483647;\nfiles = (\nshellScript = \"diff \\\"${PODS_PODFILE_DIR_PATH}/Podfile.lock\\\" \\\"${PODS_ROOT}/Manifest.lock\\\" > /dev/null\\nif [ $? != 0 ] ; then\\n # print error to STDERR\\n echo \\\"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\\\" >&2\\n exit 1\\nfi\\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\\necho \\\"SUCCESS\\\" > \\\"${SCRIPT_OUTPUT_FILE_0}\\\"\\n\";\nshowEnvVarsInLog = 0;\n};\n- 7E9A2F093C5F94FE0B812FE7 /* [CP] Copy Pods Resources */ = {\n+ DC10C46355D57CB12F6B6D49 /* [CP] Copy Pods Resources */ = {\nisa = PBXShellScriptBuildPhase;\nbuildActionMask = 2147483647;\nfiles = (\n);\n- inputFileListPaths = (\n- );\ninputPaths = (\n\"${PODS_ROOT}/Target Support Files/Pods-SquadCal/Pods-SquadCal-resources.sh\",\n\"${PODS_CONFIGURATION_BUILD_DIR}/1PasswordExtension/OnePasswordExtensionResources.bundle\",\n\"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf\",\n);\nname = \"[CP] Copy Pods Resources\";\n- outputFileListPaths = (\n- );\noutputPaths = (\n\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/OnePasswordExtensionResources.bundle\",\n\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf\",\n/* Begin XCBuildConfiguration section */\n13B07F941A680F5B00A75B9A /* Debug */ = {\nisa = XCBuildConfiguration;\n- baseConfigurationReference = 0C7EDB01EA89B2CC28DB5C92 /* Pods-SquadCal.debug.xcconfig */;\n+ baseConfigurationReference = 8C0A50BD3E650F9A49DACD73 /* Pods-SquadCal.debug.xcconfig */;\nbuildSettings = {\nASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\nCODE_SIGN_ENTITLEMENTS = SquadCal/SquadCal.entitlements;\n};\n13B07F951A680F5B00A75B9A /* Release */ = {\nisa = XCBuildConfiguration;\n- baseConfigurationReference = 014977C8FB73A1BAFFC6A440 /* Pods-SquadCal.release.xcconfig */;\n+ baseConfigurationReference = 7EE5A7681B39319D3AF09109 /* Pods-SquadCal.release.xcconfig */;\nbuildSettings = {\nASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\nCODE_SIGN_ENTITLEMENTS = SquadCal/SquadCal.entitlements;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/SquadCal.xcodeproj/xcshareddata/xcschemes/SquadCal.xcscheme", "new_path": "native/ios/SquadCal.xcodeproj/xcshareddata/xcschemes/SquadCal.xcscheme", "diff": "buildForAnalyzing = \"YES\">\n<BuildableReference\nBuildableIdentifier = \"primary\"\n- BlueprintIdentifier = \"F3967460BD03277C6549D2DBC950CA28\"\n+ BlueprintIdentifier = \"EAB05A8BED2CAC923712E1C584AEB299\"\nBuildableName = \"libreact-native-keyboard-tracking-view.a\"\nBlueprintName = \"react-native-keyboard-tracking-view\"\nReferencedContainer = \"container:Pods/Pods.xcodeproj\">\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Update Podfile
129,187
07.08.2019 10:41:24
14,400
999321e6970b0c80b052a24574cdeb433a2ae27f
[native] Fix MultimediaModal fling interaction with reset
[ { "change_type": "MODIFY", "old_path": "native/media/multimedia-modal.react.js", "new_path": "native/media/multimedia-modal.react.js", "diff": "@@ -751,23 +751,29 @@ class MultimediaModal extends React.PureComponent<Props> {\nstopClock(flingYClock),\n],\n[\n- set(curX, recenteredX),\n- set(curY, recenteredY),\ncond(\n- or(\nclockRunning(resetXClock),\n+ stopClock(flingXClock),\n+ [\n+ set(curX, recenteredX),\n+ cond(\nneq(decayX, recenteredX),\n- ),\nstopClock(flingXClock),\n),\n+ ],\n+ ),\ncond(\n- or(\nclockRunning(resetYClock),\n+ stopClock(flingYClock),\n+ [\n+ set(curY, recenteredY),\n+ cond(\nneq(decayY, recenteredY),\n- ),\nstopClock(flingYClock),\n),\n],\n+ ),\n+ ],\n);\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Fix MultimediaModal fling interaction with reset
129,187
07.08.2019 14:31:15
14,400
c174538277bfed39e7dab505d0855ba773de8c2b
[native] Debounce updateCalendarQuery calls in Calendar
[ { "change_type": "MODIFY", "old_path": "native/calendar/calendar.react.js", "new_path": "native/calendar/calendar.react.js", "diff": "@@ -54,6 +54,7 @@ import _filter from 'lodash/fp/filter';\nimport _sum from 'lodash/fp/sum';\nimport _pickBy from 'lodash/fp/pickBy';\nimport _size from 'lodash/fp/size';\n+import _debounce from 'lodash/debounce';\nimport { entryKey } from 'lib/shared/entry-utils';\nimport { dateString, prettyDate, dateFromString } from 'lib/utils/date-utils';\n@@ -425,14 +426,14 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n) {\nif (this.topLoadingFromScroll) {\nif (this.topLoaderWaitingToLeaveView) {\n- this.dispatchCalendarQueryUpdate(this.topLoadingFromScroll);\n+ this.loadMoreAbove();\n} else {\nthis.topLoadingFromScroll = null;\n}\n}\nif (this.bottomLoadingFromScroll) {\nif (this.bottomLoaderWaitingToLeaveView) {\n- this.dispatchCalendarQueryUpdate(this.bottomLoadingFromScroll);\n+ this.loadMoreBelow();\n} else {\nthis.bottomLoadingFromScroll = null;\n}\n@@ -1040,7 +1041,7 @@ class InnerCalendar extends React.PureComponent<Props, State> {\nif (\ntopLoader &&\n!this.topLoaderWaitingToLeaveView &&\n- (!this.topLoadingFromScroll || this.props.loadingStatus === \"inactive\")\n+ !this.topLoadingFromScroll\n) {\nthis.topLoaderWaitingToLeaveView = true;\nconst start = dateFromString(this.props.startDate);\n@@ -1052,11 +1053,11 @@ class InnerCalendar extends React.PureComponent<Props, State> {\nendDate,\nfilters: this.props.calendarFilters,\n};\n- this.dispatchCalendarQueryUpdate(this.topLoadingFromScroll);\n+ this.loadMoreAbove();\n} else if (\nbottomLoader &&\n!this.bottomLoaderWaitingToLeaveView &&\n- (!this.bottomLoadingFromScroll || this.props.loadingStatus === \"inactive\")\n+ !this.bottomLoadingFromScroll\n) {\nthis.bottomLoaderWaitingToLeaveView = true;\nconst end = dateFromString(this.props.endDate);\n@@ -1068,7 +1069,7 @@ class InnerCalendar extends React.PureComponent<Props, State> {\nendDate,\nfilters: this.props.calendarFilters,\n};\n- this.dispatchCalendarQueryUpdate(this.bottomLoadingFromScroll);\n+ this.loadMoreBelow();\n}\n}\n@@ -1079,6 +1080,26 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n);\n}\n+ loadMoreAbove = _debounce(\n+ () => {\n+ if (this.topLoadingFromScroll) {\n+ this.dispatchCalendarQueryUpdate(this.topLoadingFromScroll);\n+ }\n+ },\n+ 1000,\n+ { leading: true, trailing: true },\n+ )\n+\n+ loadMoreBelow = _debounce(\n+ () => {\n+ if (this.bottomLoadingFromScroll) {\n+ this.dispatchCalendarQueryUpdate(this.bottomLoadingFromScroll);\n+ }\n+ },\n+ 1000,\n+ { leading: true, trailing: true },\n+ )\n+\nonScroll = (event: { nativeEvent: { contentOffset: { y: number } } }) => {\nthis.currentScrollPosition = event.nativeEvent.contentOffset.y;\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Debounce updateCalendarQuery calls in Calendar
129,187
07.08.2019 14:55:20
14,400
0c68e94d47a7ee04fdcb6dede01c82bc62d6a408
[native] Avoid retrying updateCalendarQuery in Calendar when disconnected
[ { "change_type": "MODIFY", "old_path": "native/calendar/calendar.react.js", "new_path": "native/calendar/calendar.react.js", "diff": "@@ -27,6 +27,10 @@ import {\ntype LoadingStatus,\nloadingStatusPropType,\n} from 'lib/types/loading-types';\n+import {\n+ type ConnectionStatus,\n+ connectionStatusPropType,\n+} from 'lib/types/socket-types';\nimport React from 'react';\nimport {\n@@ -133,6 +137,7 @@ type Props = {\ndimensions: Dimensions,\ncontentVerticalOffset: number,\nloadingStatus: LoadingStatus,\n+ connectionStatus: ConnectionStatus,\n// Redux dispatch functions\ndispatchActionPromise: DispatchActionPromise,\n// async functions that hit server APIs\n@@ -180,6 +185,7 @@ class InnerCalendar extends React.PureComponent<Props, State> {\ndimensions: dimensionsPropType.isRequired,\ncontentVerticalOffset: PropTypes.number.isRequired,\nloadingStatus: loadingStatusPropType.isRequired,\n+ connectionStatus: connectionStatusPropType.isRequired,\ndispatchActionPromise: PropTypes.func.isRequired,\nupdateCalendarQuery: PropTypes.func.isRequired,\n};\n@@ -420,24 +426,17 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n}\ncomponentDidUpdate(prevProps: Props, prevState: State) {\n+ const { loadingStatus, connectionStatus } = this.props;\n+ const {\n+ loadingStatus: prevLoadingStatus,\n+ connectionStatus: prevConnectionStatus,\n+ } = prevProps;\nif (\n- this.props.loadingStatus === \"error\" &&\n- prevProps.loadingStatus === \"loading\"\n+ (loadingStatus === \"error\" && prevLoadingStatus === \"loading\") ||\n+ (connectionStatus === \"connected\" && prevConnectionStatus !== \"connected\")\n) {\n- if (this.topLoadingFromScroll) {\n- if (this.topLoaderWaitingToLeaveView) {\nthis.loadMoreAbove();\n- } else {\n- this.topLoadingFromScroll = null;\n- }\n- }\n- if (this.bottomLoadingFromScroll) {\n- if (this.bottomLoaderWaitingToLeaveView) {\nthis.loadMoreBelow();\n- } else {\n- this.bottomLoadingFromScroll = null;\n- }\n- }\n}\nconst lastLDWH = prevState.listDataWithHeights;\n@@ -1019,11 +1018,13 @@ class InnerCalendar extends React.PureComponent<Props, State> {\nconst topLoader = _find({ key: \"TopLoader\" })(info.viewableItems);\nif (this.topLoaderWaitingToLeaveView && !topLoader) {\nthis.topLoaderWaitingToLeaveView = false;\n+ this.topLoadingFromScroll = null;\n}\nconst bottomLoader = _find({ key: \"BottomLoader\" })(info.viewableItems);\nif (this.bottomLoaderWaitingToLeaveView && !bottomLoader) {\nthis.bottomLoaderWaitingToLeaveView = false;\n+ this.bottomLoadingFromScroll = null;\n}\nif (\n@@ -1082,7 +1083,11 @@ class InnerCalendar extends React.PureComponent<Props, State> {\nloadMoreAbove = _debounce(\n() => {\n- if (this.topLoadingFromScroll) {\n+ if (\n+ this.topLoadingFromScroll &&\n+ this.topLoaderWaitingToLeaveView &&\n+ this.props.connectionStatus === \"connected\"\n+ ) {\nthis.dispatchCalendarQueryUpdate(this.topLoadingFromScroll);\n}\n},\n@@ -1092,7 +1097,11 @@ class InnerCalendar extends React.PureComponent<Props, State> {\nloadMoreBelow = _debounce(\n() => {\n- if (this.bottomLoadingFromScroll) {\n+ if (\n+ this.bottomLoadingFromScroll &&\n+ this.bottomLoaderWaitingToLeaveView &&\n+ this.props.connectionStatus === \"connected\"\n+ ) {\nthis.dispatchCalendarQueryUpdate(this.bottomLoadingFromScroll);\n}\n},\n@@ -1199,6 +1208,7 @@ const Calendar = connect(\ndimensions: dimensionsSelector(state),\ncontentVerticalOffset: contentVerticalOffsetSelector(state),\nloadingStatus: loadingStatusSelector(state),\n+ connectionStatus: state.connection.status,\n}),\n{ updateCalendarQuery },\n)(InnerCalendar);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Avoid retrying updateCalendarQuery in Calendar when disconnected
129,187
18.08.2019 12:44:24
25,200
2f529cfc68aee8654f88e41e1e5f41d57b41d4e2
[native] codeVersion -> 33
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -113,8 +113,8 @@ android {\napplicationId \"org.squadcal\"\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 32\n- versionName \"0.0.32\"\n+ versionCode 33\n+ versionName \"0.0.33\"\n}\nsplits {\nabi {\n" }, { "change_type": "MODIFY", "old_path": "native/ios/SquadCal/Info.plist", "new_path": "native/ios/SquadCal/Info.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.32</string>\n+ <string>0.0.33</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>32</string>\n+ <string>33</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/redux/persist.js", "new_path": "native/redux/persist.js", "diff": "@@ -142,7 +142,7 @@ const persistConfig = {\nmigrate: createMigrate(migrations, { debug: __DEV__ }),\n};\n-const codeVersion = 32;\n+const codeVersion = 33;\n// This local exists to avoid a circular dependency where redux-setup needs to\n// import all the navigation and screen stuff, but some of those screens want to\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] codeVersion -> 33
129,187
06.09.2019 11:27:17
25,200
c786f8d6ee3baa7130bfd47e816443e19227f502
[native] Add RCTVibration to iOS Podfile Necessary for `react-native-in-app-notification`
[ { "change_type": "MODIFY", "old_path": "native/ios/Podfile", "new_path": "native/ios/Podfile", "diff": "@@ -18,6 +18,7 @@ target 'SquadCal' do\n'RCTLinkingIOS',\n'RCTCameraRoll',\n'RCTBlob',\n+ 'RCTVibration',\n'ART',\n]\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Podfile.lock", "new_path": "native/ios/Podfile.lock", "diff": "@@ -86,6 +86,8 @@ PODS:\n- React/Core\n- React/RCTText (0.59.8):\n- React/Core\n+ - React/RCTVibration (0.59.8):\n+ - React/Core\n- React/RCTWebSocket (0.59.8):\n- React/Core\n- React/fishhook\n@@ -135,6 +137,7 @@ DEPENDENCIES:\n- React/RCTLinkingIOS (from `../../node_modules/react-native`)\n- React/RCTNetwork (from `../../node_modules/react-native`)\n- React/RCTText (from `../../node_modules/react-native`)\n+ - React/RCTVibration (from `../../node_modules/react-native`)\n- React/RCTWebSocket (from `../../node_modules/react-native`)\n- RNFS (from `../../node_modules/react-native-fs`)\n- RNGestureHandler (from `../../node_modules/react-native-gesture-handler`)\n@@ -231,6 +234,6 @@ SPEC CHECKSUMS:\nSDWebImage: 920f1a2ff1ca8296ad34f6e0510a1ef1d70ac965\nyoga: 92b2102c3d373d1a790db4ab761d2b0ffc634f64\n-PODFILE CHECKSUM: 17d86d8a0399fc6a4a1e2dd4da61fa4957bf418e\n+PODFILE CHECKSUM: d68660062797aa26dcc4ed29a68f784f9b0cefca\nCOCOAPODS: 1.7.5\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Add RCTVibration to iOS Podfile Necessary for `react-native-in-app-notification`
129,187
06.09.2019 11:28:45
25,200
1023b7bc615834ba51344c769cfc608c996c3010
[native] iOS codeVersion -> 34 Android doesn't need to be updated since this build is just to fix an iOS-specific bug
[ { "change_type": "MODIFY", "old_path": "native/ios/SquadCal/Info.plist", "new_path": "native/ios/SquadCal/Info.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>0.0.33</string>\n+ <string>0.0.34</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>33</string>\n+ <string>34</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/redux/persist.js", "new_path": "native/redux/persist.js", "diff": "@@ -142,7 +142,7 @@ const persistConfig = {\nmigrate: createMigrate(migrations, { debug: __DEV__ }),\n};\n-const codeVersion = 33;\n+const codeVersion = 34;\n// This local exists to avoid a circular dependency where redux-setup needs to\n// import all the navigation and screen stuff, but some of those screens want to\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] iOS codeVersion -> 34 Android doesn't need to be updated since this build is just to fix an iOS-specific bug
129,187
06.09.2019 19:26:07
25,200
b81a134072d8ea274668a6f2dd34c5afabb487f4
[server] geoip-lite and update db on deploy
[ { "change_type": "MODIFY", "old_path": "server/package.json", "new_path": "server/package.json", "diff": "\"scripts\": {\n\"babel\": \"babel src/ --out-dir dist/ --config-file ./.babelrc --verbose --ignore 'src/lib/flow-typed','src/lib/node_modules','src/lib/package.json','src/web/flow-typed','src/web/node_modules','src/web/package.json','src/web/dist/hot','src/web/dist/dev.build.js','src/web/dist/*.build.js','src/web/webpack.config.js','src/web/account-bar.react.js','src/web/app.react.js','src/web/calendar','src/web/chat','src/web/flow','src/web/loading-indicator.react.js','src/web/modals','src/web/root.js','src/web/router-history.js','src/web/script.js','src/web/selectors/chat-selectors.js','src/web/selectors/entry-selectors.js','src/web/splash','src/web/vector-utils.js','src/web/vectors.react.js'\",\n\"rsync\": \"rsync -rLpmuv --exclude '*/package.json' --exclude '*/node_modules/*' --exclude '*/hot/*' --include '*.json' --include '*.build' --exclude '*.*' src/ dist/\",\n- \"prod-build\": \"npm run babel && npm run rsync\",\n+ \"prod-build\": \"npm run babel && npm run rsync && npm run update-geoip\",\n+ \"update-geoip\": \"cd ../node_modules/geoip-lite && npm run updatedb\",\n\"prod\": \"node --experimental-modules --loader ./loader.mjs dist/server\",\n\"dev-rsync\": \"chokidar -s 'src/**/*.json' 'src/**/*.build' -c 'npm run rsync' > /dev/null 2>&1\",\n\"dev\": \"NODE_ENV=dev concurrently \\\"npm run babel -- --watch\\\" \\\"npm run dev-rsync\\\" \\\"nodemon -e js,json,build --watch dist --experimental-modules --loader ./loader.mjs dist/server\\\"\",\n\"express\": \"^4.16.2\",\n\"express-ws\": \"^4.0.0\",\n\"firebase-admin\": \"^6.5.1\",\n+ \"geoip-lite\": \"^1.3.8\",\n\"invariant\": \"^2.2.2\",\n\"lib\": \"0.0.1\",\n\"lodash\": \"^4.17.5\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -2459,6 +2459,13 @@ async@^2.0.1, async@^2.3.0, async@^2.4.0:\ndependencies:\nlodash \"^4.17.10\"\n+async@^2.1.1:\n+ version \"2.6.3\"\n+ resolved \"https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff\"\n+ integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==\n+ dependencies:\n+ lodash \"^4.17.14\"\n+\nasynckit@^0.4.0:\nversion \"0.4.0\"\nresolved \"https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79\"\n@@ -2939,7 +2946,7 @@ buffer-alloc@^1.2.0:\nbuffer-alloc-unsafe \"^1.1.0\"\nbuffer-fill \"^1.0.0\"\n-buffer-crc32@^0.2.13:\n+buffer-crc32@^0.2.13, buffer-crc32@~0.2.3:\nversion \"0.2.13\"\nresolved \"https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242\"\nintegrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=\n@@ -5088,6 +5095,13 @@ fd-slicer@~1.0.1:\ndependencies:\npend \"~1.2.0\"\n+fd-slicer@~1.1.0:\n+ version \"1.1.0\"\n+ resolved \"https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e\"\n+ integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=\n+ dependencies:\n+ pend \"~1.2.0\"\n+\nfiggy-pudding@^3.5.1:\nversion \"3.5.1\"\nresolved \"https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790\"\n@@ -5548,6 +5562,19 @@ generate-function@^2.0.0:\ndependencies:\nis-property \"^1.0.2\"\n+geoip-lite@^1.3.8:\n+ version \"1.3.8\"\n+ resolved \"https://registry.yarnpkg.com/geoip-lite/-/geoip-lite-1.3.8.tgz#f065424f338faaf85e0016ec93c25fd1bb97f611\"\n+ integrity sha512-K0YNaQlHRjdLymVfDr47UEy+NTw40WLVmaAKy8lCzIrwWvuS764ZeIDlDofdApFWVbwU3HgJoU4oSIJvsA09bg==\n+ dependencies:\n+ async \"^2.1.1\"\n+ colors \"^1.1.2\"\n+ iconv-lite \"^0.4.13\"\n+ ip-address \"^5.8.9\"\n+ lazy \"^1.0.11\"\n+ rimraf \"^2.5.2\"\n+ yauzl \"^2.9.2\"\n+\nget-caller-file@^1.0.1:\nversion \"1.0.3\"\nresolved \"https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a\"\n@@ -6149,7 +6176,7 @@ iconv-lite@0.4.23:\ndependencies:\nsafer-buffer \">= 2.1.2 < 3\"\n-iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.18, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13:\n+iconv-lite@0.4.24, iconv-lite@^0.4.13, iconv-lite@^0.4.17, iconv-lite@^0.4.18, iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13:\nversion \"0.4.24\"\nresolved \"https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b\"\nintegrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==\n@@ -6330,6 +6357,15 @@ invert-kv@^2.0.0:\nresolved \"https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02\"\nintegrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==\n+ip-address@^5.8.9:\n+ version \"5.9.4\"\n+ resolved \"https://registry.yarnpkg.com/ip-address/-/ip-address-5.9.4.tgz#4660ac261ad61bd397a860a007f7e98e4eaee386\"\n+ integrity sha512-dHkI3/YNJq4b/qQaz+c8LuarD3pY24JqZWfjB8aZx1gtpc2MDILu9L9jpZe1sHpzo/yWFweQVn+U//FhazUxmw==\n+ dependencies:\n+ jsbn \"1.1.0\"\n+ lodash \"^4.17.15\"\n+ sprintf-js \"1.1.2\"\n+\nip-regex@^2.1.0:\nversion \"2.1.0\"\nresolved \"https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9\"\n@@ -7273,6 +7309,11 @@ js-yaml@~3.7.0:\nargparse \"^1.0.7\"\nesprima \"^2.6.0\"\n+jsbn@1.1.0:\n+ version \"1.1.0\"\n+ resolved \"https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040\"\n+ integrity sha1-sBMHyym2GKHtJux56RH4A8TaAEA=\n+\njsbn@~0.1.0:\nversion \"0.1.1\"\nresolved \"https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513\"\n@@ -7519,6 +7560,11 @@ latest-version@^3.0.0:\ndependencies:\npackage-json \"^4.0.0\"\n+lazy@^1.0.11:\n+ version \"1.0.11\"\n+ resolved \"https://registry.yarnpkg.com/lazy/-/lazy-1.0.11.tgz#daa068206282542c088288e975c297c1ae77b690\"\n+ integrity sha1-2qBoIGKCVCwIgojpdcKXwa53tpA=\n+\nlcid@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835\"\n@@ -7756,7 +7802,7 @@ lodash@^4.0.0, lodash@^4.0.1, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11,\nresolved \"https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d\"\nintegrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==\n-lodash@^4.17.13:\n+lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15:\nversion \"4.17.15\"\nresolved \"https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548\"\nintegrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==\n@@ -11612,6 +11658,13 @@ rimraf@2, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2:\ndependencies:\nglob \"^7.0.5\"\n+rimraf@^2.5.2:\n+ version \"2.7.1\"\n+ resolved \"https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec\"\n+ integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==\n+ dependencies:\n+ glob \"^7.1.3\"\n+\nrimraf@^2.6.3:\nversion \"2.6.3\"\nresolved \"https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab\"\n@@ -12244,6 +12297,11 @@ split-string@^3.0.1, split-string@^3.0.2:\ndependencies:\nextend-shallow \"^3.0.0\"\n+sprintf-js@1.1.2:\n+ version \"1.1.2\"\n+ resolved \"https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673\"\n+ integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==\n+\nsprintf-js@~1.0.2:\nversion \"1.0.3\"\nresolved \"https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c\"\n@@ -13931,3 +13989,11 @@ yauzl@2.4.1:\nintegrity sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=\ndependencies:\nfd-slicer \"~1.0.1\"\n+\n+yauzl@^2.9.2:\n+ version \"2.10.0\"\n+ resolved \"https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9\"\n+ integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=\n+ dependencies:\n+ buffer-crc32 \"~0.2.3\"\n+ fd-slicer \"~1.1.0\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] geoip-lite and update db on deploy
129,187
11.09.2019 18:04:29
14,400
98b366446c3bd4bcee71abfb06cf15f3aed2168b
[server] Add ipAddress property to Viewer
[ { "change_type": "MODIFY", "old_path": "server/src/session/cookies.js", "new_path": "server/src/session/cookies.js", "diff": "@@ -23,6 +23,7 @@ import type { InitialClientSocketMessage } from 'lib/types/socket-types';\nimport bcrypt from 'twin-bcrypt';\nimport url from 'url';\nimport crypto from 'crypto';\n+import invariant from 'invariant';\nimport { ServerError } from 'lib/utils/errors';\nimport { values } from 'lib/utils/objects';\n@@ -48,6 +49,7 @@ type SessionParameterInfo = {|\nisSocket: bool,\nsessionID: ?string,\nsessionIdentifierType: SessionIdentifierType,\n+ ipAddress: string,\n|};\ntype FetchViewerResult =\n@@ -151,6 +153,7 @@ async function fetchUserViewer(\nsessionID,\nsessionInfo,\nisScriptViewer: false,\n+ ipAddress: sessionParameterInfo.ipAddress,\n});\nreturn { type: \"valid\", viewer };\n}\n@@ -233,6 +236,7 @@ async function fetchAnonymousViewer(\nsessionID,\nsessionInfo,\nisScriptViewer: false,\n+ ipAddress: sessionParameterInfo.ipAddress,\n});\nreturn { type: \"valid\", viewer };\n}\n@@ -360,7 +364,9 @@ function getSessionParameterInfoFromRequestBody(\nconst sessionIdentifierType = req.method === \"GET\" || sessionID !== undefined\n? sessionIdentifierTypes.BODY_SESSION_ID\n: sessionIdentifierTypes.COOKIE_ID;\n- return { isSocket: false, sessionID, sessionIdentifierType };\n+ const ipAddress = req.get(\"X-Forwarded-For\");\n+ invariant(ipAddress, \"X-Forwarded-For header missing\");\n+ return { isSocket: false, sessionID, sessionIdentifierType, ipAddress };\n}\nasync function fetchViewerForJSONRequest(req: $Request): Promise<Viewer> {\n@@ -391,12 +397,15 @@ async function fetchViewerForSocket(\nassertSecureRequest(req);\nconst { sessionIdentification } = clientMessage.payload;\nconst { sessionID } = sessionIdentification;\n+ const ipAddress = req.get(\"X-Forwarded-For\");\n+ invariant(ipAddress, \"X-Forwarded-For header missing\");\nconst sessionParameterInfo = {\nisSocket: true,\nsessionID,\nsessionIdentifierType: sessionID !== undefined\n? sessionIdentifierTypes.BODY_SESSION_ID\n: sessionIdentifierTypes.COOKIE_ID,\n+ ipAddress,\n};\nlet result = await fetchViewerFromRequestBody(\n@@ -484,6 +493,7 @@ function createViewerForInvalidFetchViewerResult(\ncookieSource,\nsessionIdentifierType: result.sessionParameterInfo.sessionIdentifierType,\nisSocket: result.sessionParameterInfo.isSocket,\n+ ipAddress: result.sessionParameterInfo.ipAddress,\n});\nviewer.sessionChanged = true;\n@@ -542,13 +552,13 @@ type CookieCreationParams = $Shape<{|\n|}>;\nconst defaultPlatformDetails = {};\n-// The AnonymousViewerData returned by this function...\n-// (1) Does not specify a sessionIdentifierType. This will cause an exception\n-// if passed directly to the Viewer constructor, so the caller should set it\n-// before doing so.\n-// (2) Does not specify a cookieSource. This will cause an exception if passed\n-// directly to the Viewer constructor, so the caller should set it before\n-// doing so.\n+// The result of this function should not be passed directly to the Viewer\n+// constructor. Instead, it should be passed to viewer.setNewCookie. There are\n+// several fields on AnonymousViewerData that are not set by this function:\n+// sessionIdentifierType, cookieSource, and ipAddress. These parameters all\n+// depend on the initial request. If the result of this function is passed to\n+// the Viewer constructor directly, the resultant Viewer object will throw\n+// whenever anybody attempts to access the relevant properties.\nasync function createNewAnonymousCookie(\nparams: CookieCreationParams,\n): Promise<AnonymousViewerData> {\n@@ -596,16 +606,13 @@ async function createNewAnonymousCookie(\n};\n}\n-// The UserViewerData returned by this function...\n-// (1) Will always have an undefined sessionID. If the caller wants the response\n-// body to specify a sessionID, they need to call setSessionID on Viewer.\n-// (2) Does not specify a sessionIdentifierType. Currently this function is only\n-// ever called with the intent of passing its return value to setNewCookie,\n-// which means it will inherit the earlier value of sessionIdentifierType\n-// and won't throw an exception, as it would if passed directly to the\n-// Viewer constructor.\n-// (3) Does not specify a cookieSource. Same as (2), this only works because the\n-// result is never passed directly to the Viewer constructor.\n+// The result of this function should never be passed directly to the Viewer\n+// constructor. Instead, it should be passed to viewer.setNewCookie. There are\n+// several fields on UserViewerData that are not set by this function:\n+// sessionID, sessionIdentifierType, cookieSource, and ipAddress. These\n+// parameters all depend on the initial request. If the result of this function\n+// is passed to the Viewer constructor directly, the resultant Viewer object\n+// will throw whenever anybody attempts to access the relevant properties.\nasync function createNewUserCookie(\nuserID: string,\nparams: CookieCreationParams,\n" }, { "change_type": "MODIFY", "old_path": "server/src/session/viewer.js", "new_path": "server/src/session/viewer.js", "diff": "@@ -28,6 +28,7 @@ export type UserViewerData = {|\n+sessionInfo: ?SessionInfo,\n+isScriptViewer: bool,\n+isSocket?: bool,\n+ +ipAddress?: string,\n|};\nexport type AnonymousViewerData = {|\n@@ -44,6 +45,7 @@ export type AnonymousViewerData = {|\n+sessionInfo: ?SessionInfo,\n+isScriptViewer: bool,\n+isSocket?: bool,\n+ +ipAddress?: string,\n|};\ntype SessionInfo = {|\n@@ -103,6 +105,14 @@ class Viewer {\ndata = { ...data, isSocket: this.isSocket };\n}\n}\n+ if (data.ipAddress === null || data.ipAddress === undefined) {\n+ if (data.loggedIn) {\n+ data = { ...data, ipAddress: this.ipAddress };\n+ } else {\n+ // This is a separate condition because of Flow\n+ data = { ...data, ipAddress: this.ipAddress };\n+ }\n+ }\nthis.data = data;\nthis.sessionChanged = true;\n@@ -285,6 +295,14 @@ class Viewer {\nreturn this.data.isSocket;\n}\n+ get ipAddress(): string {\n+ invariant(\n+ this.data.ipAddress !== null && this.data.ipAddress !== undefined,\n+ \"ipAddress should be set\",\n+ );\n+ return this.data.ipAddress;\n+ }\n+\n}\nexport {\n" }, { "change_type": "MODIFY", "old_path": "server/src/socket/socket.js", "new_path": "server/src/socket/socket.js", "diff": "@@ -298,6 +298,13 @@ class Socket {\nmessage: error.message,\n}\nif (anonymousViewerData) {\n+ // It is normally not safe to pass the result of\n+ // createNewAnonymousCookie to the Viewer constructor. That is because\n+ // createNewAnonymousCookie leaves several fields of\n+ // AnonymousViewerData unset, and consequently Viewer will throw when\n+ // access is attempted. It is only safe here because we can guarantee\n+ // that only cookiePairString and cookieID are accessed on anonViewer\n+ // below.\nconst anonViewer = new Viewer(anonymousViewerData);\nauthErrorMessage.sessionChange = {\ncookie: anonViewer.cookiePairString,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Add ipAddress property to Viewer
129,187
11.09.2019 18:13:55
14,400
66c785360e14f4f30f3626ac06e6ccbf5d177be2
[server] Use geoip-lite to look up time zone from IP address
[ { "change_type": "MODIFY", "old_path": "server/src/session/viewer.js", "new_path": "server/src/session/viewer.js", "diff": "@@ -10,6 +10,7 @@ import type { Platform, PlatformDetails } from 'lib/types/device-types';\nimport type { CalendarQuery } from 'lib/types/entry-types';\nimport invariant from 'invariant';\n+import geoip from 'geoip-lite';\nimport { ServerError } from 'lib/utils/errors';\n@@ -61,6 +62,7 @@ class Viewer {\nsessionChanged = false;\ncookieInvalidated = false;\ninitialCookieName: string;\n+ cachedTimeZone: ?string;\nconstructor(data: ViewerData) {\nthis.data = data;\n@@ -112,6 +114,8 @@ class Viewer {\n// This is a separate condition because of Flow\ndata = { ...data, ipAddress: this.ipAddress };\n}\n+ } else {\n+ this.cachedTimeZone = undefined;\n}\nthis.data = data;\n@@ -303,6 +307,14 @@ class Viewer {\nreturn this.data.ipAddress;\n}\n+ get timeZone(): ?string {\n+ if (this.cachedTimeZone === undefined) {\n+ const geoData = geoip.lookup(this.ipAddress);\n+ this.cachedTimeZone = geoData ? geoData.timezone : null;\n+ }\n+ return this.cachedTimeZone;\n+ }\n+\n}\nexport {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Use geoip-lite to look up time zone from IP address
129,187
11.09.2019 19:34:18
14,400
484b679daba99c8a2bd0c15f543a6ed34ca224c0
Consider time zone when calculating current date
[ { "change_type": "MODIFY", "old_path": "lib/selectors/nav-selectors.js", "new_path": "lib/selectors/nav-selectors.js", "diff": "import type { BaseAppState } from '../types/redux-types';\nimport type { BaseNavInfo } from '../types/nav-types';\nimport type { RawThreadInfo } from '../types/thread-types';\n-import type { CalendarQuery } from '../types/entry-types';\n+import { type CalendarQuery, defaultCalendarQuery } from '../types/entry-types';\nimport type { UserInfo } from '../types/user-types';\nimport type { CalendarFilter } from '../types/filter-types';\n+import type { Platform } from '../types/device-types';\nimport { createSelector } from 'reselect';\nimport _some from 'lodash/fp/some';\nimport { threadPermissions } from '../types/thread-types';\n-import { fifteenDaysEarlier, fifteenDaysLater } from '../utils/date-utils';\nimport { getConfig } from '../utils/config';\nimport SearchIndex from '../shared/search-index';\nimport { threadHasPermission, viewerIsMember } from '../shared/thread-utils';\n@@ -36,26 +36,6 @@ function calendarRangeExpired(lastUserInteractionCalendar: number): bool {\nreturn timeUntil <= 0;\n}\n-function currentStartDate(\n- lastUserInteractionCalendar: number,\n- startDate: string,\n-): string {\n- if (!calendarRangeExpired(lastUserInteractionCalendar)) {\n- return startDate;\n- }\n- return fifteenDaysEarlier();\n-}\n-\n-function currentEndDate(\n- lastUserInteractionCalendar: number,\n- endDate: string,\n-): string {\n- if (!calendarRangeExpired(lastUserInteractionCalendar)) {\n- return endDate;\n- }\n- return fifteenDaysLater();\n-}\n-\nconst currentCalendarQuery: (\nstate: BaseAppState<*>,\n) => (calendarActive: bool) => CalendarQuery = createSelector(\n@@ -68,7 +48,10 @@ const currentCalendarQuery: (\ncalendarFilters: $ReadOnlyArray<CalendarFilter>,\n) => {\n// Return a function since we depend on the time of evaluation\n- return (calendarActive: bool): CalendarQuery => {\n+ return (\n+ calendarActive: bool,\n+ platform: ?Platform,\n+ ): CalendarQuery => {\nif (calendarActive) {\nreturn {\nstartDate: navInfo.startDate,\n@@ -76,12 +59,12 @@ const currentCalendarQuery: (\nfilters: calendarFilters,\n};\n}\n+ if (calendarRangeExpired(lastUserInteractionCalendar)) {\n+ return defaultCalendarQuery(platform);\n+ }\nreturn {\n- startDate: currentStartDate(\n- lastUserInteractionCalendar,\n- navInfo.startDate,\n- ),\n- endDate: currentEndDate(lastUserInteractionCalendar, navInfo.endDate),\n+ startDate: navInfo.startDate,\n+ endDate: navInfo.endDate,\nfilters: calendarFilters,\n};\n};\n" }, { "change_type": "MODIFY", "old_path": "lib/types/entry-types.js", "new_path": "lib/types/entry-types.js", "diff": "@@ -13,8 +13,11 @@ import type { Platform } from './device-types';\nimport PropTypes from 'prop-types';\n-import { fifteenDaysEarlier, fifteenDaysLater } from '../utils/date-utils';\n-import { thisMonthDates } from '../utils/date-utils';\n+import {\n+ fifteenDaysEarlier,\n+ fifteenDaysLater,\n+ thisMonthDates,\n+} from '../utils/date-utils';\nexport type RawEntryInfo = {|\nid?: string, // null if local copy without ID yet\n@@ -82,16 +85,19 @@ export type CalendarQuery = {|\nfilters: $ReadOnlyArray<CalendarFilter>,\n|};\n-export const defaultCalendarQuery = (platform: ?Platform) => {\n+export const defaultCalendarQuery = (\n+ platform: ?Platform,\n+ timeZone?: ?string,\n+) => {\nif (platform === \"web\") {\nreturn {\n- ...thisMonthDates(),\n+ ...thisMonthDates(timeZone),\nfilters: defaultCalendarFilters,\n};\n} else {\nreturn {\n- startDate: fifteenDaysEarlier().valueOf(),\n- endDate: fifteenDaysLater().valueOf(),\n+ startDate: fifteenDaysEarlier(timeZone).valueOf(),\n+ endDate: fifteenDaysLater(timeZone).valueOf(),\nfilters: defaultCalendarFilters,\n};\n}\n" }, { "change_type": "MODIFY", "old_path": "lib/types/socket-types.js", "new_path": "lib/types/socket-types.js", "diff": "@@ -292,10 +292,13 @@ export const connectionInfoPropType = PropTypes.shape({\nlateResponses: PropTypes.arrayOf(PropTypes.number).isRequired,\nshowDisconnectedBar: PropTypes.bool.isRequired,\n});\n-export const defaultConnectionInfo = (platform: Platform) => ({\n+export const defaultConnectionInfo = (\n+ platform: Platform,\n+ timeZone?: ?string,\n+) => ({\nstatus: \"connecting\",\nqueuedActivityUpdates: [],\n- actualizedCalendarQuery: defaultCalendarQuery(platform),\n+ actualizedCalendarQuery: defaultCalendarQuery(platform, timeZone),\nlateResponses: [],\nshowDisconnectedBar: false,\n});\n" }, { "change_type": "MODIFY", "old_path": "lib/utils/date-utils.js", "new_path": "lib/utils/date-utils.js", "diff": "@@ -51,14 +51,14 @@ function endDateForYearAndMonth(year: number, month: number) {\nreturn dateString(year, month, daysInMonth(year, month));\n}\n-function fifteenDaysEarlier() {\n- const fifteenDaysEarlier = new Date();\n+function fifteenDaysEarlier(timeZone?: ?string) {\n+ const fifteenDaysEarlier = currentDateInTimeZone(timeZone);\nfifteenDaysEarlier.setDate(fifteenDaysEarlier.getDate() - 15);\nreturn dateString(fifteenDaysEarlier);\n}\n-function fifteenDaysLater() {\n- const fifteenDaysLater = new Date();\n+function fifteenDaysLater(timeZone?: ?string) {\n+ const fifteenDaysLater = currentDateInTimeZone(timeZone);\nfifteenDaysLater.setDate(fifteenDaysLater.getDate() + 15);\nreturn dateString(fifteenDaysLater);\n}\n@@ -111,15 +111,33 @@ function longAbsoluteDate(timestamp: number) {\n}\n}\n-function thisMonthDates(): {| startDate: string, endDate: string |} {\n- const year = (new Date()).getFullYear();\n- const month = (new Date()).getMonth() + 1;\n+function thisMonthDates(\n+ timeZone?: ?string,\n+): {| startDate: string, endDate: string |} {\n+ const now = currentDateInTimeZone(timeZone);\n+ const year = now.getFullYear();\n+ const month = now.getMonth() + 1;\nreturn {\nstartDate: startDateForYearAndMonth(year, month),\nendDate: endDateForYearAndMonth(year, month),\n};\n}\n+// The Date object doesn't support time zones, and is hardcoded to the server's\n+// time zone. Thus, the best way to convert Date between time zones is to offset\n+// the Date by the difference between the time zones\n+function changeTimeZone(date: Date, timeZone: string): Date {\n+ const localeString = date.toLocaleString('en-US', { timeZone });\n+ const localeDate = new Date(localeString);\n+ const diff = localeDate.getTime() - date.getTime();\n+ return new Date(date.getTime() + diff);\n+}\n+\n+function currentDateInTimeZone(timeZone: ?string): Date {\n+ const localTime = new Date();\n+ return timeZone ? changeTimeZone(localTime, timeZone) : localTime;\n+}\n+\nexport {\ngetDate,\npadMonthOrDay,\n@@ -133,4 +151,5 @@ export {\nshortAbsoluteDate,\nlongAbsoluteDate,\nthisMonthDates,\n+ currentDateInTimeZone,\n}\n" }, { "change_type": "MODIFY", "old_path": "server/src/creators/update-creator.js", "new_path": "server/src/creators/update-creator.js", "diff": "@@ -397,6 +397,8 @@ async function fetchUpdateInfosWithRawUpdateInfos(\nrawUpdateInfos: $ReadOnlyArray<RawUpdateInfo>,\nviewerInfo: ViewerInfo,\n): Promise<FetchUpdatesResult> {\n+ const { viewer } = viewerInfo;\n+\nconst threadIDsNeedingFetch = new Set();\nconst entryIDsNeedingFetch = new Set();\nconst currentUserIDsNeedingFetch = new Set();\n@@ -414,7 +416,7 @@ async function fetchUpdateInfosWithRawUpdateInfos(\n} else if (rawUpdateInfo.type === updateTypes.UPDATE_ENTRY) {\nentryIDsNeedingFetch.add(rawUpdateInfo.entryID);\n} else if (rawUpdateInfo.type === updateTypes.UPDATE_CURRENT_USER) {\n- currentUserIDsNeedingFetch.add(viewerInfo.viewer.userID);\n+ currentUserIDsNeedingFetch.add(viewer.userID);\n}\n}\n@@ -422,7 +424,7 @@ async function fetchUpdateInfosWithRawUpdateInfos(\nif (!viewerInfo.threadInfos && threadIDsNeedingFetch.size > 0) {\npromises.threadResult = fetchThreadInfos(\n- viewerInfo.viewer,\n+ viewer,\nSQL`t.id IN (${[...threadIDsNeedingFetch]})`,\n);\n}\n@@ -430,13 +432,13 @@ async function fetchUpdateInfosWithRawUpdateInfos(\nlet calendarQuery: ?CalendarQuery = viewerInfo.calendarQuery\n? viewerInfo.calendarQuery\n: null;\n- if (!calendarQuery && viewerInfo.viewer.hasSessionInfo) {\n+ if (!calendarQuery && viewer.hasSessionInfo) {\n// This should only ever happen for \"legacy\" clients who call in without\n// providing this information. These clients wouldn't know how to deal with\n// the corresponding UpdateInfos anyways, so no reason to be worried.\n- calendarQuery = viewerInfo.viewer.calendarQuery;\n+ calendarQuery = viewer.calendarQuery;\n} else if (!calendarQuery) {\n- calendarQuery = defaultCalendarQuery(viewerInfo.viewer.platform);\n+ calendarQuery = defaultCalendarQuery(viewer.platform, viewer.timeZone);\n}\nif (threadIDsNeedingDetailedFetch.size > 0) {\nconst threadSelectionCriteria = { threadCursors: {} };\n@@ -444,7 +446,7 @@ async function fetchUpdateInfosWithRawUpdateInfos(\nthreadSelectionCriteria.threadCursors[threadID] = false;\n}\npromises.messageInfosResult = fetchMessageInfos(\n- viewerInfo.viewer,\n+ viewer,\nthreadSelectionCriteria,\ndefaultNumberPerThread,\n);\n@@ -456,14 +458,14 @@ async function fetchUpdateInfosWithRawUpdateInfos(\n],\n};\npromises.calendarResult = fetchEntryInfos(\n- viewerInfo.viewer,\n+ viewer,\n[ threadCalendarQuery ],\n);\n}\nif (entryIDsNeedingFetch.size > 0) {\npromises.entryInfosResult = fetchEntryInfosByID(\n- viewerInfo.viewer,\n+ viewer,\n[...entryIDsNeedingFetch],\n);\n}\n@@ -493,7 +495,7 @@ async function fetchUpdateInfosWithRawUpdateInfos(\n}\nreturn await updateInfosFromRawUpdateInfos(\n- viewerInfo.viewer,\n+ viewer,\nrawUpdateInfos,\n{\nthreadInfosResult,\n" }, { "change_type": "MODIFY", "old_path": "server/src/responders/website-responders.js", "new_path": "server/src/responders/website-responders.js", "diff": "@@ -20,6 +20,7 @@ import { ServerError } from 'lib/utils/errors';\nimport {\nstartDateForYearAndMonth,\nendDateForYearAndMonth,\n+ currentDateInTimeZone,\n} from 'lib/utils/date-utils';\nimport { defaultNumberPerThread } from 'lib/types/message-types';\nimport { daysToEntriesFromEntryInfos } from 'lib/reducers/entry-reducer';\n@@ -55,7 +56,10 @@ const { reducer } = ReduxSetup;\nasync function websiteResponder(viewer: Viewer, url: string): Promise<string> {\nlet navInfo;\ntry {\n- navInfo = navInfoFromURL(url);\n+ navInfo = navInfoFromURL(\n+ url,\n+ { now: currentDateInTimeZone(viewer.timeZone) },\n+ );\n} catch (e) {\nthrow new ServerError(e.message);\n}\n@@ -147,7 +151,7 @@ async function websiteResponder(viewer: Viewer, url: string): Promise<string> {\nwindowDimensions: { width: 0, height: 0 },\nbaseHref: baseDomain + baseURL,\nconnection: {\n- ...defaultConnectionInfo(\"web\"),\n+ ...defaultConnectionInfo(\"web\", viewer.timeZone),\nactualizedCalendarQuery: calendarQuery,\n},\nwatchedThreadIDs: [],\n" }, { "change_type": "MODIFY", "old_path": "server/src/updaters/entry-updaters.js", "new_path": "server/src/updaters/entry-updaters.js", "diff": "@@ -211,7 +211,7 @@ async function createUpdateDatasForChangedEntryInfo(\n// the corresponding UpdateInfos anyways, so no reason to be worried.\ncalendarQuery = viewer.calendarQuery;\n} else {\n- calendarQuery = defaultCalendarQuery(viewer.platform);\n+ calendarQuery = defaultCalendarQuery(viewer.platform, viewer.timeZone);\n}\nlet replaced = null;\n" }, { "change_type": "MODIFY", "old_path": "web/app.react.js", "new_path": "web/app.react.js", "diff": "@@ -185,7 +185,7 @@ class App extends React.PureComponent<Props, State> {\nif (nextProps.location.pathname !== this.props.location.pathname) {\nconst newNavInfo = navInfoFromURL(\nnextProps.location.pathname,\n- nextProps.navInfo,\n+ { navInfo: nextProps.navInfo },\n);\nif (!_isEqual(newNavInfo)(nextProps.navInfo)) {\nthis.props.dispatchActionPayload(updateNavInfoActionType, newNavInfo);\n" }, { "change_type": "MODIFY", "old_path": "web/url-utils.js", "new_path": "web/url-utils.js", "diff": "@@ -67,16 +67,18 @@ function canonicalURLFromReduxState(navInfo: NavInfo, currentURL: string) {\n// default if they are unspecified.\nfunction navInfoFromURL(\nurl: string,\n- navInfo?: NavInfo,\n+ backupInfo: {| now?: Date, navInfo?: NavInfo |},\n): NavInfo {\nconst urlInfo = infoFromURL(url);\n+ const { navInfo } = backupInfo;\n+ const now = backupInfo.now ? backupInfo.now : new Date();\nlet year = urlInfo.year;\nif (!year && navInfo) {\nyear = yearExtractor(navInfo.startDate, navInfo.endDate);\n}\nif (!year) {\n- year = (new Date()).getFullYear();\n+ year = now.getFullYear();\n}\nlet month = urlInfo.month;\n@@ -84,7 +86,7 @@ function navInfoFromURL(\nmonth = monthExtractor(navInfo.startDate, navInfo.endDate);\n}\nif (!month) {\n- month = (new Date()).getMonth() + 1;\n+ month = now.getMonth() + 1;\n}\nlet activeChatThreadID = null;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Consider time zone when calculating current date
129,187
11.09.2019 19:45:10
14,400
aa3534820c85b1ac615b68b0fa10ed38627d5363
Determine the current Day using local time zone
[ { "change_type": "MODIFY", "old_path": "server/src/responders/website-responders.js", "new_path": "server/src/responders/website-responders.js", "diff": "@@ -157,6 +157,7 @@ async function websiteResponder(viewer: Viewer, url: string): Promise<string> {\nwatchedThreadIDs: [],\nforeground: true,\nnextLocalID: 0,\n+ timeZone: viewer.timeZone,\n}: AppState),\n);\nconst routerContext = {};\n@@ -178,7 +179,9 @@ async function websiteResponder(viewer: Viewer, url: string): Promise<string> {\n}\nconst state = store.getState();\n- const stringifiedState = JSON.stringify(state).replace(/</g, '\\\\u003c');\n+ const filteredState = { ...state, timeZone: null };\n+ const stringifiedState =\n+ JSON.stringify(filteredState).replace(/</g, '\\\\u003c');\nconst fontsURL = process.env.NODE_ENV === \"dev\"\n? \"fonts/local-fonts.css\"\n" }, { "change_type": "MODIFY", "old_path": "web/calendar/day.react.js", "new_path": "web/calendar/day.react.js", "diff": "@@ -19,7 +19,11 @@ import {\ncreateLocalEntry,\ncreateLocalEntryActionType,\n} from 'lib/actions/entry-actions';\n-import { dateString, dateFromString } from 'lib/utils/date-utils'\n+import {\n+ dateString,\n+ dateFromString,\n+ currentDateInTimeZone,\n+} from 'lib/utils/date-utils'\nimport { connect } from 'lib/utils/redux-utils';\nimport css from './calendar.css';\n@@ -40,6 +44,7 @@ type Props = {\nviewerID: ?string,\nloggedIn: bool,\nnextLocalID: number,\n+ timeZone: ?string,\n// Redux dispatch functions\ndispatchActionPayload: (actionType: string, payload: *) => void,\n};\n@@ -48,9 +53,20 @@ type State = {\nhovered: bool,\nmounted: bool,\n};\n-\nclass Day extends React.PureComponent<Props, State> {\n+ static propTypes = {\n+ dayString: PropTypes.string.isRequired,\n+ entryInfos: PropTypes.arrayOf(entryInfoPropType).isRequired,\n+ setModal: PropTypes.func.isRequired,\n+ startingTabIndex: PropTypes.number.isRequired,\n+ onScreenThreadInfos: PropTypes.arrayOf(threadInfoPropType).isRequired,\n+ viewerID: PropTypes.string,\n+ loggedIn: PropTypes.bool.isRequired,\n+ nextLocalID: PropTypes.number.isRequired,\n+ timeZone: PropTypes.string,\n+ dispatchActionPayload: PropTypes.func.isRequired,\n+ };\nentryContainer: ?HTMLDivElement;\nentryContainerSpacer: ?HTMLDivElement;\nactionLinks: ?HTMLDivElement;\n@@ -86,8 +102,9 @@ class Day extends React.PureComponent<Props, State> {\n}\nrender() {\n+ const now = currentDateInTimeZone(this.props.timeZone);\nconst isToday = this.state.mounted &&\n- dateString(new Date()) === this.props.dayString;\n+ dateString(now) === this.props.dayString;\nconst tdClasses = classNames(css.day, { [css.currentDay]: isToday });\nlet actionLinks = null;\n@@ -274,18 +291,6 @@ class Day extends React.PureComponent<Props, State> {\n}\n-Day.propTypes = {\n- dayString: PropTypes.string.isRequired,\n- entryInfos: PropTypes.arrayOf(entryInfoPropType).isRequired,\n- setModal: PropTypes.func.isRequired,\n- startingTabIndex: PropTypes.number.isRequired,\n- onScreenThreadInfos: PropTypes.arrayOf(threadInfoPropType).isRequired,\n- viewerID: PropTypes.string,\n- loggedIn: PropTypes.bool.isRequired,\n- nextLocalID: PropTypes.number.isRequired,\n- dispatchActionPayload: PropTypes.func.isRequired,\n-};\n-\nexport default connect(\n(state: AppState) => ({\nonScreenThreadInfos: onScreenThreadInfos(state),\n@@ -293,6 +298,7 @@ export default connect(\nloggedIn: !!(state.currentUserInfo &&\n!state.currentUserInfo.anonymous && true),\nnextLocalID: state.nextLocalID,\n+ timeZone: state.timeZone,\n}),\nnull,\ntrue,\n" }, { "change_type": "MODIFY", "old_path": "web/redux-setup.js", "new_path": "web/redux-setup.js", "diff": "@@ -62,6 +62,7 @@ export type AppState = {|\nwatchedThreadIDs: $ReadOnlyArray<string>,\nforeground: bool,\nnextLocalID: number,\n+ timeZone: ?string,\n|};\nexport const updateNavInfoActionType = \"UPDATE_NAV_INFO\";\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Determine the current Day using local time zone
129,187
12.09.2019 12:56:18
14,400
af2b4b7d8530602c99706e59dd7858dd0a836e81
Use timeZone for web timestamps
[ { "change_type": "MODIFY", "old_path": "lib/utils/date-utils.js", "new_path": "lib/utils/date-utils.js", "diff": "@@ -82,32 +82,34 @@ const millisecondsInWeek = millisecondsInDay * 7;\nconst millisecondsInYear = millisecondsInDay * 365;\n// Takes a millisecond timestamp and displays the time in the local timezone\n-function shortAbsoluteDate(timestamp: number) {\n+function shortAbsoluteDate(timestamp: number, timeZone?: ?string) {\nconst now = Date.now();\nconst msSince = now - timestamp;\n+ const date = changeTimeZone(new Date(timestamp), timeZone);\nif (msSince < millisecondsInDay) {\n- return dateFormat(timestamp, \"h:MM TT\");\n+ return dateFormat(date, \"h:MM TT\");\n} else if (msSince < millisecondsInWeek) {\n- return dateFormat(timestamp, \"ddd\");\n+ return dateFormat(date, \"ddd\");\n} else if (msSince < millisecondsInYear) {\n- return dateFormat(timestamp, \"mmm d\");\n+ return dateFormat(date, \"mmm d\");\n} else {\n- return dateFormat(timestamp, \"mmm d yyyy\");\n+ return dateFormat(date, \"mmm d yyyy\");\n}\n}\n// Same as above, but longer\n-function longAbsoluteDate(timestamp: number) {\n+function longAbsoluteDate(timestamp: number, timeZone?: ?string) {\nconst now = Date.now();\nconst msSince = now - timestamp;\n+ const date = changeTimeZone(new Date(timestamp), timeZone);\nif (msSince < millisecondsInDay) {\n- return dateFormat(timestamp, \"h:MM TT\");\n+ return dateFormat(date, \"h:MM TT\");\n} else if (msSince < millisecondsInWeek) {\n- return dateFormat(timestamp, \"ddd h:MM TT\");\n+ return dateFormat(date, \"ddd h:MM TT\");\n} else if (msSince < millisecondsInYear) {\n- return dateFormat(timestamp, \"mmmm d, h:MM TT\");\n+ return dateFormat(date, \"mmmm d, h:MM TT\");\n} else {\n- return dateFormat(timestamp, \"mmmm d yyyy, h:MM TT\");\n+ return dateFormat(date, \"mmmm d yyyy, h:MM TT\");\n}\n}\n@@ -126,7 +128,10 @@ function thisMonthDates(\n// The Date object doesn't support time zones, and is hardcoded to the server's\n// time zone. Thus, the best way to convert Date between time zones is to offset\n// the Date by the difference between the time zones\n-function changeTimeZone(date: Date, timeZone: string): Date {\n+function changeTimeZone(date: Date, timeZone: ?string): Date {\n+ if (!timeZone) {\n+ return date;\n+ }\nconst localeString = date.toLocaleString('en-US', { timeZone });\nconst localeDate = new Date(localeString);\nconst diff = localeDate.getTime() - date.getTime();\n@@ -134,8 +139,7 @@ function changeTimeZone(date: Date, timeZone: string): Date {\n}\nfunction currentDateInTimeZone(timeZone: ?string): Date {\n- const localTime = new Date();\n- return timeZone ? changeTimeZone(localTime, timeZone) : localTime;\n+ return changeTimeZone(new Date(), timeZone);\n}\nexport {\n" }, { "change_type": "MODIFY", "old_path": "web/chat/chat-message-list.react.js", "new_path": "web/chat/chat-message-list.react.js", "diff": "@@ -61,6 +61,7 @@ type PassedProps = {|\nthreadInfo: ?ThreadInfo,\nmessageListData: ?$ReadOnlyArray<ChatMessageItem>,\nstartReached: bool,\n+ timeZone: ?string,\n// Redux dispatch functions\ndispatchActionPromise: DispatchActionPromise,\n// async functions that hit server APIs\n@@ -92,6 +93,7 @@ class ChatMessageList extends React.PureComponent<Props, State> {\nthreadInfo: threadInfoPropType,\nmessageListData: PropTypes.arrayOf(chatMessageItemPropType),\nstartReached: PropTypes.bool.isRequired,\n+ timeZone: PropTypes.string,\ndispatchActionPromise: PropTypes.func.isRequired,\nfetchMessagesBeforeCursor: PropTypes.func.isRequired,\nfetchMostRecentMessages: PropTypes.func.isRequired,\n@@ -240,6 +242,7 @@ class ChatMessageList extends React.PureComponent<Props, State> {\nsetMouseOver={this.setTimestampTooltip}\nchatInputState={chatInputState}\nsetModal={setModal}\n+ timeZone={this.props.timeZone}\nkey={ChatMessageList.keyExtractor(item)}\n/>\n);\n@@ -293,13 +296,17 @@ class ChatMessageList extends React.PureComponent<Props, State> {\nconst tooltip = (\n<MessageTimestampTooltip\nmessagePositionInfo={this.state.messageMouseover}\n+ timeZone={this.props.timeZone}\n/>\n);\nlet content;\nif (!usingFlexDirectionColumnReverse) {\ncontent = (\n- <div className={css.invertedMessageContainer} ref={this.messageContainerRef}>\n+ <div\n+ className={css.invertedMessageContainer}\n+ ref={this.messageContainerRef}\n+ >\n{[...messages].reverse()}\n{tooltip}\n</div>\n@@ -417,6 +424,7 @@ const ReduxConnectedChatMessageList = connect(\nmessageListData: webMessageListData(state),\nstartReached: !!(activeChatThreadID &&\nstate.messageStore.threads[activeChatThreadID].startReached),\n+ timeZone: state.timeZone,\n};\n},\n{ fetchMessagesBeforeCursor, fetchMostRecentMessages },\n" }, { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list-item.react.js", "new_path": "web/chat/chat-thread-list-item.react.js", "diff": "@@ -24,6 +24,7 @@ type Props = {|\nitem: ChatThreadItem,\nactive: bool,\nnavInfo: NavInfo,\n+ timeZone: ?string,\ndispatchActionPayload: DispatchActionPayload,\n|};\nclass ChatThreadListItem extends React.PureComponent<Props> {\n@@ -32,12 +33,13 @@ class ChatThreadListItem extends React.PureComponent<Props> {\nitem: chatThreadItemPropType.isRequired,\nactive: PropTypes.bool.isRequired,\nnavInfo: navInfoPropType.isRequired,\n+ timeZone: PropTypes.string,\ndispatchActionPayload: PropTypes.func.isRequired,\n};\nrender() {\n- const { item } = this.props;\n- const lastActivity = shortAbsoluteDate(item.lastUpdatedTime);\n+ const { item, timeZone } = this.props;\n+ const lastActivity = shortAbsoluteDate(item.lastUpdatedTime, timeZone);\nconst colorSplotchStyle = { backgroundColor: `#${item.threadInfo.color}` };\nconst unread = item.threadInfo.currentUser.unread;\nconst activeStyle = this.props.active ? css.activeThread : null;\n" }, { "change_type": "MODIFY", "old_path": "web/chat/chat-thread-list.react.js", "new_path": "web/chat/chat-thread-list.react.js", "diff": "@@ -20,6 +20,7 @@ type Props = {|\n// Redux state\nchatListData: $ReadOnlyArray<ChatThreadItem>,\nnavInfo: NavInfo,\n+ timeZone: ?string,\n// Redux dispatch functions\ndispatchActionPayload: DispatchActionPayload,\n|};\n@@ -28,6 +29,7 @@ class ChatThreadList extends React.PureComponent<Props> {\nstatic propTypes = {\nchatListData: PropTypes.arrayOf(chatThreadItemPropType).isRequired,\nnavInfo: navInfoPropType.isRequired,\n+ timeZone: PropTypes.string,\ndispatchActionPayload: PropTypes.func.isRequired,\n};\n@@ -37,6 +39,7 @@ class ChatThreadList extends React.PureComponent<Props> {\nitem={item}\nactive={item.threadInfo.id === this.props.navInfo.activeChatThreadID}\nnavInfo={this.props.navInfo}\n+ timeZone={this.props.timeZone}\ndispatchActionPayload={this.props.dispatchActionPayload}\nkey={item.threadInfo.id}\n/>\n@@ -54,6 +57,7 @@ export default connect(\n(state: AppState) => ({\nchatListData: webChatListData(state),\nnavInfo: state.navInfo,\n+ timeZone: state.timeZone,\n}),\nnull,\ntrue,\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message-timestamp-tooltip.react.js", "new_path": "web/chat/message-timestamp-tooltip.react.js", "diff": "@@ -14,13 +14,14 @@ import css from './chat-message-list.css';\ntype Props = {|\nmessagePositionInfo: ?OnMessagePositionInfo,\n+ timeZone: ?string,\n|};\nfunction MessageTimestampTooltip(props: Props) {\nif (!props.messagePositionInfo) {\nreturn null;\n}\nconst { item, messagePosition } = props.messagePositionInfo;\n- const text = longAbsoluteDate(item.messageInfo.time);\n+ const text = longAbsoluteDate(item.messageInfo.time, props.timeZone);\nconst font =\n'14px -apple-system, BlinkMacSystemFont, \"Segoe UI\", \"Roboto\", ' +\n@@ -100,7 +101,7 @@ function MessageTimestampTooltip(props: Props) {\nclassName={classNames(css.messageTimestampTooltip, className)}\nstyle={style}\n>\n- {longAbsoluteDate(item.messageInfo.time)}\n+ {text}\n</div>\n);\n}\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message.react.js", "new_path": "web/chat/message.react.js", "diff": "@@ -45,6 +45,7 @@ type Props = {|\nsetMouseOver: (messagePositionInfo: MessagePositionInfo) => void,\nchatInputState: ChatInputState,\nsetModal: (modal: ?React.Node) => void,\n+ timeZone: ?string,\n|};\nclass Message extends React.PureComponent<Props> {\n@@ -54,31 +55,34 @@ class Message extends React.PureComponent<Props> {\nsetMouseOver: PropTypes.func.isRequired,\nchatInputState: chatInputStatePropType.isRequired,\nsetModal: PropTypes.func.isRequired,\n+ timeZone: PropTypes.string,\n};\nrender() {\n+ const { item, timeZone } = this.props;\n+\nlet conversationHeader = null;\n- if (this.props.item.startsConversation) {\n+ if (item.startsConversation) {\nconversationHeader = (\n<div className={css.conversationHeader}>\n- {longAbsoluteDate(this.props.item.messageInfo.time)}\n+ {longAbsoluteDate(item.messageInfo.time, timeZone)}\n</div>\n);\n}\nlet message;\n- if (this.props.item.messageInfo.type === messageTypes.TEXT) {\n+ if (item.messageInfo.type === messageTypes.TEXT) {\nmessage = (\n<TextMessage\n- item={this.props.item}\n+ item={item}\nthreadInfo={this.props.threadInfo}\nsetMouseOver={this.props.setMouseOver}\nchatInputState={this.props.chatInputState}\n/>\n);\n- } else if (this.props.item.messageInfo.type === messageTypes.MULTIMEDIA) {\n+ } else if (item.messageInfo.type === messageTypes.MULTIMEDIA) {\nmessage = (\n<MultimediaMessage\n- item={this.props.item}\n+ item={item}\nthreadInfo={this.props.threadInfo}\nsetMouseOver={this.props.setMouseOver}\nchatInputState={this.props.chatInputState}\n@@ -88,7 +92,7 @@ class Message extends React.PureComponent<Props> {\n} else {\nmessage = (\n<RobotextMessage\n- item={this.props.item}\n+ item={item}\nsetMouseOver={this.props.setMouseOver}\n/>\n);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Use timeZone for web timestamps
129,187
12.09.2019 13:49:46
14,400
a7a091aadd44c857aacbdf6c74fd7d7422c25b26
[server] Cron folder
[ { "change_type": "RENAME", "old_path": "server/src/backups.js", "new_path": "server/src/cron/backups.js", "diff": "@@ -7,8 +7,8 @@ import dateFormat from 'dateformat';\nimport StreamCache from 'stream-cache';\nimport { promisify } from 'util';\n-import dbConfig from '../secrets/db_config';\n-import backupConfig from '../facts/backups';\n+import dbConfig from '../../secrets/db_config';\n+import backupConfig from '../../facts/backups';\nconst readdir = promisify(fs.readdir);\nconst lstat = promisify(fs.lstat);\n" }, { "change_type": "RENAME", "old_path": "server/src/cron.js", "new_path": "server/src/cron/cron.js", "diff": "import schedule from 'node-schedule';\nimport cluster from 'cluster';\n-import { deleteExpiredCookies } from './deleters/cookie-deleters';\n-import { deleteExpiredVerifications } from './models/verification';\n-import { deleteInaccessibleThreads } from './deleters/thread-deleters';\n-import { deleteOrphanedDays } from './deleters/day-deleters';\n-import { deleteOrphanedMemberships } from './deleters/membership-deleters';\n-import { deleteOrphanedEntries } from './deleters/entry-deleters';\n-import { deleteOrphanedRevisions } from './deleters/revision-deleters';\n-import { deleteOrphanedRoles } from './deleters/role-deleters';\n-import { deleteOrphanedMessages } from './deleters/message-deleters';\n-import { deleteOrphanedActivity } from './deleters/activity-deleters';\n-import { deleteOrphanedNotifs } from './deleters/notif-deleters';\n-import { deleteExpiredUpdates } from './deleters/update-deleters';\n+import { deleteExpiredCookies } from '../deleters/cookie-deleters';\n+import { deleteExpiredVerifications } from '../models/verification';\n+import { deleteInaccessibleThreads } from '../deleters/thread-deleters';\n+import { deleteOrphanedDays } from '../deleters/day-deleters';\n+import { deleteOrphanedMemberships } from '../deleters/membership-deleters';\n+import { deleteOrphanedEntries } from '../deleters/entry-deleters';\n+import { deleteOrphanedRevisions } from '../deleters/revision-deleters';\n+import { deleteOrphanedRoles } from '../deleters/role-deleters';\n+import { deleteOrphanedMessages } from '../deleters/message-deleters';\n+import { deleteOrphanedActivity } from '../deleters/activity-deleters';\n+import { deleteOrphanedNotifs } from '../deleters/notif-deleters';\n+import { deleteExpiredUpdates } from '../deleters/update-deleters';\nimport {\ndeleteOrphanedSessions,\ndeleteOldWebSessions,\n-} from './deleters/session-deleters';\n+} from '../deleters/session-deleters';\nimport { backupDB } from './backups';\nimport {\nbotherMonthlyActivesToUpdateAppVersion,\n-} from './bots/app-version-update';\n+} from '../bots/app-version-update';\nif (cluster.isMaster) {\nschedule.scheduleJob(\n" }, { "change_type": "MODIFY", "old_path": "server/src/server.js", "new_path": "server/src/server.js", "diff": "@@ -14,7 +14,7 @@ import {\n} from './responders/handlers';\nimport { onConnection } from './socket/socket';\nimport urlFacts from '../facts/url';\n-import './cron';\n+import './cron/cron';\nimport { jsonEndpoints } from './endpoints';\nimport { websiteResponder } from './responders/website-responders';\nimport { errorReportDownloadResponder } from './responders/report-responders';\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Cron folder
129,187
12.09.2019 14:20:04
14,400
a84d5fab9360a9f7ba8776f0b230e38e40936398
[server] Automatically keep GeoIP updated on a weekly basis
[ { "change_type": "MODIFY", "old_path": "server/src/cron/cron.js", "new_path": "server/src/cron/cron.js", "diff": "@@ -23,6 +23,7 @@ import { backupDB } from './backups';\nimport {\nbotherMonthlyActivesToUpdateAppVersion,\n} from '../bots/app-version-update';\n+import { updateAndReloadGeoipDB } from './update-geoip-db';\nif (cluster.isMaster) {\nschedule.scheduleJob(\n@@ -79,4 +80,17 @@ if (cluster.isMaster) {\n}\n},\n);\n+ schedule.scheduleJob(\n+ '0 3 ? * 0', // every Sunday at 3:00 AM Pacific Time\n+ async () => {\n+ try {\n+ await updateAndReloadGeoipDB();\n+ } catch (e) {\n+ console.warn(\n+ \"encountered error while trying to update GeoIP database\",\n+ e,\n+ );\n+ }\n+ },\n+ );\n}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "server/src/cron/update-geoip-db.js", "diff": "+// @flow\n+\n+import childProcess from 'child_process';\n+import geoip from 'geoip-lite';\n+\n+function updateGeoipDB(): Promise<void> {\n+ const spawned = childProcess.spawn(\n+ process.execPath,\n+ [ '../node_modules/geoip-lite/scripts/updatedb.js' ],\n+ );\n+ return new Promise((resolve, reject) => {\n+ spawned.on('error', reject);\n+ spawned.on('exit', () => resolve());\n+ });\n+}\n+\n+function reloadGeoipDB(): Promise<void> {\n+ return new Promise(resolve => geoip.reloadData(resolve));\n+}\n+\n+async function updateAndReloadGeoipDB(): Promise<void> {\n+ await updateGeoipDB();\n+ await reloadGeoipDB();\n+}\n+\n+export {\n+ updateAndReloadGeoipDB,\n+};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Automatically keep GeoIP updated on a weekly basis
129,187
16.09.2019 12:26:07
14,400
1ec8e47595f60091f5e88df9197dd3b3b32b8a31
[server] Reload GeoIP on all cluster members after update
[ { "change_type": "MODIFY", "old_path": "server/src/cron/update-geoip-db.js", "new_path": "server/src/cron/update-geoip-db.js", "diff": "import childProcess from 'child_process';\nimport geoip from 'geoip-lite';\n+import cluster from 'cluster';\n+\n+import { handleAsyncPromise } from '../responders/handlers';\nfunction updateGeoipDB(): Promise<void> {\nconst spawned = childProcess.spawn(\n@@ -18,9 +21,29 @@ function reloadGeoipDB(): Promise<void> {\nreturn new Promise(resolve => geoip.reloadData(resolve));\n}\n+type IPCMessage = {|\n+ type: 'geoip_reload',\n+|};\n+const reloadMessage: IPCMessage = { type: 'geoip_reload' };\n+\nasync function updateAndReloadGeoipDB(): Promise<void> {\nawait updateGeoipDB();\nawait reloadGeoipDB();\n+\n+ if (!cluster.isMaster) {\n+ return;\n+ }\n+ for (const id in cluster.workers) {\n+ cluster.workers[id].send(reloadMessage);\n+ }\n+}\n+\n+if (!cluster.isMaster) {\n+ process.on('message', (ipcMessage: IPCMessage) => {\n+ if (ipcMessage.type === 'geoip_reload') {\n+ handleAsyncPromise(reloadGeoipDB());\n+ }\n+ });\n}\nexport {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Reload GeoIP on all cluster members after update
129,187
17.09.2019 17:08:21
14,400
97876262cd7c1f0216084a8e6890858e971225d0
[native] RN 0.60 upgrade: ESLint
[ { "change_type": "ADD", "old_path": null, "new_path": "native/.eslintrc.js", "diff": "+module.exports = {\n+ root: true,\n+ extends: '@react-native-community',\n+};\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"postinstall\": \"node link-workspaces.js && cd ../ && patch-package && npx flow-mono create-symlinks native/.flowconfig\",\n\"start\": \"node node_modules/react-native/local-cli/cli.js start\",\n\"test\": \"jest\",\n+ \"lint\": \"eslint .\",\n\"devtools\": \"react-devtools\",\n\"logfirebase\": \"adb shell logcat | grep -E -i 'FIRMessagingModule|firebase'\"\n},\n\"devDependencies\": {\n\"@babel/core\": \"^7.4.4\",\n\"@babel/runtime\": \"^7.4.4\",\n+ \"@react-native-community/eslint-config\": \"^0.0.5\",\n\"babel-jest\": \"^24.8.0\",\n\"babel-plugin-transform-remove-console\": \"^6.8.5\",\n\"babel-plugin-transform-remove-strict-mode\": \"0.0.2\",\n+ \"eslint\": \"^6.1.0\",\n\"flow-bin\": \"^0.92.0\",\n\"flow-mono-cli\": \"^1.5.0\",\n\"get-yarn-workspaces\": \"^1.0.2\",\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] RN 0.60 upgrade: ESLint
129,187
17.09.2019 17:29:22
14,400
b8cfd87e3f0f763821c1bf137027b5356649513f
[native] RN 0.60 upgrade: patches/fixes on flow-typed Will put up PRs for these later
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/react-native-gesture-handler_v1.x.x.js", "new_path": "native/flow-typed/npm/react-native-gesture-handler_v1.x.x.js", "diff": "@@ -376,6 +376,7 @@ declare module 'react-native-gesture-handler/GestureHandler' {\nshouldCancelWhenOutside?: boolean,\nminPointers?: number,\nhitSlop?: HitSlop,\n+ children?: React$Node,\n|}>;\n/////////////////////////////////////////////////////////////////////////////\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/redux-devtools-extension_v2.x.x.js", "new_path": "native/flow-typed/npm/redux-devtools-extension_v2.x.x.js", "diff": "@@ -19,11 +19,11 @@ declare type $npm$ReduxDevtoolsExtension$DevToolsOptions = {\nset?: boolean;\nfunction?: boolean | Function;\n},\n- actionSanitizer?: <A: { type: $Subtype<string> }>(action: A, id: number) => A,\n+ actionSanitizer?: <A: { type: string }>(action: A, id: number) => A,\nstateSanitizer?: <S>(state: S, index: number) => S,\nactionsBlacklist?: string | string[],\nactionsWhitelist?: string | string[],\n- predicate?: <S, A: { type: $Subtype<string> }>(state: S, action: A) => boolean,\n+ predicate?: <S, A: { type: string }>(state: S, action: A) => boolean,\nshouldRecordChanges?: boolean,\npauseActionType?: string,\nautoPause?: boolean,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] RN 0.60 upgrade: patches/fixes on flow-typed Will put up PRs for these later
129,187
17.09.2019 17:36:56
14,400
76f2be891177e28e63c17788e1bb661b48b8b710
[native] RN 0.60 upgrade: flow-bin@^0.98.0
[ { "change_type": "MODIFY", "old_path": "lib/types/redux-types.js", "new_path": "lib/types/redux-types.js", "diff": "@@ -645,7 +645,7 @@ export type BaseAction =\nexport type ActionPayload\n= ?(Object | Array<*> | $ReadOnlyArray<*> | string);\nexport type SuperAction = {\n- type: $Subtype<string>,\n+ type: string,\npayload?: ActionPayload,\nloadingInfo?: LoadingInfo,\nerror?: bool,\n" }, { "change_type": "MODIFY", "old_path": "lib/utils/action-utils.js", "new_path": "lib/utils/action-utils.js", "diff": "@@ -30,22 +30,18 @@ import { cookieInvalidationResolutionAttempt } from '../actions/user-actions';\nlet nextPromiseIndex = 0;\n-export type ActionTypes<\n- AT: $Subtype<string>,\n- BT: $Subtype<string>,\n- CT: $Subtype<string>,\n-> = {\n+export type ActionTypes<AT: string, BT: string, CT: string> = {\nstarted: AT,\nsuccess: BT,\nfailed: CT,\n};\nfunction wrapActionPromise<\n- AT: $Subtype<string>, // *_STARTED action type (string literal)\n+ AT: string, // *_STARTED action type (string literal)\nAP: ActionPayload, // *_STARTED payload\n- BT: $Subtype<string>, // *_SUCCESS action type (string literal)\n+ BT: string, // *_SUCCESS action type (string literal)\nBP: ActionPayload, // *_SUCCESS payload\n- CT: $Subtype<string>, // *_FAILED action type (string literal)\n+ CT: string, // *_FAILED action type (string literal)\n>(\nactionTypes: ActionTypes<AT, BT, CT>,\npromise: Promise<BP>,\n@@ -92,7 +88,7 @@ function wrapActionPromise<\n}\nexport type DispatchActionPayload =\n- <T: $Subtype<string>, P: ActionPayload>(actionType: T, payload: P) => void;\n+ <T: string, P: ActionPayload>(actionType: T, payload: P) => void;\nexport type DispatchActionPromise = <\nA: BaseAction,\nB: BaseAction,\n@@ -132,8 +128,7 @@ function includeDispatchActionProps(dispatch: Dispatch): DispatchFunctions {\nstartingPayload,\n));\n};\n- const dispatchActionPayload =\n- function<T: $Subtype<string>, P: ActionPayload>(\n+ const dispatchActionPayload = function<T: string, P: ActionPayload>(\nactionType: T,\npayload: P,\n) {\n" }, { "change_type": "MODIFY", "old_path": "native/.flowconfig", "new_path": "native/.flowconfig", "diff": "; Ignore \"BUCK\" generated dirs\n<PROJECT_ROOT>/\\.buckd/\n-; Ignore unexpected extra \"@providesModule\"\n-.*/node_modules/.*/node_modules/fbjs/.*\n-\n-; Ignore duplicate module providers\n-; For RN Apps installed via npm, \"Libraries\" folder is inside\n-; \"node_modules/react-native\" but in the source repo it is in the root\n-.*/Libraries/react-native/React.js\n-\n.*/node_modules/react-native/Libraries/react-native/react-native-implementation.js\n-; Ignore polyfills\n-.*/Libraries/polyfills/.*\n-\n.*/node_modules/redux-persist/lib/index.js\n.*/node_modules/react-native-fast-image/src/index.js.flow\n+.*/node_modules/react-native-fs/FS.common.js\n-; Ignore metro\n-.*/node_modules/metro/.*\n+; Flow doesn't support platforms\n+.*/Libraries/Utilities/HMRLoadingView.js\n-.*/node_modules/react-native-fs/FS.common.js\n+[untyped]\n+.*/node_modules/@react-native-community/cli/.*/.*\n[include]\n../lib\n@@ -39,6 +30,10 @@ emoji=true\nesproposal.optional_chaining=enable\nesproposal.nullish_coalescing=enable\n+module.file_ext=.js\n+module.file_ext=.json\n+module.file_ext=.ios.js\n+\nmodule.system=haste\nmodule.system.haste.use_name_reducers=true\n# get basename\n@@ -51,28 +46,46 @@ module.system.haste.name_reducers='^\\(.*\\)\\.android$' -> '\\1'\nmodule.system.haste.name_reducers='^\\(.*\\)\\.native$' -> '\\1'\nmodule.system.haste.paths.blacklist=.*/__tests__/.*\nmodule.system.haste.paths.blacklist=.*/__mocks__/.*\n-module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*\nmodule.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*\n+module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*\n+module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*\n+module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js\n+module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*\nmunge_underscores=true\nmodule.name_mapper='^[./a-zA-Z0-9$_-]+\\.\\(bmp\\|gif\\|jpg\\|jpeg\\|png\\|psd\\|svg\\|webp\\|m4v\\|mov\\|mp4\\|mpeg\\|mpg\\|webm\\|aac\\|aiff\\|caf\\|m4a\\|mp3\\|wav\\|html\\|pdf\\)$' -> 'RelativeImageStub'\n-module.file_ext=.js\n-module.file_ext=.jsx\n-module.file_ext=.json\n-module.file_ext=.native.js\n-module.file_ext=.ios.js\n-\nsuppress_type=$FlowIssue\nsuppress_type=$FlowFixMe\nsuppress_type=$FlowFixMeProps\nsuppress_type=$FlowFixMeState\n-suppress_comment=\\\\(.\\\\|\\n\\\\)*\\\\$FlowFixMe\\\\($\\\\|[^(]\\\\|(\\\\(<VERSION>\\\\)? *\\\\(site=[a-z,_]*react_native[a-z,_]*\\\\)?)\\\\)\n-suppress_comment=\\\\(.\\\\|\\n\\\\)*\\\\$FlowIssue\\\\((\\\\(<VERSION>\\\\)? *\\\\(site=[a-z,_]*react_native[a-z,_]*\\\\)?)\\\\)?:? #[0-9]+\n-suppress_comment=\\\\(.\\\\|\\n\\\\)*\\\\$FlowFixedInNextDeploy\n+suppress_comment=\\\\(.\\\\|\\n\\\\)*\\\\$FlowFixMe\\\\($\\\\|[^(]\\\\|(\\\\(<VERSION>\\\\)? *\\\\(site=[a-z,_]*react_native\\\\(_ios\\\\)?_\\\\(oss\\\\|fb\\\\)[a-z,_]*\\\\)?)\\\\)\n+suppress_comment=\\\\(.\\\\|\\n\\\\)*\\\\$FlowIssue\\\\((\\\\(<VERSION>\\\\)? *\\\\(site=[a-z,_]*react_native\\\\(_ios\\\\)?_\\\\(oss\\\\|fb\\\\)[a-z,_]*\\\\)?)\\\\)?:? #[0-9]+\nsuppress_comment=\\\\(.\\\\|\\n\\\\)*\\\\$FlowExpectedError\n+[lints]\n+sketchy-null-number=warn\n+sketchy-null-mixed=warn\n+sketchy-number=warn\n+untyped-type-import=warn\n+nonstrict-import=warn\n+deprecated-type=warn\n+unsafe-getters-setters=warn\n+inexact-spread=warn\n+unnecessary-invariant=warn\n+signature-verification-failure=warn\n+deprecated-utility=error\n+\n+[strict]\n+deprecated-type\n+nonstrict-import\n+sketchy-null\n+unclear-type\n+unsafe-getters-setters\n+untyped-import\n+untyped-type-import\n+\n[version]\n-^0.92.0\n+^0.98.0\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"babel-plugin-transform-remove-console\": \"^6.8.5\",\n\"babel-plugin-transform-remove-strict-mode\": \"0.0.2\",\n\"eslint\": \"^6.1.0\",\n- \"flow-bin\": \"^0.92.0\",\n+ \"flow-bin\": \"^0.98.0\",\n\"flow-mono-cli\": \"^1.5.0\",\n\"get-yarn-workspaces\": \"^1.0.2\",\n\"jest\": \"^24.8.0\",\n" }, { "change_type": "MODIFY", "old_path": "native/push/android.js", "new_path": "native/push/android.js", "diff": "@@ -88,7 +88,7 @@ function handleAndroidMessage(\n.setData({ threadID })\n.android.setTag(id)\n.android.setChannelId(androidNotificationChannelID)\n- .android.setDefaults(firebase.notifications.Android.Defaults.All)\n+ .android.setDefaults([ firebase.notifications.Android.Defaults.All ])\n.android.setVibrate(vibrationSpec)\n.android.setAutoCancel(true)\n.android.setLargeIcon(\"@mipmap/ic_launcher\")\n" }, { "change_type": "ADD", "old_path": null, "new_path": "patches/react-native-firebase+5.5.6.patch", "diff": "+diff --git a/node_modules/react-native-firebase/dist/utils/index.js.flow b/node_modules/react-native-firebase/dist/utils/index.js.flow\n+index d44ef5b..0c8c174 100644\n+--- a/node_modules/react-native-firebase/dist/utils/index.js.flow\n++++ b/node_modules/react-native-firebase/dist/utils/index.js.flow\n+@@ -173,7 +173,7 @@ export const isAndroid = Platform.OS === 'android';\n+ * @param string\n+ * @returns {*}\n+ */\n+-export function tryJSONParse(string: string | null): any {\n++export function tryJSONParse(string: ?string | null): any {\n+ try {\n+ return string && JSON.parse(string);\n+ } catch (jsonError) {\n+@@ -186,7 +186,7 @@ export function tryJSONParse(string: string | null): any {\n+ * @param data\n+ * @returns {*}\n+ */\n+-export function tryJSONStringify(data: mixed): string | null {\n++export function tryJSONStringify(data: mixed): ?string | null {\n+ try {\n+ return JSON.stringify(data);\n+ } catch (jsonError) {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] RN 0.60 upgrade: flow-bin@^0.98.0
129,187
18.09.2019 16:25:27
14,400
d03f3577b1506383b8ebd858e42835b96e07e95a
[native] RN 0.60 upgrade: Android
[ { "change_type": "MODIFY", "old_path": "native/.gitignore", "new_path": "native/.gitignore", "diff": "@@ -40,6 +40,7 @@ yarn-error.log\nbuck-out/\n\\.buckd/\n*.keystore\n+!debug.keystore\n# fastlane\n#\n" }, { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -16,7 +16,10 @@ import com.android.build.OutputFile\n* bundleAssetName: \"index.android.bundle\",\n*\n* // the entry file for bundle generation\n- * entryFile: \"index.js\",\n+ * entryFile: \"index.android.js\",\n+ *\n+ * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format\n+ * bundleCommand: \"ram-bundle\",\n*\n* // whether to bundle JS and assets in debug mode\n* bundleInDebug: false,\n@@ -73,10 +76,11 @@ import com.android.build.OutputFile\n*/\nproject.ext.react = [\n- entryFile: \"index.js\"\n+ entryFile: \"index.js\",\n+ enableHermes: false, // clean and rebuild if changing\n]\n-apply from: \"../../node_modules/react-native/react.gradle\"\n+apply from: \"../../../node_modules/react-native/react.gradle\"\n/**\n* Set this to true to create two separate APKs instead of one:\n@@ -93,15 +97,29 @@ def enableSeparateBuildPerCPUArchitecture = false\n*/\ndef enableProguardInReleaseBuilds = false\n+/**\n+ * The preferred build flavor of JavaScriptCore.\n+ *\n+ * For example, to use the international variant, you can use:\n+ * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`\n+ *\n+ * The international variant includes ICU i18n library and necessary data\n+ * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that\n+ * give correct results when using with locales other than en-US. Note that\n+ * this variant is about 6MiB larger per architecture than default.\n+ */\n+def jscFlavor = 'org.webkit:android-jsc:+'\n+\n+/**\n+ * Whether to enable the Hermes VM.\n+ *\n+ * This should be set on project.ext.react and mirrored here. If it is not set\n+ * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode\n+ * and the benefits of using Hermes will therefore be sharply reduced.\n+ */\n+def enableHermes = project.ext.react.get(\"enableHermes\", false);\n+\nandroid {\n- signingConfigs {\n- config {\n- keyAlias 'AndroidSigningKey'\n- keyPassword 'daemon-killdeer-steer-shoddy'\n- storeFile file('/Users/ashoat/Dropbox/Downloads/push/android_key_store.jks')\n- storePassword 'typhoid-troupe-yakima-namely'\n- }\n- }\ncompileSdkVersion rootProject.ext.compileSdkVersion\ncompileOptions {\n@@ -124,6 +142,14 @@ android {\ninclude \"armeabi-v7a\", \"x86\", \"arm64-v8a\", \"x86_64\"\n}\n}\n+ signingConfigs {\n+ config {\n+ keyAlias 'AndroidSigningKey'\n+ keyPassword 'daemon-killdeer-steer-shoddy'\n+ storeFile file('/Users/ashoat/Dropbox/Downloads/push/android_key_store.jks')\n+ storePassword 'typhoid-troupe-yakima-namely'\n+ }\n+ }\nbuildTypes {\nrelease {\nminifyEnabled enableProguardInReleaseBuilds\n@@ -135,15 +161,25 @@ android {\napplicationVariants.all { variant ->\nvariant.outputs.each { output ->\n// For each separate APK per architecture, set a unique version code as described here:\n- // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits\n+ // https://developer.android.com/studio/build/configure-apk-splits.html\ndef versionCodes = [\"armeabi-v7a\": 1, \"x86\": 2, \"arm64-v8a\": 3, \"x86_64\": 4]\ndef abi = output.getFilter(OutputFile.ABI)\nif (abi != null) { // null for the universal-debug, universal-release variants\noutput.versionCodeOverride =\nversionCodes.get(abi) * 1048576 + defaultConfig.versionCode\n}\n+\n}\n}\n+\n+ packagingOptions {\n+ pickFirst '**/armeabi-v7a/libc++_shared.so'\n+ pickFirst '**/x86/libc++_shared.so'\n+ pickFirst '**/arm64-v8a/libc++_shared.so'\n+ pickFirst '**/x86_64/libc++_shared.so'\n+ pickFirst '**/x86/libjsc.so'\n+ pickFirst '**/armeabi-v7a/libjsc.so'\n+ }\n}\ndependencies {\n@@ -169,8 +205,15 @@ dependencies {\nimplementation project(':react-native-keychain')\nimplementation project(':reactnativekeyboardinput')\nimplementation fileTree(dir: \"libs\", include: [\"*.jar\"])\n- implementation \"com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}\"\nimplementation \"com.facebook.react:react-native:+\" // From node_modules\n+\n+ if (enableHermes) {\n+ def hermesPath = \"../../../node_modules/hermesvm/android/\";\n+ debugImplementation files(hermesPath + \"hermes-debug.aar\")\n+ releaseImplementation files(hermesPath + \"hermes-release.aar\")\n+ } else {\n+ implementation jscFlavor\n+ }\n}\n// Run this once to be able to run the application with BUCK\n@@ -180,4 +223,6 @@ task copyDownloadableDepsToLibs(type: Copy) {\ninto 'libs'\n}\n+apply from: file(\"../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle\");\n+applyNativeModulesAppBuildGradle(project, \"../..\")\napply plugin: 'com.google.gms.google-services'\n" }, { "change_type": "MODIFY", "old_path": "native/android/app/proguard-rules.pro", "new_path": "native/android/app/proguard-rules.pro", "diff": "# http://developer.android.com/guide/developing/tools/proguard.html\n# Add any project specific keep options here:\n-\n-# If your project uses WebView with JS, uncomment the following\n-# and specify the fully qualified class name to the JavaScript interface\n-# class:\n-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n-# public *;\n-#}\n" }, { "change_type": "MODIFY", "old_path": "native/android/app/src/main/java/org/squadcal/MainApplication.java", "new_path": "native/android/app/src/main/java/org/squadcal/MainApplication.java", "diff": "package org.squadcal;\nimport android.app.Application;\n+import android.util.Log;\n+import com.facebook.react.PackageList;\n+import com.facebook.hermes.reactexecutor.HermesExecutorFactory;\n+import com.facebook.react.bridge.JavaScriptExecutorFactory;\nimport com.facebook.react.ReactApplication;\nimport com.rnfs.RNFSPackage;\nimport fr.bamlab.rnimageresizer.ImageResizerPackage;\n@@ -40,28 +44,27 @@ public class MainApplication extends Application implements ReactApplication {\n@Override\nprotected List<ReactPackage> getPackages() {\n- return Arrays.<ReactPackage>asList(\n- new MainReactPackage(),\n- new RNFSPackage(),\n- new ImageResizerPackage(),\n- new LottiePackage(),\n- new CameraRollPackage(),\n- new RNFirebasePackage(),\n- new RNFirebaseMessagingPackage(),\n- new RNFirebaseNotificationsPackage(),\n- new NetInfoPackage(),\n- new AsyncStoragePackage(),\n- new ReanimatedPackage(),\n- new OrientationPackage(),\n- new FastImageViewPackage(),\n- new RNScreensPackage(),\n- new RNGestureHandlerPackage(),\n- new SplashScreenReactPackage(),\n- new RNExitAppPackage(),\n- new VectorIconsPackage(),\n- new KeychainPackage(),\n- new KeyboardInputPackage(this.getApplication())\n- );\n+ List<ReactPackage> packages = new PackageList(this).getPackages();\n+ packages.add(new RNFSPackage());\n+ packages.add(new ImageResizerPackage());\n+ packages.add(new LottiePackage());\n+ packages.add(new CameraRollPackage());\n+ packages.add(new RNFirebasePackage());\n+ packages.add(new RNFirebaseMessagingPackage());\n+ packages.add(new RNFirebaseNotificationsPackage());\n+ packages.add(new NetInfoPackage());\n+ packages.add(new AsyncStoragePackage());\n+ packages.add(new ReanimatedPackage());\n+ packages.add(new OrientationPackage());\n+ packages.add(new FastImageViewPackage());\n+ packages.add(new RNScreensPackage());\n+ packages.add(new RNGestureHandlerPackage());\n+ packages.add(new SplashScreenReactPackage());\n+ packages.add(new RNExitAppPackage());\n+ packages.add(new VectorIconsPackage());\n+ packages.add(new KeychainPackage());\n+ packages.add(new KeyboardInputPackage(this.getApplication()));\n+ return packages;\n}\n@Override\n" }, { "change_type": "MODIFY", "old_path": "native/android/app/src/main/res/values/styles.xml", "new_path": "native/android/app/src/main/res/values/styles.xml", "diff": "<style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n</style>\n<style name=\"SplashTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n+ <item name=\"android:textColor\">#000000</item>\n<item name=\"android:windowNoTitle\">true</item>\n<item name=\"android:background\">@drawable/splash</item>\n<item name=\"android:windowDrawsSystemBarBackgrounds\">false</item>\n" }, { "change_type": "MODIFY", "old_path": "native/android/build.gradle", "new_path": "native/android/build.gradle", "diff": "@@ -13,8 +13,8 @@ buildscript {\njcenter()\n}\ndependencies {\n- classpath 'com.android.tools.build:gradle:3.3.2'\n- classpath 'com.google.gms:google-services:4.2.0'\n+ classpath(\"com.android.tools.build:gradle:3.4.1\")\n+ classpath(\"com.google.gms:google-services:4.2.0\")\n// NOTE: Do not place your application dependencies here; they belong\n// in the individual module build.gradle files\n@@ -24,11 +24,15 @@ buildscript {\nallprojects {\nrepositories {\nmavenLocal()\n- google()\n- jcenter()\nmaven {\n// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm\n- url \"$rootDir/../node_modules/react-native/android\"\n+ url(\"$rootDir/../../node_modules/react-native/android\")\n+ }\n+ maven {\n+ // Android JSC is installed from npm\n+ url(\"$rootDir/../../node_modules/jsc-android/dist\")\n}\n+ google()\n+ jcenter()\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "native/android/gradle.properties", "new_path": "native/android/gradle.properties", "diff": "# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n+\n+android.useAndroidX=true\n+android.enableJetifier=true\n" }, { "change_type": "MODIFY", "old_path": "native/android/gradle/wrapper/gradle-wrapper.properties", "new_path": "native/android/gradle/wrapper/gradle-wrapper.properties", "diff": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\n+distributionUrl=https\\://services.gradle.org/distributions/gradle-5.4.1-all.zip\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n-distributionUrl=https\\://services.gradle.org/distributions/gradle-4.10.2-all.zip\n" }, { "change_type": "MODIFY", "old_path": "native/android/gradlew", "new_path": "native/android/gradlew", "diff": "#!/usr/bin/env sh\n+#\n+# Copyright 2015 the original author or authors.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+# http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+#\n+\n##############################################################################\n##\n## Gradle start up script for UN*X\n@@ -28,7 +44,7 @@ APP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\n-DEFAULT_JVM_OPTS=\"\"\n+DEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n" }, { "change_type": "MODIFY", "old_path": "native/android/gradlew.bat", "new_path": "native/android/gradlew.bat", "diff": "+@rem\n+@rem Copyright 2015 the original author or authors.\n+@rem\n+@rem Licensed under the Apache License, Version 2.0 (the \"License\");\n+@rem you may not use this file except in compliance with the License.\n+@rem You may obtain a copy of the License at\n+@rem\n+@rem http://www.apache.org/licenses/LICENSE-2.0\n+@rem\n+@rem Unless required by applicable law or agreed to in writing, software\n+@rem distributed under the License is distributed on an \"AS IS\" BASIS,\n+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+@rem See the License for the specific language governing permissions and\n+@rem limitations under the License.\n+@rem\n+\n@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\n-set DEFAULT_JVM_OPTS=\n+set DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n" }, { "change_type": "MODIFY", "old_path": "native/android/settings.gradle", "new_path": "native/android/settings.gradle", "diff": "rootProject.name = 'SquadCal'\n+apply from: file(\"../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle\");\n+applyNativeModulesSettingsGradle(settings, \"../..\")\n+\ninclude ':react-native-fs'\nproject(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')\ninclude ':react-native-image-resizer'\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] RN 0.60 upgrade: Android
129,187
18.09.2019 16:27:08
14,400
8654c13cef28d327b12c24b2971bb0858a47095f
[native] RN 0.60 upgrade: get rid of BUCK config for Android
[ { "change_type": "DELETE", "old_path": "native/android/app/BUCK", "new_path": null, "diff": "-# To learn about Buck see [Docs](https://buckbuild.com/).\n-# To run your application with Buck:\n-# - install Buck\n-# - `npm start` - to start the packager\n-# - `cd android`\n-# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname \"CN=Android Debug,O=Android,C=US\"`\n-# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck\n-# - `buck install -r android/app` - compile, install and run application\n-#\n-\n-load(\":build_defs.bzl\", \"create_aar_targets\", \"create_jar_targets\")\n-\n-lib_deps = []\n-\n-create_aar_targets(glob([\"libs/*.aar\"]))\n-\n-create_jar_targets(glob([\"libs/*.jar\"]))\n-\n-android_library(\n- name = \"all-libs\",\n- exported_deps = lib_deps,\n-)\n-\n-android_library(\n- name = \"app-code\",\n- srcs = glob([\n- \"src/main/java/**/*.java\",\n- ]),\n- deps = [\n- \":all-libs\",\n- \":build_config\",\n- \":res\",\n- ],\n-)\n-\n-android_build_config(\n- name = \"build_config\",\n- package = \"org.squadcal\",\n-)\n-\n-android_resource(\n- name = \"res\",\n- package = \"org.squadcal\",\n- res = \"src/main/res\",\n-)\n-\n-android_binary(\n- name = \"app\",\n- keystore = \"//android/keystores:debug\",\n- manifest = \"src/main/AndroidManifest.xml\",\n- package_type = \"debug\",\n- deps = [\n- \":app-code\",\n- ],\n-)\n" }, { "change_type": "DELETE", "old_path": "native/android/keystores/BUCK", "new_path": null, "diff": "-keystore(\n- name = \"debug\",\n- properties = \"debug.keystore.properties\",\n- store = \"debug.keystore\",\n- visibility = [\n- \"PUBLIC\",\n- ],\n-)\n" }, { "change_type": "DELETE", "old_path": "native/android/keystores/debug.keystore.properties", "new_path": null, "diff": "-key.store=debug.keystore\n-key.alias=androiddebugkey\n-key.store.password=android\n-key.alias.password=android\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] RN 0.60 upgrade: get rid of BUCK config for Android
129,187
18.09.2019 17:09:31
14,400
2220dee4ca6d94092557dab355c76b5fbbc2928a
[native] RN 0.60 upgrade: CocoaPods and autolinking
[ { "change_type": "MODIFY", "old_path": "native/ios/Podfile", "new_path": "native/ios/Podfile", "diff": "-# Uncomment the next line to define a global platform for your project\n-# platform :ios, '9.0'\n+platform :ios, '9.0'\n+require_relative '../../node_modules/@react-native-community/cli-platform-ios/native_modules'\ntarget 'SquadCal' do\n- # Uncomment the next line if you're using Swift or would like to use dynamic frameworks\n- # use_frameworks!\n-\n# Pods for SquadCal\n- pod 'React', :path => '../../node_modules/react-native', :subspecs => [\n- 'Core',\n- 'CxxBridge',\n- 'DevSupport',\n- 'RCTText',\n- 'RCTNetwork',\n- 'RCTWebSocket',\n- 'RCTAnimation',\n- 'RCTImage',\n- 'RCTLinkingIOS',\n- 'RCTCameraRoll',\n- 'RCTBlob',\n- 'RCTVibration',\n- 'ART',\n- ]\n+ pod 'React', :path => '../../node_modules/react-native/'\n+ pod 'React-Core', :path => '../../node_modules/react-native/React'\n+ pod 'React-DevSupport', :path => '../../node_modules/react-native/React'\n+ pod 'React-RCTActionSheet', :path => '../../node_modules/react-native/Libraries/ActionSheetIOS'\n+ pod 'React-RCTAnimation', :path => '../../node_modules/react-native/Libraries/NativeAnimation'\n+ pod 'React-RCTBlob', :path => '../../node_modules/react-native/Libraries/Blob'\n+ pod 'React-RCTImage', :path => '../../node_modules/react-native/Libraries/Image'\n+ pod 'React-RCTLinking', :path => '../../node_modules/react-native/Libraries/LinkingIOS'\n+ pod 'React-RCTNetwork', :path => '../../node_modules/react-native/Libraries/Network'\n+ pod 'React-RCTSettings', :path => '../../node_modules/react-native/Libraries/Settings'\n+ pod 'React-RCTText', :path => '../../node_modules/react-native/Libraries/Text'\n+ pod 'React-RCTVibration', :path => '../../node_modules/react-native/Libraries/Vibration'\n+ pod 'React-RCTWebSocket', :path => '../../node_modules/react-native/Libraries/WebSocket'\n+ pod 'React-ART', :path => '../../node_modules/react-native/Libraries/ART'\n+ pod 'React-RCTCameraRoll', :path => '../../node_modules/react-native/Libraries/CameraRoll'\n+ pod 'React-cxxreact', :path => '../../node_modules/react-native/ReactCommon/cxxreact'\n+ pod 'React-jsi', :path => '../../node_modules/react-native/ReactCommon/jsi'\n+ pod 'React-jsiexecutor', :path => '../../node_modules/react-native/ReactCommon/jsiexecutor'\n+ pod 'React-jsinspector', :path => '../../node_modules/react-native/ReactCommon/jsinspector'\npod 'yoga', :path => '../../node_modules/react-native/ReactCommon/yoga'\n+\npod 'DoubleConversion', :podspec => '../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'\npod 'glog', :podspec => '../../node_modules/react-native/third-party-podspecs/glog.podspec'\npod 'Folly', :podspec => '../../node_modules/react-native/third-party-podspecs/Folly.podspec'\n@@ -47,4 +49,5 @@ target 'SquadCal' do\npod 'react-native-image-resizer', :path => '../../node_modules/react-native-image-resizer'\npod 'RNFS', :path => '../../node_modules/react-native-fs'\n+ use_native_modules!(\"../..\")\nend\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Podfile.lock", "new_path": "native/ios/Podfile.lock", "diff": "@@ -11,8 +11,53 @@ PODS:\n- lottie-react-native (2.6.1):\n- lottie-ios (~> 2.5.0)\n- React\n- - React (0.59.8):\n- - React/Core (= 0.59.8)\n+ - React (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-DevSupport (= 0.60.5)\n+ - React-RCTActionSheet (= 0.60.5)\n+ - React-RCTAnimation (= 0.60.5)\n+ - React-RCTBlob (= 0.60.5)\n+ - React-RCTImage (= 0.60.5)\n+ - React-RCTLinking (= 0.60.5)\n+ - React-RCTNetwork (= 0.60.5)\n+ - React-RCTSettings (= 0.60.5)\n+ - React-RCTText (= 0.60.5)\n+ - React-RCTVibration (= 0.60.5)\n+ - React-RCTWebSocket (= 0.60.5)\n+ - React-ART (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-Core (0.60.5):\n+ - Folly (= 2018.10.22.00)\n+ - React-cxxreact (= 0.60.5)\n+ - React-jsiexecutor (= 0.60.5)\n+ - yoga (= 0.60.5.React)\n+ - React-cxxreact (0.60.5):\n+ - boost-for-react-native (= 1.63.0)\n+ - DoubleConversion\n+ - Folly (= 2018.10.22.00)\n+ - glog\n+ - React-jsinspector (= 0.60.5)\n+ - React-DevSupport (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-RCTWebSocket (= 0.60.5)\n+ - React-jsi (0.60.5):\n+ - boost-for-react-native (= 1.63.0)\n+ - DoubleConversion\n+ - Folly (= 2018.10.22.00)\n+ - glog\n+ - React-jsi/Default (= 0.60.5)\n+ - React-jsi/Default (0.60.5):\n+ - boost-for-react-native (= 1.63.0)\n+ - DoubleConversion\n+ - Folly (= 2018.10.22.00)\n+ - glog\n+ - React-jsiexecutor (0.60.5):\n+ - DoubleConversion\n+ - Folly (= 2018.10.22.00)\n+ - glog\n+ - React-cxxreact (= 0.60.5)\n+ - React-jsi (= 0.60.5)\n+ - React-jsinspector (0.60.5)\n- react-native-async-storage (1.3.0):\n- React\n- react-native-cameraroll (1.0.5):\n@@ -40,58 +85,32 @@ PODS:\n- React\n- react-native-splash-screen (3.1.1):\n- React\n- - React/ART (0.59.8):\n- - React/Core\n- - React/Core (0.59.8):\n- - yoga (= 0.59.8.React)\n- - React/CxxBridge (0.59.8):\n- - Folly (= 2018.10.22.00)\n- - React/Core\n- - React/cxxreact\n- - React/jsiexecutor\n- - React/cxxreact (0.59.8):\n- - boost-for-react-native (= 1.63.0)\n- - DoubleConversion\n- - Folly (= 2018.10.22.00)\n- - glog\n- - React/jsinspector\n- - React/DevSupport (0.59.8):\n- - React/Core\n- - React/RCTWebSocket\n- - React/fishhook (0.59.8)\n- - React/jsi (0.59.8):\n- - DoubleConversion\n- - Folly (= 2018.10.22.00)\n- - glog\n- - React/jsiexecutor (0.59.8):\n- - DoubleConversion\n- - Folly (= 2018.10.22.00)\n- - glog\n- - React/cxxreact\n- - React/jsi\n- - React/jsinspector (0.59.8)\n- - React/RCTAnimation (0.59.8):\n- - React/Core\n- - React/RCTBlob (0.59.8):\n- - React/Core\n- - React/RCTCameraRoll (0.59.8):\n- - React/Core\n- - React/RCTImage\n- - React/RCTImage (0.59.8):\n- - React/Core\n- - React/RCTNetwork\n- - React/RCTLinkingIOS (0.59.8):\n- - React/Core\n- - React/RCTNetwork (0.59.8):\n- - React/Core\n- - React/RCTText (0.59.8):\n- - React/Core\n- - React/RCTVibration (0.59.8):\n- - React/Core\n- - React/RCTWebSocket (0.59.8):\n- - React/Core\n- - React/fishhook\n- - React/RCTBlob\n+ - React-RCTActionSheet (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-RCTAnimation (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-RCTBlob (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-RCTNetwork (= 0.60.5)\n+ - React-RCTWebSocket (= 0.60.5)\n+ - React-RCTCameraRoll (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-RCTImage (= 0.60.5)\n+ - React-RCTImage (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-RCTNetwork (= 0.60.5)\n+ - React-RCTLinking (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-RCTNetwork (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-RCTSettings (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-RCTText (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-RCTVibration (0.60.5):\n+ - React-Core (= 0.60.5)\n+ - React-RCTWebSocket (0.60.5):\n+ - React-Core (= 0.60.5)\n- RNFS (2.13.3):\n- React\n- RNGestureHandler (1.3.0):\n@@ -107,13 +126,21 @@ PODS:\n- SDWebImage (5.0.6):\n- SDWebImage/Core (= 5.0.6)\n- SDWebImage/Core (5.0.6)\n- - yoga (0.59.8.React)\n+ - yoga (0.60.5.React)\nDEPENDENCIES:\n- DoubleConversion (from `../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)\n- Folly (from `../../node_modules/react-native/third-party-podspecs/Folly.podspec`)\n- glog (from `../../node_modules/react-native/third-party-podspecs/glog.podspec`)\n- lottie-react-native (from `../../node_modules/lottie-react-native`)\n+ - React (from `../../node_modules/react-native/`)\n+ - React-ART (from `../../node_modules/react-native/Libraries/ART`)\n+ - React-Core (from `../../node_modules/react-native/React`)\n+ - React-cxxreact (from `../../node_modules/react-native/ReactCommon/cxxreact`)\n+ - React-DevSupport (from `../../node_modules/react-native/React`)\n+ - React-jsi (from `../../node_modules/react-native/ReactCommon/jsi`)\n+ - React-jsiexecutor (from `../../node_modules/react-native/ReactCommon/jsiexecutor`)\n+ - React-jsinspector (from `../../node_modules/react-native/ReactCommon/jsinspector`)\n- \"react-native-async-storage (from `../../node_modules/@react-native-community/async-storage`)\"\n- \"react-native-cameraroll (from `../../node_modules/@react-native-community/cameraroll`)\"\n- react-native-exit-app (from `../../node_modules/react-native-exit-app`)\n@@ -126,19 +153,17 @@ DEPENDENCIES:\n- react-native-onepassword (from `../../node_modules/react-native-onepassword`)\n- react-native-orientation-locker (from `../../node_modules/react-native-orientation-locker`)\n- react-native-splash-screen (from `../../node_modules/react-native-splash-screen`)\n- - React/ART (from `../../node_modules/react-native`)\n- - React/Core (from `../../node_modules/react-native`)\n- - React/CxxBridge (from `../../node_modules/react-native`)\n- - React/DevSupport (from `../../node_modules/react-native`)\n- - React/RCTAnimation (from `../../node_modules/react-native`)\n- - React/RCTBlob (from `../../node_modules/react-native`)\n- - React/RCTCameraRoll (from `../../node_modules/react-native`)\n- - React/RCTImage (from `../../node_modules/react-native`)\n- - React/RCTLinkingIOS (from `../../node_modules/react-native`)\n- - React/RCTNetwork (from `../../node_modules/react-native`)\n- - React/RCTText (from `../../node_modules/react-native`)\n- - React/RCTVibration (from `../../node_modules/react-native`)\n- - React/RCTWebSocket (from `../../node_modules/react-native`)\n+ - React-RCTActionSheet (from `../../node_modules/react-native/Libraries/ActionSheetIOS`)\n+ - React-RCTAnimation (from `../../node_modules/react-native/Libraries/NativeAnimation`)\n+ - React-RCTBlob (from `../../node_modules/react-native/Libraries/Blob`)\n+ - React-RCTCameraRoll (from `../../node_modules/react-native/Libraries/CameraRoll`)\n+ - React-RCTImage (from `../../node_modules/react-native/Libraries/Image`)\n+ - React-RCTLinking (from `../../node_modules/react-native/Libraries/LinkingIOS`)\n+ - React-RCTNetwork (from `../../node_modules/react-native/Libraries/Network`)\n+ - React-RCTSettings (from `../../node_modules/react-native/Libraries/Settings`)\n+ - React-RCTText (from `../../node_modules/react-native/Libraries/Text`)\n+ - React-RCTVibration (from `../../node_modules/react-native/Libraries/Vibration`)\n+ - React-RCTWebSocket (from `../../node_modules/react-native/Libraries/WebSocket`)\n- RNFS (from `../../node_modules/react-native-fs`)\n- RNGestureHandler (from `../../node_modules/react-native-gesture-handler`)\n- RNKeychain (from `../../node_modules/react-native-keychain`)\n@@ -164,7 +189,21 @@ EXTERNAL SOURCES:\nlottie-react-native:\n:path: \"../../node_modules/lottie-react-native\"\nReact:\n- :path: \"../../node_modules/react-native\"\n+ :path: \"../../node_modules/react-native/\"\n+ React-ART:\n+ :path: \"../../node_modules/react-native/Libraries/ART\"\n+ React-Core:\n+ :path: \"../../node_modules/react-native/React\"\n+ React-cxxreact:\n+ :path: \"../../node_modules/react-native/ReactCommon/cxxreact\"\n+ React-DevSupport:\n+ :path: \"../../node_modules/react-native/React\"\n+ React-jsi:\n+ :path: \"../../node_modules/react-native/ReactCommon/jsi\"\n+ React-jsiexecutor:\n+ :path: \"../../node_modules/react-native/ReactCommon/jsiexecutor\"\n+ React-jsinspector:\n+ :path: \"../../node_modules/react-native/ReactCommon/jsinspector\"\nreact-native-async-storage:\n:path: \"../../node_modules/@react-native-community/async-storage\"\nreact-native-cameraroll:\n@@ -189,6 +228,28 @@ EXTERNAL SOURCES:\n:path: \"../../node_modules/react-native-orientation-locker\"\nreact-native-splash-screen:\n:path: \"../../node_modules/react-native-splash-screen\"\n+ React-RCTActionSheet:\n+ :path: \"../../node_modules/react-native/Libraries/ActionSheetIOS\"\n+ React-RCTAnimation:\n+ :path: \"../../node_modules/react-native/Libraries/NativeAnimation\"\n+ React-RCTBlob:\n+ :path: \"../../node_modules/react-native/Libraries/Blob\"\n+ React-RCTCameraRoll:\n+ :path: \"../../node_modules/react-native/Libraries/CameraRoll\"\n+ React-RCTImage:\n+ :path: \"../../node_modules/react-native/Libraries/Image\"\n+ React-RCTLinking:\n+ :path: \"../../node_modules/react-native/Libraries/LinkingIOS\"\n+ React-RCTNetwork:\n+ :path: \"../../node_modules/react-native/Libraries/Network\"\n+ React-RCTSettings:\n+ :path: \"../../node_modules/react-native/Libraries/Settings\"\n+ React-RCTText:\n+ :path: \"../../node_modules/react-native/Libraries/Text\"\n+ React-RCTVibration:\n+ :path: \"../../node_modules/react-native/Libraries/Vibration\"\n+ React-RCTWebSocket:\n+ :path: \"../../node_modules/react-native/Libraries/WebSocket\"\nRNFS:\n:path: \"../../node_modules/react-native-fs\"\nRNGestureHandler:\n@@ -212,7 +273,14 @@ SPEC CHECKSUMS:\nglog: aefd1eb5dda2ab95ba0938556f34b98e2da3a60d\nlottie-ios: a50d5c0160425cd4b01b852bb9578963e6d92d31\nlottie-react-native: 3d8181d43619b1fe804c828bd5a09d20fe8bdea7\n- React: 76e6aa2b87d05eb6cccb6926d72685c9a07df152\n+ React: 53c53c4d99097af47cf60594b8706b4e3321e722\n+ React-ART: 662252e1a2f87f7d4e56150403040b4cd725c0f9\n+ React-Core: ba421f6b4f4cbe2fb17c0b6fc675f87622e78a64\n+ React-cxxreact: 8384287780c4999351ad9b6e7a149d9ed10a2395\n+ React-DevSupport: 197fb409737cff2c4f9986e77c220d7452cb9f9f\n+ React-jsi: 4d8c9efb6312a9725b18d6fc818ffc103f60fec2\n+ React-jsiexecutor: 90ad2f9db09513fc763bc757fdc3c4ff8bde2a30\n+ React-jsinspector: e08662d1bf5b129a3d556eb9ea343a3f40353ae4\nreact-native-async-storage: 6aa3086d7b4f45e49adc8e087b4a03e47279aa1b\nreact-native-cameraroll: b1faef9f2ea27b07bdf818b8043909a93f797eca\nreact-native-exit-app: 3f9b8c2f2071f7e51fba21dfac9fc235c1764e84\n@@ -225,6 +293,17 @@ SPEC CHECKSUMS:\nreact-native-onepassword: 5b2b7f425f9db40932703e65d350b78cbc598047\nreact-native-orientation-locker: 132a63bab4dddd2a5709f6f7935ad9676b0af7c5\nreact-native-splash-screen: 353334c5ae82d8c74501ea7cbb916cb7cb20c8bf\n+ React-RCTActionSheet: b0f1ea83f4bf75fb966eae9bfc47b78c8d3efd90\n+ React-RCTAnimation: 359ba1b5690b1e87cc173558a78e82d35919333e\n+ React-RCTBlob: 5e2b55f76e9a1c7ae52b826923502ddc3238df24\n+ React-RCTCameraRoll: 5f1df2809c06d2df3ddf96ae257221f11351d613\n+ React-RCTImage: f5f1c50922164e89bdda67bcd0153952a5cfe719\n+ React-RCTLinking: d0ecbd791e9ddddc41fa1f66b0255de90e8ee1e9\n+ React-RCTNetwork: e26946300b0ab7bb6c4a6348090e93fa21f33a9d\n+ React-RCTSettings: d0d37cb521b7470c998595a44f05847777cc3f42\n+ React-RCTText: b074d89033583d4f2eb5faf7ea2db3a13c7553a2\n+ React-RCTVibration: 2105b2e0e2b66a6408fc69a46c8a7fb5b2fdade0\n+ React-RCTWebSocket: cd932a16b7214898b6b7f788c8bddb3637246ac4\nRNFS: c9bbde46b0d59619f8e7b735991c60e0f73d22c1\nRNGestureHandler: 5329a942fce3d41c68b84c2c2276ce06a696d8b0\nRNKeychain: 3aa3cf891a09a0d18d306862ab2bb9e106079b24\n@@ -232,8 +311,8 @@ SPEC CHECKSUMS:\nRNScreens: 000c9e6e31c9a483688943155107e4ca9394d37a\nRNVectorIcons: a3c395829c56e2cb054a0730126298bf805a2dca\nSDWebImage: 920f1a2ff1ca8296ad34f6e0510a1ef1d70ac965\n- yoga: 92b2102c3d373d1a790db4ab761d2b0ffc634f64\n+ yoga: 312528f5bbbba37b4dcea5ef00e8b4033fdd9411\n-PODFILE CHECKSUM: d68660062797aa26dcc4ed29a68f784f9b0cefca\n+PODFILE CHECKSUM: 6354828c20c7daa0dceb587b5c1d542c273a889e\nCOCOAPODS: 1.7.5\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/react-native.config.js", "diff": "+module.exports = {\n+ dependencies: {\n+ 'react-native-firebase': { platforms: { ios: null } },\n+ },\n+};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] RN 0.60 upgrade: CocoaPods and autolinking
129,187
18.09.2019 17:09:13
14,400
4087584b7f2650d4d4d879d0a71459c9ee37acf2
[native] RN 0.60 upgrade: iOS
[ { "change_type": "MODIFY", "old_path": "native/ios/SquadCal.xcodeproj/project.pbxproj", "new_path": "native/ios/SquadCal.xcodeproj/project.pbxproj", "diff": "13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = SquadCal/AppDelegate.m; sourceTree = \"<group>\"; };\n13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = \"<group>\"; };\n13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SquadCal/Images.xcassets; sourceTree = \"<group>\"; };\n- 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = SquadCal/Info.plist; sourceTree = \"<group>\"; };\n+ 13B07FB61A68108700A75B9A /* Info.release.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.release.plist; path = SquadCal/Info.release.plist; sourceTree = \"<group>\"; };\n13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = SquadCal/main.m; sourceTree = \"<group>\"; };\n1BACB9A55ECC42C38F5FE331 /* Feather.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Feather.ttf; path = \"../node_modules/react-native-vector-icons/Fonts/Feather.ttf\"; sourceTree = \"<group>\"; };\n1D93876C58814C70A51B11CA /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = SimpleLineIcons.ttf; path = \"../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf\"; sourceTree = \"<group>\"; };\n6D556981F43D459CB36250F9 /* Zocial.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Zocial.ttf; path = \"../node_modules/react-native-vector-icons/Fonts/Zocial.ttf\"; sourceTree = \"<group>\"; };\n76DBEB73A008439E97F240AC /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = \"../node_modules/react-native-vector-icons/Fonts/Entypo.ttf\"; sourceTree = \"<group>\"; };\n7EE5A7681B39319D3AF09109 /* Pods-SquadCal.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-SquadCal.release.xcconfig\"; path = \"Target Support Files/Pods-SquadCal/Pods-SquadCal.release.xcconfig\"; sourceTree = \"<group>\"; };\n+ 7F554F822332D58B007CB9F7 /* Info.debug.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.debug.plist; path = SquadCal/Info.debug.plist; sourceTree = \"<group>\"; };\n7F761E292201141E001B6FB7 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };\n7FB58ABB1E7F6BC600B4C1B1 /* Anaheim-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = \"Anaheim-Regular.ttf\"; sourceTree = \"<group>\"; };\n7FB58ABC1E7F6BC600B4C1B1 /* OpenSans-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = \"OpenSans-Regular.ttf\"; sourceTree = \"<group>\"; };\n13B07FAF1A68108700A75B9A /* AppDelegate.h */,\n13B07FB01A68108700A75B9A /* AppDelegate.m */,\n13B07FB51A68108700A75B9A /* Images.xcassets */,\n- 13B07FB61A68108700A75B9A /* Info.plist */,\n+ 7F554F822332D58B007CB9F7 /* Info.debug.plist */,\n+ 13B07FB61A68108700A75B9A /* Info.release.plist */,\n13B07FB11A68108700A75B9A /* LaunchScreen.xib */,\n13B07FB71A68108700A75B9A /* main.m */,\n);\n\"$(inherited)\",\n\"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\",\n);\n- INFOPLIST_FILE = SquadCal/Info.plist;\n+ INFOPLIST_FILE = SquadCal/Info.debug.plist;\nLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\nOTHER_LDFLAGS = (\n\"$(inherited)\",\n\"$(inherited)\",\n\"$(SRCROOT)/../node_modules/react-native/Libraries/LinkingIOS\",\n);\n- INFOPLIST_FILE = SquadCal/Info.plist;\n+ INFOPLIST_FILE = SquadCal/Info.release.plist;\nLD_RUNPATH_SEARCH_PATHS = \"$(inherited) @executable_path/Frameworks\";\nOTHER_LDFLAGS = (\n\"$(inherited)\",\n" }, { "change_type": "RENAME", "old_path": "native/ios/SquadCal/Info.plist", "new_path": "native/ios/SquadCal/Info.debug.plist", "diff": "<true/>\n<key>NSAppTransportSecurity</key>\n<dict>\n+ <key>NSAllowsArbitraryLoads</key>\n+ <true/>\n<key>NSExceptionDomains</key>\n<dict>\n<key>localhost</key>\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/ios/SquadCal/Info.release.plist", "diff": "+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n+<plist version=\"1.0\">\n+<dict>\n+ <key>CFBundleDevelopmentRegion</key>\n+ <string>en</string>\n+ <key>CFBundleDisplayName</key>\n+ <string>SquadCal</string>\n+ <key>CFBundleExecutable</key>\n+ <string>$(EXECUTABLE_NAME)</string>\n+ <key>CFBundleIdentifier</key>\n+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n+ <key>CFBundleInfoDictionaryVersion</key>\n+ <string>6.0</string>\n+ <key>CFBundleName</key>\n+ <string>$(PRODUCT_NAME)</string>\n+ <key>CFBundlePackageType</key>\n+ <string>APPL</string>\n+ <key>CFBundleShortVersionString</key>\n+ <string>0.0.34</string>\n+ <key>CFBundleSignature</key>\n+ <string>????</string>\n+ <key>CFBundleVersion</key>\n+ <string>34</string>\n+ <key>LSApplicationQueriesSchemes</key>\n+ <array>\n+ <string>org-appextension-feature-password-management</string>\n+ </array>\n+ <key>LSRequiresIPhoneOS</key>\n+ <true/>\n+ <key>NSLocationAlwaysUsageDescription</key>\n+ <string>Allow $(PRODUCT_NAME) to use your location</string>\n+ <key>NSLocationWhenInUseUsageDescription</key>\n+ <string>Allow $(PRODUCT_NAME) to access your location</string>\n+ <key>NSPhotoLibraryUsageDescription</key>\n+ <string>Give $(PRODUCT_NAME) permission to access your photos</string>\n+ <key>NSPhotoLibraryAddUsageDescription</key>\n+ <string>Give $(PRODUCT_NAME) permission to save photos to your camera roll</string>\n+ <key>UIAppFonts</key>\n+ <array>\n+ <string>OpenSans-Semibold.ttf</string>\n+ <string>OpenSans-Regular.ttf</string>\n+ <string>Anaheim-Regular.ttf</string>\n+ <string>Entypo.ttf</string>\n+ <string>EvilIcons.ttf</string>\n+ <string>Feather.ttf</string>\n+ <string>FontAwesome.ttf</string>\n+ <string>Foundation.ttf</string>\n+ <string>Ionicons.ttf</string>\n+ <string>MaterialCommunityIcons.ttf</string>\n+ <string>MaterialIcons.ttf</string>\n+ <string>Octicons.ttf</string>\n+ <string>SimpleLineIcons.ttf</string>\n+ <string>Zocial.ttf</string>\n+ </array>\n+ <key>UIBackgroundModes</key>\n+ <array>\n+ <string>fetch</string>\n+ <string>remote-notification</string>\n+ </array>\n+ <key>UILaunchStoryboardName</key>\n+ <string>LaunchScreen</string>\n+ <key>UIRequiredDeviceCapabilities</key>\n+ <array>\n+ <string>armv7</string>\n+ </array>\n+ <key>UIStatusBarStyle</key>\n+ <string>UIStatusBarStyleLightContent</string>\n+ <key>UISupportedInterfaceOrientations</key>\n+ <array>\n+ <string>UIInterfaceOrientationPortrait</string>\n+ <string>UIInterfaceOrientationLandscapeLeft</string>\n+ <string>UIInterfaceOrientationLandscapeRight</string>\n+ </array>\n+ <key>UIViewControllerBasedStatusBarAppearance</key>\n+ <false/>\n+</dict>\n+</plist>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] RN 0.60 upgrade: iOS
129,187
18.09.2019 17:59:18
14,400
4c5841c6084bfba0f115127b1e04790414403a42
[native] RN 0.60 upgrade: AndroidX
[ { "change_type": "MODIFY", "old_path": "native/android/app/src/main/java/org/squadcal/SplashActivity.java", "new_path": "native/android/app/src/main/java/org/squadcal/SplashActivity.java", "diff": "@@ -2,7 +2,7 @@ package org.squadcal;\nimport android.content.Intent;\nimport android.os.Bundle;\n-import android.support.v7.app.AppCompatActivity;\n+import androidx.appcompat.app.AppCompatActivity;\npublic class SplashActivity extends AppCompatActivity {\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"version\": \"0.0.1\",\n\"private\": true,\n\"scripts\": {\n- \"postinstall\": \"node link-workspaces.js && cd ../ && patch-package && npx flow-mono create-symlinks native/.flowconfig\",\n+ \"postinstall\": \"node link-workspaces.js && cd ../ && patch-package && npx flow-mono create-symlinks native/.flowconfig && cd native && npx jetify\",\n\"start\": \"react-native start\",\n\"test\": \"jest\",\n\"lint\": \"eslint .\",\n\"flow-mono-cli\": \"^1.5.0\",\n\"get-yarn-workspaces\": \"^1.0.2\",\n\"jest\": \"^24.8.0\",\n+ \"jetifier\": \"^1.6.4\",\n\"metro-react-native-babel-preset\": \"^0.56.0\",\n\"postinstall-postinstall\": \"^2.0.0\",\n\"react-devtools\": \"^3.0.0\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -7564,7 +7564,7 @@ jest@^24.8.0:\nimport-local \"^2.0.0\"\njest-cli \"^24.8.0\"\n-jetifier@^1.6.2:\n+jetifier@^1.6.2, jetifier@^1.6.4:\nversion \"1.6.4\"\nresolved \"https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.4.tgz#6159db8e275d97980d26162897a0648b6d4a3222\"\nintegrity sha512-+f/4OLeqY8RAmXnonI1ffeY1DR8kMNJPhv5WMFehchf7U71cjMQVKkOz1n6asz6kfVoAqKNWJz1A/18i18AcXA==\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] RN 0.60 upgrade: AndroidX
129,187
18.09.2019 21:12:25
14,400
54b3a62cab58156aff5a099f4ae711ccfd1a26df
[native] RN 0.60 upgrade: hack around react-native#25349 This hack involves creating a Swift file to make Lottie build. This can be removed after I upgrade to 0.61
[ { "change_type": "ADD", "old_path": null, "new_path": "native/ios/SquadCal-Bridging-Header.h", "diff": "+//\n+// Use this file to import your target's public headers that you would like to expose to Swift.\n+//\n+\n" }, { "change_type": "MODIFY", "old_path": "native/ios/SquadCal.xcodeproj/project.pbxproj", "new_path": "native/ios/SquadCal.xcodeproj/project.pbxproj", "diff": "607744A506864BBFB613E564 /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FCCE5C8B3DFB401DBAA9DFD3 /* MaterialIcons.ttf */; };\n6E48D65FC9124F33BAC971A5 /* Fontisto.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B7FE121AC9084F9DBA08CE72 /* Fontisto.ttf */; };\n737A143D6BAB4AA1B75F312F /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E663A985A31348DA8FCBF390 /* SimpleLineIcons.ttf */; };\n- 7A268A2AFE9567F31748FBD5 /* Pods_SquadCal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BFE2CAB0C43D1B945AC4FFBB /* Pods_SquadCal.framework */; };\n+ 79E6AA073D734E63267D7356 /* libPods-SquadCal.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F03667D146661AF6D8C91AB9 /* libPods-SquadCal.a */; };\n7F761E602201141E001B6FB7 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F761E292201141E001B6FB7 /* JavaScriptCore.framework */; };\n+ 7F8FB0942333063D007EF826 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8FB0932333063D007EF826 /* File.swift */; };\n7FB58ABE1E7F6BD500B4C1B1 /* Anaheim-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7FB58ABB1E7F6BC600B4C1B1 /* Anaheim-Regular.ttf */; };\n7FB58AC01E7F6BD800B4C1B1 /* OpenSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7FB58ABC1E7F6BC600B4C1B1 /* OpenSans-Regular.ttf */; };\n7FB58AC21E7F6BDB00B4C1B1 /* OpenSans-Semibold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7FB58ABD1E7F6BC600B4C1B1 /* OpenSans-Semibold.ttf */; };\n/* Begin PBXFileReference section */\n008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = \"<group>\"; };\n- 07106322C50B43E2BA1EBD08 /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf\"; sourceTree = \"<group>\"; };\n- 0917E036BA8C4493842D32EA /* FontAwesome5_Brands.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Brands.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf\"; sourceTree = \"<group>\"; };\n+ 07106322C50B43E2BA1EBD08 /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf\"; sourceTree = \"<group>\"; };\n+ 0917E036BA8C4493842D32EA /* FontAwesome5_Brands.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Brands.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf\"; sourceTree = \"<group>\"; };\n13B07F961A680F5B00A75B9A /* SquadCal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SquadCal.app; sourceTree = BUILT_PRODUCTS_DIR; };\n13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = SquadCal/AppDelegate.h; sourceTree = \"<group>\"; };\n13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = SquadCal/AppDelegate.m; sourceTree = \"<group>\"; };\n13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SquadCal/Images.xcassets; sourceTree = \"<group>\"; };\n13B07FB61A68108700A75B9A /* Info.release.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.release.plist; path = SquadCal/Info.release.plist; sourceTree = \"<group>\"; };\n13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = SquadCal/main.m; sourceTree = \"<group>\"; };\n- 4A28325061E84F39BBD766CD /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf\"; sourceTree = \"<group>\"; };\n- 6139C442103C42B7AEBE3BA1 /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf\"; sourceTree = \"<group>\"; };\n- 733977EFDC7A4BA4B6A45361 /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf\"; sourceTree = \"<group>\"; };\n+ 4A28325061E84F39BBD766CD /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf\"; sourceTree = \"<group>\"; };\n+ 6139C442103C42B7AEBE3BA1 /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf\"; sourceTree = \"<group>\"; };\n+ 733977EFDC7A4BA4B6A45361 /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf\"; sourceTree = \"<group>\"; };\n7EE5A7681B39319D3AF09109 /* Pods-SquadCal.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-SquadCal.release.xcconfig\"; path = \"Target Support Files/Pods-SquadCal/Pods-SquadCal.release.xcconfig\"; sourceTree = \"<group>\"; };\n7F554F822332D58B007CB9F7 /* Info.debug.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.debug.plist; path = SquadCal/Info.debug.plist; sourceTree = \"<group>\"; };\n7F761E292201141E001B6FB7 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };\n+ 7F8FB0922333063C007EF826 /* SquadCal-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = \"SquadCal-Bridging-Header.h\"; sourceTree = \"<group>\"; };\n+ 7F8FB0932333063D007EF826 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = \"<group>\"; };\n7FB58ABB1E7F6BC600B4C1B1 /* Anaheim-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = \"Anaheim-Regular.ttf\"; sourceTree = \"<group>\"; };\n7FB58ABC1E7F6BC600B4C1B1 /* OpenSans-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = \"OpenSans-Regular.ttf\"; sourceTree = \"<group>\"; };\n7FB58ABD1E7F6BC600B4C1B1 /* OpenSans-Semibold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = \"OpenSans-Semibold.ttf\"; sourceTree = \"<group>\"; };\n7FCFD8BD1E81B8DF00629B0E /* SquadCal.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = SquadCal.entitlements; path = SquadCal/SquadCal.entitlements; sourceTree = \"<group>\"; };\n8C0A50BD3E650F9A49DACD73 /* Pods-SquadCal.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-SquadCal.debug.xcconfig\"; path = \"Target Support Files/Pods-SquadCal/Pods-SquadCal.debug.xcconfig\"; sourceTree = \"<group>\"; };\n- 9DC351F0B1FD4C86AD8F2043 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialCommunityIcons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf\"; sourceTree = \"<group>\"; };\n- AD6C26A857AD4C9498785843 /* Zocial.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = Zocial.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf\"; sourceTree = \"<group>\"; };\n- B2EEE87D5ACA431D88615C31 /* Feather.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = Feather.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Feather.ttf\"; sourceTree = \"<group>\"; };\n- B7FE121AC9084F9DBA08CE72 /* Fontisto.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = Fontisto.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf\"; sourceTree = \"<group>\"; };\n- BDF8B32925164FC9ADBF26E9 /* FontAwesome5_Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Regular.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf\"; sourceTree = \"<group>\"; };\n- BFE2CAB0C43D1B945AC4FFBB /* Pods_SquadCal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SquadCal.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n- D8C02AD6D7BF4C9888DE3206 /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf\"; sourceTree = \"<group>\"; };\n- D9CD9EAAF4714ACB80E4F3D3 /* AntDesign.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = AntDesign.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf\"; sourceTree = \"<group>\"; };\n- DD6B240725FF4143ADAC018E /* FontAwesome5_Solid.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Solid.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf\"; sourceTree = \"<group>\"; };\n- E663A985A31348DA8FCBF390 /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = SimpleLineIcons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf\"; sourceTree = \"<group>\"; };\n- E749C3DC401E41539EA025E7 /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf\"; sourceTree = \"<group>\"; };\n- FCCE5C8B3DFB401DBAA9DFD3 /* MaterialIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialIcons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf\"; sourceTree = \"<group>\"; };\n+ 9DC351F0B1FD4C86AD8F2043 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialCommunityIcons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf\"; sourceTree = \"<group>\"; };\n+ AD6C26A857AD4C9498785843 /* Zocial.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Zocial.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf\"; sourceTree = \"<group>\"; };\n+ B2EEE87D5ACA431D88615C31 /* Feather.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Feather.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Feather.ttf\"; sourceTree = \"<group>\"; };\n+ B7FE121AC9084F9DBA08CE72 /* Fontisto.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Fontisto.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf\"; sourceTree = \"<group>\"; };\n+ BDF8B32925164FC9ADBF26E9 /* FontAwesome5_Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Regular.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf\"; sourceTree = \"<group>\"; };\n+ D8C02AD6D7BF4C9888DE3206 /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf\"; sourceTree = \"<group>\"; };\n+ D9CD9EAAF4714ACB80E4F3D3 /* AntDesign.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = AntDesign.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf\"; sourceTree = \"<group>\"; };\n+ DD6B240725FF4143ADAC018E /* FontAwesome5_Solid.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Solid.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf\"; sourceTree = \"<group>\"; };\n+ E663A985A31348DA8FCBF390 /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = SimpleLineIcons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf\"; sourceTree = \"<group>\"; };\n+ E749C3DC401E41539EA025E7 /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf\"; sourceTree = \"<group>\"; };\n+ F03667D146661AF6D8C91AB9 /* libPods-SquadCal.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = \"libPods-SquadCal.a\"; sourceTree = BUILT_PRODUCTS_DIR; };\n+ FCCE5C8B3DFB401DBAA9DFD3 /* MaterialIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialIcons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf\"; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n/* Begin PBXFrameworksBuildPhase section */\nbuildActionMask = 2147483647;\nfiles = (\n7F761E602201141E001B6FB7 /* JavaScriptCore.framework in Frameworks */,\n- 7A268A2AFE9567F31748FBD5 /* Pods_SquadCal.framework in Frameworks */,\n+ 79E6AA073D734E63267D7356 /* libPods-SquadCal.a in Frameworks */,\n);\nrunOnlyForDeploymentPostprocessing = 0;\n};\n13B07FB61A68108700A75B9A /* Info.release.plist */,\n13B07FB11A68108700A75B9A /* LaunchScreen.xib */,\n13B07FB71A68108700A75B9A /* main.m */,\n+ 7F8FB0932333063D007EF826 /* File.swift */,\n+ 7F8FB0922333063C007EF826 /* SquadCal-Bridging-Header.h */,\n);\nname = SquadCal;\nsourceTree = \"<group>\";\nisa = PBXGroup;\nchildren = (\n7F761E292201141E001B6FB7 /* JavaScriptCore.framework */,\n- BFE2CAB0C43D1B945AC4FFBB /* Pods_SquadCal.framework */,\n+ F03667D146661AF6D8C91AB9 /* libPods-SquadCal.a */,\n);\nname = Frameworks;\nsourceTree = \"<group>\";\n13B07F8C1A680F5B00A75B9A /* Frameworks */,\n13B07F8E1A680F5B00A75B9A /* Resources */,\n00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,\n- 2BEBFBA8B4C6FDD37DC0D9DC /* [CP] Embed Pods Frameworks */,\n+ 2D0D91B65B8CBEADFD2210D0 /* [CP] Copy Pods Resources */,\n);\nbuildRules = (\n);\nTargetAttributes = {\n13B07F861A680F5B00A75B9A = {\nDevelopmentTeam = 6BF4H9TU5U;\n+ LastSwiftMigration = 1030;\nProvisioningStyle = Automatic;\nSystemCapabilities = {\ncom.apple.BackgroundModes = {\nshellPath = /bin/sh;\nshellScript = \"export NODE_BINARY=node\\n../node_modules/react-native/scripts/react-native-xcode.sh\\n\";\n};\n- 2BEBFBA8B4C6FDD37DC0D9DC /* [CP] Embed Pods Frameworks */ = {\n+ 2D0D91B65B8CBEADFD2210D0 /* [CP] Copy Pods Resources */ = {\nisa = PBXShellScriptBuildPhase;\nbuildActionMask = 2147483647;\nfiles = (\n);\ninputPaths = (\n- \"${PODS_ROOT}/Target Support Files/Pods-SquadCal/Pods-SquadCal-frameworks.sh\",\n- \"${BUILT_PRODUCTS_DIR}/1PasswordExtension/OnePasswordExtension.framework\",\n- \"${BUILT_PRODUCTS_DIR}/DoubleConversion/DoubleConversion.framework\",\n- \"${BUILT_PRODUCTS_DIR}/Folly/folly.framework\",\n- \"${BUILT_PRODUCTS_DIR}/RNCAsyncStorage/RNCAsyncStorage.framework\",\n- \"${BUILT_PRODUCTS_DIR}/RNExitApp/RNExitApp.framework\",\n- \"${BUILT_PRODUCTS_DIR}/RNFS/RNFS.framework\",\n- \"${BUILT_PRODUCTS_DIR}/RNFastImage/RNFastImage.framework\",\n- \"${BUILT_PRODUCTS_DIR}/RNGestureHandler/RNGestureHandler.framework\",\n- \"${BUILT_PRODUCTS_DIR}/RNKeychain/RNKeychain.framework\",\n- \"${BUILT_PRODUCTS_DIR}/RNReanimated/RNReanimated.framework\",\n- \"${BUILT_PRODUCTS_DIR}/RNScreens/RNScreens.framework\",\n- \"${BUILT_PRODUCTS_DIR}/RNVectorIcons/RNVectorIcons.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-ART/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-Core/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-DevSupport/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-RCTActionSheet/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-RCTAnimation/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-RCTBlob/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-RCTImage/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-RCTLinking/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-RCTNetwork/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-RCTSettings/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-RCTText/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-RCTVibration/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-RCTWebSocket/React.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-cxxreact/cxxreact.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-jsi/jsi.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-jsiexecutor/jsireact.framework\",\n- \"${BUILT_PRODUCTS_DIR}/React-jsinspector/jsinspector.framework\",\n- \"${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework\",\n- \"${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework\",\n- \"${BUILT_PRODUCTS_DIR}/glog/glog.framework\",\n- \"${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework\",\n- \"${BUILT_PRODUCTS_DIR}/lottie-ios/Lottie.framework\",\n- \"${BUILT_PRODUCTS_DIR}/lottie-react-native/lottie_react_native.framework\",\n- \"${BUILT_PRODUCTS_DIR}/react-native-cameraroll/react_native_cameraroll.framework\",\n- \"${BUILT_PRODUCTS_DIR}/react-native-image-resizer/react_native_image_resizer.framework\",\n- \"${BUILT_PRODUCTS_DIR}/react-native-keyboard-input/react_native_keyboard_input.framework\",\n- \"${BUILT_PRODUCTS_DIR}/react-native-keyboard-tracking-view/react_native_keyboard_tracking_view.framework\",\n- \"${BUILT_PRODUCTS_DIR}/react-native-netinfo/react_native_netinfo.framework\",\n- \"${BUILT_PRODUCTS_DIR}/react-native-notifications/react_native_notifications.framework\",\n- \"${BUILT_PRODUCTS_DIR}/react-native-onepassword/react_native_onepassword.framework\",\n- \"${BUILT_PRODUCTS_DIR}/react-native-orientation-locker/react_native_orientation_locker.framework\",\n- \"${BUILT_PRODUCTS_DIR}/react-native-splash-screen/react_native_splash_screen.framework\",\n- \"${BUILT_PRODUCTS_DIR}/yoga/yoga.framework\",\n- );\n- name = \"[CP] Embed Pods Frameworks\";\n+ \"${PODS_ROOT}/Target Support Files/Pods-SquadCal/Pods-SquadCal-resources.sh\",\n+ \"${PODS_CONFIGURATION_BUILD_DIR}/1PasswordExtension/OnePasswordExtensionResources.bundle\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Feather.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf\",\n+ \"${PODS_ROOT}/../../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf\",\n+ );\n+ name = \"[CP] Copy Pods Resources\";\noutputPaths = (\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OnePasswordExtension.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DoubleConversion.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/folly.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNCAsyncStorage.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNExitApp.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNFS.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNFastImage.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNGestureHandler.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNKeychain.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNReanimated.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNScreens.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RNVectorIcons.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cxxreact.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsi.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsireact.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsinspector.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageWebPCoder.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Lottie.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/lottie_react_native.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_cameraroll.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_image_resizer.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_keyboard_input.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_keyboard_tracking_view.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_netinfo.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_notifications.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_onepassword.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_orientation_locker.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/react_native_splash_screen.framework\",\n- \"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.framework\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/OnePasswordExtensionResources.bundle\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf\",\n+ \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf\",\n);\nrunOnlyForDeploymentPostprocessing = 0;\nshellPath = /bin/sh;\n- shellScript = \"\\\"${PODS_ROOT}/Target Support Files/Pods-SquadCal/Pods-SquadCal-frameworks.sh\\\"\\n\";\n+ shellScript = \"\\\"${PODS_ROOT}/Target Support Files/Pods-SquadCal/Pods-SquadCal-resources.sh\\\"\\n\";\nshowEnvVarsInLog = 0;\n};\n3FE01AD85986FDE151C2E50A /* [CP] Check Pods Manifest.lock */ = {\nbuildActionMask = 2147483647;\nfiles = (\n13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,\n+ 7F8FB0942333063D007EF826 /* File.swift in Sources */,\n13B07FC11A68108700A75B9A /* main.m in Sources */,\n);\nrunOnlyForDeploymentPostprocessing = 0;\nbaseConfigurationReference = 8C0A50BD3E650F9A49DACD73 /* Pods-SquadCal.debug.xcconfig */;\nbuildSettings = {\nASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n+ CLANG_ENABLE_MODULES = YES;\nCODE_SIGN_ENTITLEMENTS = SquadCal/SquadCal.entitlements;\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCURRENT_PROJECT_VERSION = 1;\n);\nPRODUCT_BUNDLE_IDENTIFIER = org.squadcal.app;\nPRODUCT_NAME = SquadCal;\n+ SWIFT_OBJC_BRIDGING_HEADER = \"SquadCal-Bridging-Header.h\";\n+ SWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n+ SWIFT_VERSION = 5.0;\nTARGETED_DEVICE_FAMILY = 1;\nVERSIONING_SYSTEM = \"apple-generic\";\n};\nbaseConfigurationReference = 7EE5A7681B39319D3AF09109 /* Pods-SquadCal.release.xcconfig */;\nbuildSettings = {\nASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n+ CLANG_ENABLE_MODULES = YES;\nCODE_SIGN_ENTITLEMENTS = SquadCal/SquadCal.entitlements;\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCURRENT_PROJECT_VERSION = 1;\n);\nPRODUCT_BUNDLE_IDENTIFIER = org.squadcal.app;\nPRODUCT_NAME = SquadCal;\n+ SWIFT_OBJC_BRIDGING_HEADER = \"SquadCal-Bridging-Header.h\";\n+ SWIFT_VERSION = 5.0;\nTARGETED_DEVICE_FAMILY = 1;\nVERSIONING_SYSTEM = \"apple-generic\";\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] RN 0.60 upgrade: hack around react-native#25349 This hack involves creating a Swift file to make Lottie build. This can be removed after I upgrade to 0.61
129,187
18.09.2019 21:28:22
14,400
bdbdc4e3503e5967e2c810b5d61443aaaa2e4941
[native] Replace now-missing thread create icon IonIcons removed `ios-create-outline` for some reason
[ { "change_type": "MODIFY", "old_path": "native/chat/compose-thread-button.react.js", "new_path": "native/chat/compose-thread-button.react.js", "diff": "@@ -4,7 +4,7 @@ import type { Navigate } from '../navigation/route-names';\nimport * as React from 'react';\nimport { StyleSheet } from 'react-native';\n-import Icon from 'react-native-vector-icons/Ionicons';\n+import Icon from 'react-native-vector-icons/MaterialCommunityIcons';\nimport PropTypes from 'prop-types';\nimport { ComposeThreadRouteName } from '../navigation/route-names';\n@@ -23,10 +23,10 @@ class ComposeThreadButton extends React.PureComponent<Props> {\nreturn (\n<Button onPress={this.onPress} androidBorderlessRipple={true}>\n<Icon\n- name=\"ios-create-outline\"\n- size={30}\n+ name=\"pencil-plus-outline\"\n+ size={26}\nstyle={styles.composeButton}\n- color=\"#036AFF\"\n+ color=\"#036ABB\"\n/>\n</Button>\n);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Replace now-missing thread create icon https://github.com/oblador/react-native-vector-icons/issues/823 IonIcons removed `ios-create-outline` for some reason
129,187
18.09.2019 21:52:06
14,400
9088e596110e66400abba17438e22b981ae99ee9
[native] Hack around dropped final frame in Lottie check animation
[ { "change_type": "MODIFY", "old_path": "native/media/image-gallery-image.react.js", "new_path": "native/media/image-gallery-image.react.js", "diff": "@@ -170,9 +170,13 @@ class ImageGalleryImage extends React.PureComponent<Props> {\n}\nif (this.props.isQueued && !prevProps.isQueued) {\n+ // When I updated to React Native 0.60, I also updated Lottie. At that\n+ // time, on iOS the last frame of the animation drops the circle outlining\n+ // the checkmark. This is a hack to get around that\n+ const maxValue = Platform.OS === \"ios\" ? 0.99 : 1;\nAnimated.timing(\nthis.checkProgress,\n- { ...animatedSpec, toValue: 1 },\n+ { ...animatedSpec, toValue: 0.99 },\n).start();\n} else if (!this.props.isQueued && prevProps.isQueued) {\nAnimated.timing(\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Hack around dropped final frame in Lottie check animation
129,187
19.09.2019 12:13:05
14,400
dd2343f681574ced3a3f11c0f881013699cb5e0f
[native] Fix up types on react-native-keychain usage
[ { "change_type": "MODIFY", "old_path": "native/account/native-credentials.js", "new_path": "native/account/native-credentials.js", "diff": "@@ -7,16 +7,13 @@ import {\nsetInternetCredentials,\nsetSharedWebCredentials,\nresetInternetCredentials,\n+ type UserCredentials,\n} from 'react-native-keychain';\nimport URL from 'url-parse';\n-type Credentials = {|\n- username: string,\n- password: string,\n-|};\ntype StoredCredentials = {|\nstate: \"undetermined\" | \"determined\" | \"unsupported\",\n- credentials: ?Credentials,\n+ credentials: ?UserCredentials,\n|};\nlet storedNativeKeychainCredentials = {\nstate: \"undetermined\",\n@@ -27,7 +24,7 @@ let storedSharedWebCredentials = {\ncredentials: null,\n};\n-async function fetchNativeKeychainCredentials(): Promise<?Credentials> {\n+async function fetchNativeKeychainCredentials(): Promise<?UserCredentials> {\nif (storedNativeKeychainCredentials.state === \"determined\") {\nreturn storedNativeKeychainCredentials.credentials;\n}\n@@ -43,7 +40,7 @@ async function fetchNativeKeychainCredentials(): Promise<?Credentials> {\n}\n}\n-function getNativeSharedWebCredentials(): ?Credentials {\n+function getNativeSharedWebCredentials(): ?UserCredentials {\nif (Platform.OS !== \"ios\") {\nreturn null;\n}\n@@ -53,7 +50,7 @@ function getNativeSharedWebCredentials(): ?Credentials {\nreturn storedSharedWebCredentials.credentials;\n}\n-async function fetchNativeSharedWebCredentials(): Promise<?Credentials> {\n+async function fetchNativeSharedWebCredentials(): Promise<?UserCredentials> {\nif (Platform.OS !== \"ios\") {\nreturn null;\n}\n@@ -61,8 +58,10 @@ async function fetchNativeSharedWebCredentials(): Promise<?Credentials> {\nreturn storedSharedWebCredentials.credentials;\n}\ntry {\n- let credentials = await requestSharedWebCredentials(\"squadcal.org\");\n- credentials = credentials ? credentials : undefined;\n+ const result = await requestSharedWebCredentials();\n+ const credentials = result\n+ ? { username: result.username, password: result.password }\n+ : undefined;\nstoredSharedWebCredentials = { state: \"determined\", credentials };\nreturn credentials;\n} catch (e) {\n@@ -72,7 +71,7 @@ async function fetchNativeSharedWebCredentials(): Promise<?Credentials> {\n}\n}\n-async function fetchNativeCredentials(): Promise<?Credentials> {\n+async function fetchNativeCredentials(): Promise<?UserCredentials> {\nconst keychainCredentials = await fetchNativeKeychainCredentials();\nif (keychainCredentials) {\nreturn keychainCredentials;\n@@ -80,7 +79,7 @@ async function fetchNativeCredentials(): Promise<?Credentials> {\nreturn await fetchNativeSharedWebCredentials();\n}\n-async function setNativeKeychainCredentials(credentials: Credentials) {\n+async function setNativeKeychainCredentials(credentials: UserCredentials) {\nconst current = await fetchNativeKeychainCredentials();\nif (\ncurrent &&\n@@ -104,7 +103,7 @@ async function setNativeKeychainCredentials(credentials: Credentials) {\n}\n}\n-async function setNativeSharedWebCredentials(credentials: Credentials) {\n+async function setNativeSharedWebCredentials(credentials: UserCredentials) {\nif (Platform.OS !== \"ios\") {\nreturn;\n}\n@@ -147,7 +146,7 @@ async function setNativeSharedWebCredentials(credentials: Credentials) {\n}\n}\n-async function setNativeCredentials(credentials: $Shape<Credentials>) {\n+async function setNativeCredentials(credentials: $Shape<UserCredentials>) {\nif (!credentials.username || !credentials.password) {\nconst currentCredentials = await fetchNativeCredentials();\nif (currentCredentials) {\n" }, { "change_type": "ADD", "old_path": null, "new_path": "patches/react-native-keychain+4.0.0.patch", "diff": "+diff --git a/node_modules/react-native-keychain/index.js b/node_modules/react-native-keychain/index.js\n+index 43894c1..af6c61e 100644\n+--- a/node_modules/react-native-keychain/index.js\n++++ b/node_modules/react-native-keychain/index.js\n+@@ -140,7 +140,7 @@ export type UserCredentials = {|\n+ export function getInternetCredentials(\n+ server: string,\n+ options?: Options\n+-): Promise<UserCredentials> {\n++): Promise<false | UserCredentials> {\n+ return RNKeychainManager.getInternetCredentialsForServer(server, options);\n+ }\n+\n+@@ -235,7 +235,7 @@ export function resetGenericPassword(\n+ * @return {Promise} Resolves to `{ server, username, password }` if approved and\n+ * `false` if denied and throws an error if not supported on platform or there's no shared credentials\n+ */\n+-export function requestSharedWebCredentials(): Promise<SharedWebCredentials> {\n++export function requestSharedWebCredentials(): Promise<false | SharedWebCredentials> {\n+ if (Platform.OS !== 'ios') {\n+ return Promise.reject(\n+ new Error(\n+@@ -256,7 +256,7 @@ export function requestSharedWebCredentials(): Promise<SharedWebCredentials> {\n+ export function setSharedWebCredentials(\n+ server: string,\n+ username: string,\n+- password: string\n++ password: ?string\n+ ): Promise<void> {\n+ if (Platform.OS !== 'ios') {\n+ return Promise.reject(\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Fix up types on react-native-keychain usage
129,187
19.09.2019 12:15:55
14,400
c87f7e06e442a20b7d654d11bfd75dd9f264b08f
[native] Fix up types on react-native-vector-icons usage
[ { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings-list-action.react.js", "new_path": "native/chat/settings/thread-settings-list-action.react.js", "diff": "// @flow\nimport type { ViewStyle, TextStyle } from '../../types/styles';\n+import type { IoniconsGlyphs } from 'react-native-vector-icons/Ionicons';\nimport React from 'react';\nimport { View, Text, StyleSheet, Platform } from 'react-native';\n@@ -11,7 +12,7 @@ import Button from '../../components/button.react';\ntype ListActionProps = {|\nonPress: () => void,\ntext: string,\n- iconName: string,\n+ iconName: IoniconsGlyphs,\niconColor: string,\niconSize: number,\niconStyle?: TextStyle,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Fix up types on react-native-vector-icons usage
129,187
19.09.2019 11:42:56
14,400
8ae840ef62ce333a19bd98d49d514a9b7354ecce
[native] react-navigation@4
[ { "change_type": "MODIFY", "old_path": "native/chat/chat-navigator.react.js", "new_path": "native/chat/chat-navigator.react.js", "diff": "@@ -7,7 +7,7 @@ import type {\nimport * as React from 'react';\nimport { Platform } from 'react-native';\n-import { createStackNavigator } from 'react-navigation';\n+import { createStackNavigator } from 'react-navigation-stack';\nimport ChatThreadList from './chat-thread-list.react';\nimport MessageListContainer from './message-list-container.react';\n" }, { "change_type": "MODIFY", "old_path": "native/chat/message-list-header-title.react.js", "new_path": "native/chat/message-list-header-title.react.js", "diff": "@@ -8,7 +8,7 @@ import * as React from 'react';\nimport { View, Text, StyleSheet, Platform } from 'react-native';\nimport PropTypes from 'prop-types';\nimport Icon from 'react-native-vector-icons/Ionicons';\n-import { HeaderTitle } from 'react-navigation';\n+import { HeaderTitle } from 'react-navigation-stack';\nimport Button from '../components/button.react';\nimport { ThreadSettingsRouteName } from '../navigation/route-names';\n" }, { "change_type": "MODIFY", "old_path": "native/more/more.react.js", "new_path": "native/more/more.react.js", "diff": "import React from 'react';\nimport { StyleSheet } from 'react-native';\nimport Icon from 'react-native-vector-icons/FontAwesome';\n-import { createStackNavigator } from 'react-navigation';\n+import { createStackNavigator } from 'react-navigation-stack';\nimport MoreScreen from './more-screen.react';\nimport EditEmail from './edit-email.react';\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/lightbox-navigator.react.js", "new_path": "native/navigation/lightbox-navigator.react.js", "diff": "@@ -8,8 +8,6 @@ import type {\nNavigationRouteConfigMap,\nNavigationTransitionProps,\nNavigationScene,\n-} from '@react-navigation/core';\n-import type {\nStackNavigatorConfig,\n} from 'react-navigation';\n@@ -20,11 +18,7 @@ import {\nAnimated as BaseAnimated,\nEasing as BaseEasing,\n} from 'react-native';\n-import {\n- StackRouter,\n- createNavigator,\n- StackActions,\n-} from '@react-navigation/core';\n+import { StackRouter, createNavigator, StackActions } from 'react-navigation';\nimport { Transitioner } from 'react-navigation-stack';\nimport Animated, { Easing } from 'react-native-reanimated';\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/navigation-setup.js", "new_path": "native/navigation/navigation-setup.js", "diff": "@@ -21,12 +21,12 @@ import type { NotificationPressPayload } from 'lib/shared/notif-utils';\nimport type { AndroidNotificationActions } from '../push/reducer';\nimport type { UserInfo } from 'lib/types/user-types';\n+import { NavigationActions } from 'react-navigation';\nimport {\ncreateBottomTabNavigator,\ncreateMaterialTopTabNavigator,\n- createStackNavigator,\n- NavigationActions,\n-} from 'react-navigation';\n+} from 'react-navigation-tabs';\n+import { createStackNavigator } from 'react-navigation-stack';\nimport invariant from 'invariant';\nimport _findIndex from 'lodash/fp/findIndex';\nimport { Alert, BackHandler, Platform, Keyboard } from 'react-native';\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"@react-native-community/async-storage\": \"^1.6.1\",\n\"@react-native-community/cameraroll\": \"^1.2.1\",\n\"@react-native-community/netinfo\": \"^4.2.1\",\n- \"@react-navigation/core\": \"~3.4.1\",\n\"base-64\": \"^0.1.0\",\n\"color\": \"^2.0.0\",\n\"find-root\": \"^1.1.0\",\n\"react-native-segmented-control-tab\": \"^3.2.1\",\n\"react-native-splash-screen\": \"^3.2.0\",\n\"react-native-vector-icons\": \"^6.6.0\",\n- \"react-navigation\": \"^3.11.1\",\n+ \"react-navigation\": \"^4.0.6\",\n\"react-navigation-redux-helpers\": \"^3.0.2\",\n- \"react-navigation-stack\": \"~1.4.0\",\n+ \"react-navigation-stack\": \"^1.7.3\",\n+ \"react-navigation-tabs\": \"^1.2.0\",\n\"react-redux\": \"^5.0.6\",\n\"reactotron-react-native\": \"4.0.0-beta.1\",\n\"reactotron-redux\": \"^3.1.1\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "resolved \"https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-4.2.1.tgz#b6309f078da500807ef8afa4d659e56ccd14dee4\"\nintegrity sha512-kAnmYp8vXpZToPw8rgE7uO+MqmqHSR9VEDPkuZT0DnFMBJmIXCSD2NLAD28HGKVY/kujVWCknC/FuVWr5/A3uA==\n-\"@react-navigation/core@~3.4.1\":\n- version \"3.4.2\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/core/-/core-3.4.2.tgz#bec563e94fde40fbab3730cdc97f22afbb2a1498\"\n- integrity sha512-7G+iDzLSTeOUU4vVZeRZKJ+Bd7ds7ZxYNqZcB8i0KlBeQEQfR74Ounfu/p0KIEq2RiNnaE3QT7WVP3C87sebzw==\n+\"@react-navigation/core@^3.5.1\":\n+ version \"3.5.1\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/core/-/core-3.5.1.tgz#7a2339fca3496979305fb3a8ab88c2ca8d8c214d\"\n+ integrity sha512-q7NyhWVYOhVIWqL2GZKa6G78YarXaVTTtOlSDkvy4ZIggo40wZzamlnrJRvsaQX46gsgw45FAWb5SriHh8o7eA==\ndependencies:\nhoist-non-react-statics \"^3.3.0\"\npath-to-regexp \"^1.7.0\"\nquery-string \"^6.4.2\"\nreact-is \"^16.8.6\"\n-\"@react-navigation/native@~3.5.0\":\n- version \"3.5.0\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/native/-/native-3.5.0.tgz#f5d16e0845ac26d1147d1caa481f18a00740e7ae\"\n- integrity sha512-TmGOis++ejEXG3sqNJhCSKqB0/qLu3FQgDtO959qpqif36R/diR8SQwJqeSdofoEiK3CepdhFlTCeHdS1/+MsQ==\n+\"@react-navigation/native@^3.6.2\":\n+ version \"3.6.2\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/native/-/native-3.6.2.tgz#3634697b6350cc5189657ae4551f2d52b57fbbf0\"\n+ integrity sha512-Cybeou6N82ZeRmgnGlu+wzlV3z5BZQR2dmYaNFV1TNLUGHqtvv8E7oNw9uYcz9Ox5LFbiX+FdNTn2d6ZPlK0kg==\ndependencies:\nhoist-non-react-statics \"^3.0.1\"\nreact-native-safe-area-view \"^0.14.1\"\n@@ -10930,13 +10930,6 @@ react-native-swipe-gestures@^1.0.2:\nresolved \"https://registry.yarnpkg.com/react-native-swipe-gestures/-/react-native-swipe-gestures-1.0.2.tgz#914e1a72a94bc55b322b4622a01103ab879296dd\"\nintegrity sha1-kU4acqlLxVsyK0YioBEDq4eSlt0=\n-react-native-tab-view@^1.2.0:\n- version \"1.2.0\"\n- resolved \"https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.2.0.tgz#0cc26a1c8e49b6c0d58a30363dbbe43954907c31\"\n- integrity sha512-lpiWi3dog86Fu/W60DU12RKrFv3XuTv0lHMC56t2jlDqxLfVzG9ufV7li6Afl2S2ZicNU1Bob8WPgxVZc8egAA==\n- dependencies:\n- prop-types \"^15.6.1\"\n-\nreact-native-tab-view@^1.4.1:\nversion \"1.4.1\"\nresolved \"https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.4.1.tgz#f113cd87485808f0c991abec937f70fa380478b9\"\n@@ -10987,13 +10980,6 @@ react-native@0.60.5:\nstacktrace-parser \"^0.1.3\"\nwhatwg-fetch \"^3.0.0\"\n-react-navigation-drawer@~1.2.1:\n- version \"1.2.1\"\n- resolved \"https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-1.2.1.tgz#7bd5efeee7d2f611d3ebb0933e0c8e8eb7cafe52\"\n- integrity sha512-T2kaBjY2c4/3I6noWFnaf/c18ntNH5DsST38i+pdc2NPxn5Yi5lkK+ZZTeKuHSFD4a7G0jWY9OGf1iRkHWLMAQ==\n- dependencies:\n- react-native-tab-view \"^1.2.0\"\n-\nreact-navigation-redux-helpers@^3.0.2:\nversion \"3.0.2\"\nresolved \"https://registry.yarnpkg.com/react-navigation-redux-helpers/-/react-navigation-redux-helpers-3.0.2.tgz#612e1d5b1378ba0c17b6a2d8ec9a01cc698a3a16\"\n@@ -11001,31 +10987,29 @@ react-navigation-redux-helpers@^3.0.2:\ndependencies:\ninvariant \"^2.2.2\"\n-react-navigation-stack@~1.4.0:\n- version \"1.4.0\"\n- resolved \"https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-1.4.0.tgz#69cdb029ea4ee5877d7e933b3117dc90bc841eb2\"\n- integrity sha512-zEe9wCA0Ot8agarYb//0nSWYW1GM+1R0tY/nydUV0EizeJ27At0EklYVWvYEuYU6C48va6cu8OPL7QD/CcJACw==\n+react-navigation-stack@^1.7.3:\n+ version \"1.8.0\"\n+ resolved \"https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-1.8.0.tgz#52cb159371b64d20780a72ce43e9620adec2f2a0\"\n+ integrity sha512-J8ezJlZRxoXuxVH7Y9EOBBluoOpjgrFN0HBKMJyi8ctFEVDsEjjbsffhk6ihOeZ2um7dPYErzeD7sLjx8YQDzw==\n+ dependencies:\n+ prop-types \"^15.7.2\"\n-react-navigation-tabs@~1.1.4:\n- version \"1.1.4\"\n- resolved \"https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-1.1.4.tgz#00a312250df3c519c60b7815a523ace5ee11163a\"\n- integrity sha512-py2hLCRxPwXOzmY1W9XcY1rWXxdK6RGW/aXh56G9gIf8cpHNDhy/bJV4e46/JrVcse3ybFaN0liT09/DM/NdwQ==\n+react-navigation-tabs@^1.2.0:\n+ version \"1.2.0\"\n+ resolved \"https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-1.2.0.tgz#602c147029bb4f1c569b26479ddba534fe3ebb19\"\n+ integrity sha512-I6vq3XX4ub9KhWQzcrggznls+2Z2C6w2ro46vokDGGvJ02CBpQRar7J0ETV29Ot5AJY67HucNUmZdH3yDFckmQ==\ndependencies:\nhoist-non-react-statics \"^2.5.0\"\nprop-types \"^15.6.1\"\n- react-lifecycles-compat \"^3.0.4\"\nreact-native-tab-view \"^1.4.1\"\n-react-navigation@^3.11.1:\n- version \"3.11.1\"\n- resolved \"https://registry.yarnpkg.com/react-navigation/-/react-navigation-3.11.1.tgz#ba696ad6b512088a97a20cc7e6a250c53dbddd26\"\n- integrity sha512-n64HxLG5s5ucVFo1Gs+D9ujChhHDd98lpQ1p27wL7gq8V1PaRJMvsBEIsguhtc2rTIL/TWDynOesXQDG+Eg6FQ==\n+react-navigation@^4.0.6:\n+ version \"4.0.6\"\n+ resolved \"https://registry.yarnpkg.com/react-navigation/-/react-navigation-4.0.6.tgz#6e0c4324c8eb314f31b510a43cbf7cea9410f246\"\n+ integrity sha512-DEhAcuiPI+I8pEgKStVrhDjZA5bc/1Nc+ByKWPn1pVWJCRHs+i+vJ6D2KWZCUtpzKCSm/yVPyUab4hOCg8L+Ww==\ndependencies:\n- \"@react-navigation/core\" \"~3.4.1\"\n- \"@react-navigation/native\" \"~3.5.0\"\n- react-navigation-drawer \"~1.2.1\"\n- react-navigation-stack \"~1.4.0\"\n- react-navigation-tabs \"~1.1.4\"\n+ \"@react-navigation/core\" \"^3.5.1\"\n+ \"@react-navigation/native\" \"^3.6.2\"\nreact-proxy@^1.1.7:\nversion \"1.1.8\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] react-navigation@4
129,187
25.09.2019 01:07:20
14,400
9faa5efbcb2eb43bb7a78e574bf2ca9805d8384f
[native] Remove duplicate font resources `react-native-vector-icons` Font resources on iOS are apparently now handled by CocoaPods
[ { "change_type": "MODIFY", "old_path": "native/ios/SquadCal.xcodeproj/project.pbxproj", "new_path": "native/ios/SquadCal.xcodeproj/project.pbxproj", "diff": "objects = {\n/* Begin PBXBuildFile section */\n- 066FEEE88E124341B9C17460 /* AntDesign.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D9CD9EAAF4714ACB80E4F3D3 /* AntDesign.ttf */; };\n13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };\n13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };\n13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };\n13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };\n- 5CDC85046A02413DB65C91A0 /* EvilIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D8C02AD6D7BF4C9888DE3206 /* EvilIcons.ttf */; };\n- 607744A506864BBFB613E564 /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = FCCE5C8B3DFB401DBAA9DFD3 /* MaterialIcons.ttf */; };\n- 6E48D65FC9124F33BAC971A5 /* Fontisto.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B7FE121AC9084F9DBA08CE72 /* Fontisto.ttf */; };\n- 737A143D6BAB4AA1B75F312F /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E663A985A31348DA8FCBF390 /* SimpleLineIcons.ttf */; };\n79E6AA073D734E63267D7356 /* libPods-SquadCal.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F03667D146661AF6D8C91AB9 /* libPods-SquadCal.a */; };\n7F761E602201141E001B6FB7 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F761E292201141E001B6FB7 /* JavaScriptCore.framework */; };\n7F8FB0942333063D007EF826 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8FB0932333063D007EF826 /* File.swift */; };\n7FB58ABE1E7F6BD500B4C1B1 /* Anaheim-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7FB58ABB1E7F6BC600B4C1B1 /* Anaheim-Regular.ttf */; };\n7FB58AC01E7F6BD800B4C1B1 /* OpenSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7FB58ABC1E7F6BC600B4C1B1 /* OpenSans-Regular.ttf */; };\n7FB58AC21E7F6BDB00B4C1B1 /* OpenSans-Semibold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7FB58ABD1E7F6BC600B4C1B1 /* OpenSans-Semibold.ttf */; };\n- 90D3AD3F2D6F43378B6E2DEB /* Feather.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B2EEE87D5ACA431D88615C31 /* Feather.ttf */; };\n- 9423F4EB503B4A27AD2115B5 /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6139C442103C42B7AEBE3BA1 /* Octicons.ttf */; };\n- A433653129984C13970CCA92 /* MaterialCommunityIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 9DC351F0B1FD4C86AD8F2043 /* MaterialCommunityIcons.ttf */; };\n- ADAB8FC2A0A9473A9C936138 /* FontAwesome5_Brands.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0917E036BA8C4493842D32EA /* FontAwesome5_Brands.ttf */; };\n- AFDDAF3786674EEABEEFB4A5 /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = AD6C26A857AD4C9498785843 /* Zocial.ttf */; };\n- BF5A9A95710B41E58C45E505 /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 07106322C50B43E2BA1EBD08 /* FontAwesome.ttf */; };\n- CEBCE8EB4C79474C9744CE18 /* FontAwesome5_Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BDF8B32925164FC9ADBF26E9 /* FontAwesome5_Regular.ttf */; };\n- DBBABD5B0D804ACC9ED9090C /* FontAwesome5_Solid.ttf in Resources */ = {isa = PBXBuildFile; fileRef = DD6B240725FF4143ADAC018E /* FontAwesome5_Solid.ttf */; };\n- DE15729E244C4186B9D3E6A4 /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 733977EFDC7A4BA4B6A45361 /* Ionicons.ttf */; };\n- E0957D3C613548E8916212C8 /* Entypo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4A28325061E84F39BBD766CD /* Entypo.ttf */; };\n- EA9B0AF766124ABEB49F9048 /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E749C3DC401E41539EA025E7 /* Foundation.ttf */; };\n/* End PBXBuildFile section */\n/* Begin PBXFileReference section */\n008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = \"<group>\"; };\n- 07106322C50B43E2BA1EBD08 /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf\"; sourceTree = \"<group>\"; };\n- 0917E036BA8C4493842D32EA /* FontAwesome5_Brands.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Brands.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf\"; sourceTree = \"<group>\"; };\n13B07F961A680F5B00A75B9A /* SquadCal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SquadCal.app; sourceTree = BUILT_PRODUCTS_DIR; };\n13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = SquadCal/AppDelegate.h; sourceTree = \"<group>\"; };\n13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = SquadCal/AppDelegate.m; sourceTree = \"<group>\"; };\n13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SquadCal/Images.xcassets; sourceTree = \"<group>\"; };\n13B07FB61A68108700A75B9A /* Info.release.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.release.plist; path = SquadCal/Info.release.plist; sourceTree = \"<group>\"; };\n13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = SquadCal/main.m; sourceTree = \"<group>\"; };\n- 4A28325061E84F39BBD766CD /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf\"; sourceTree = \"<group>\"; };\n- 6139C442103C42B7AEBE3BA1 /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf\"; sourceTree = \"<group>\"; };\n- 733977EFDC7A4BA4B6A45361 /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf\"; sourceTree = \"<group>\"; };\n7EE5A7681B39319D3AF09109 /* Pods-SquadCal.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-SquadCal.release.xcconfig\"; path = \"Target Support Files/Pods-SquadCal/Pods-SquadCal.release.xcconfig\"; sourceTree = \"<group>\"; };\n7F554F822332D58B007CB9F7 /* Info.debug.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.debug.plist; path = SquadCal/Info.debug.plist; sourceTree = \"<group>\"; };\n7F761E292201141E001B6FB7 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };\n7FB58ABD1E7F6BC600B4C1B1 /* OpenSans-Semibold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = \"OpenSans-Semibold.ttf\"; sourceTree = \"<group>\"; };\n7FCFD8BD1E81B8DF00629B0E /* SquadCal.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = SquadCal.entitlements; path = SquadCal/SquadCal.entitlements; sourceTree = \"<group>\"; };\n8C0A50BD3E650F9A49DACD73 /* Pods-SquadCal.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = \"Pods-SquadCal.debug.xcconfig\"; path = \"Target Support Files/Pods-SquadCal/Pods-SquadCal.debug.xcconfig\"; sourceTree = \"<group>\"; };\n- 9DC351F0B1FD4C86AD8F2043 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialCommunityIcons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf\"; sourceTree = \"<group>\"; };\n- AD6C26A857AD4C9498785843 /* Zocial.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Zocial.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf\"; sourceTree = \"<group>\"; };\n- B2EEE87D5ACA431D88615C31 /* Feather.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Feather.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Feather.ttf\"; sourceTree = \"<group>\"; };\n- B7FE121AC9084F9DBA08CE72 /* Fontisto.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Fontisto.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf\"; sourceTree = \"<group>\"; };\n- BDF8B32925164FC9ADBF26E9 /* FontAwesome5_Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Regular.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf\"; sourceTree = \"<group>\"; };\n- D8C02AD6D7BF4C9888DE3206 /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf\"; sourceTree = \"<group>\"; };\n- D9CD9EAAF4714ACB80E4F3D3 /* AntDesign.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = AntDesign.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf\"; sourceTree = \"<group>\"; };\n- DD6B240725FF4143ADAC018E /* FontAwesome5_Solid.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Solid.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf\"; sourceTree = \"<group>\"; };\n- E663A985A31348DA8FCBF390 /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = SimpleLineIcons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf\"; sourceTree = \"<group>\"; };\n- E749C3DC401E41539EA025E7 /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf\"; sourceTree = \"<group>\"; };\nF03667D146661AF6D8C91AB9 /* libPods-SquadCal.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = \"libPods-SquadCal.a\"; sourceTree = BUILT_PRODUCTS_DIR; };\n- FCCE5C8B3DFB401DBAA9DFD3 /* MaterialIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialIcons.ttf; path = \"../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf\"; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n/* Begin PBXFrameworksBuildPhase section */\n7FB58ABB1E7F6BC600B4C1B1 /* Anaheim-Regular.ttf */,\n7FB58ABC1E7F6BC600B4C1B1 /* OpenSans-Regular.ttf */,\n7FB58ABD1E7F6BC600B4C1B1 /* OpenSans-Semibold.ttf */,\n- D9CD9EAAF4714ACB80E4F3D3 /* AntDesign.ttf */,\n- 4A28325061E84F39BBD766CD /* Entypo.ttf */,\n- D8C02AD6D7BF4C9888DE3206 /* EvilIcons.ttf */,\n- B2EEE87D5ACA431D88615C31 /* Feather.ttf */,\n- 07106322C50B43E2BA1EBD08 /* FontAwesome.ttf */,\n- 0917E036BA8C4493842D32EA /* FontAwesome5_Brands.ttf */,\n- BDF8B32925164FC9ADBF26E9 /* FontAwesome5_Regular.ttf */,\n- DD6B240725FF4143ADAC018E /* FontAwesome5_Solid.ttf */,\n- B7FE121AC9084F9DBA08CE72 /* Fontisto.ttf */,\n- E749C3DC401E41539EA025E7 /* Foundation.ttf */,\n- 733977EFDC7A4BA4B6A45361 /* Ionicons.ttf */,\n- 9DC351F0B1FD4C86AD8F2043 /* MaterialCommunityIcons.ttf */,\n- FCCE5C8B3DFB401DBAA9DFD3 /* MaterialIcons.ttf */,\n- 6139C442103C42B7AEBE3BA1 /* Octicons.ttf */,\n- E663A985A31348DA8FCBF390 /* SimpleLineIcons.ttf */,\n- AD6C26A857AD4C9498785843 /* Zocial.ttf */,\n);\nname = Resources;\nsourceTree = \"<group>\";\n13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,\n7FB58AC21E7F6BDB00B4C1B1 /* OpenSans-Semibold.ttf in Resources */,\n7FB58AC01E7F6BD800B4C1B1 /* OpenSans-Regular.ttf in Resources */,\n- 066FEEE88E124341B9C17460 /* AntDesign.ttf in Resources */,\n- E0957D3C613548E8916212C8 /* Entypo.ttf in Resources */,\n- 5CDC85046A02413DB65C91A0 /* EvilIcons.ttf in Resources */,\n- 90D3AD3F2D6F43378B6E2DEB /* Feather.ttf in Resources */,\n- BF5A9A95710B41E58C45E505 /* FontAwesome.ttf in Resources */,\n- ADAB8FC2A0A9473A9C936138 /* FontAwesome5_Brands.ttf in Resources */,\n- CEBCE8EB4C79474C9744CE18 /* FontAwesome5_Regular.ttf in Resources */,\n- DBBABD5B0D804ACC9ED9090C /* FontAwesome5_Solid.ttf in Resources */,\n- 6E48D65FC9124F33BAC971A5 /* Fontisto.ttf in Resources */,\n- EA9B0AF766124ABEB49F9048 /* Foundation.ttf in Resources */,\n- DE15729E244C4186B9D3E6A4 /* Ionicons.ttf in Resources */,\n- A433653129984C13970CCA92 /* MaterialCommunityIcons.ttf in Resources */,\n- 607744A506864BBFB613E564 /* MaterialIcons.ttf in Resources */,\n- 9423F4EB503B4A27AD2115B5 /* Octicons.ttf in Resources */,\n- 737A143D6BAB4AA1B75F312F /* SimpleLineIcons.ttf in Resources */,\n- AFDDAF3786674EEABEEFB4A5 /* Zocial.ttf in Resources */,\n);\nrunOnlyForDeploymentPostprocessing = 0;\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Remove duplicate font resources `react-native-vector-icons` Font resources on iOS are apparently now handled by CocoaPods
129,187
25.09.2019 01:18:08
14,400
c656c355c36e8fdbcb0a089b0cae20590f0334d8
[native] Fix react-native-splash-screen configuration
[ { "change_type": "MODIFY", "old_path": "native/ios/SquadCal/AppDelegate.m", "new_path": "native/ios/SquadCal/AppDelegate.m", "diff": "rootViewController.view = rootView;\nself.window.rootViewController = rootViewController;\n[self.window makeKeyAndVisible];\n- [RNSplashScreen show];\n+ [RNSplashScreen showSplash:@\"LaunchScreen\" inRootView:rootView];\nreturn YES;\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Fix react-native-splash-screen configuration
129,187
25.09.2019 01:30:41
14,400
16db5ff623d292116e87b61ea77ffa6179b23950
[native] Use new NetInfo API
[ { "change_type": "MODIFY", "old_path": "native/redux/connectivity-updater.react.js", "new_path": "native/redux/connectivity-updater.react.js", "diff": "@@ -27,14 +27,15 @@ class ConnectivityUpdater extends React.PureComponent<Props> {\nconnectivity: connectivityInfoPropType.isRequired,\ndispatchActionPayload: PropTypes.func.isRequired,\n};\n+ netInfoUnsubscribe: ?(() => void);\ncomponentDidMount() {\n- NetInfo.addEventListener('connectionChange', this.onConnectionChange);\n- NetInfo.getConnectionInfo().then(this.onConnectionChange);\n+ this.netInfoUnsubscribe = NetInfo.addEventListener(this.onConnectionChange);\n+ NetInfo.fetch().then(this.onConnectionChange);\n}\ncomponentWillUnmount() {\n- NetInfo.removeEventListener('connectionChange', this.onConnectionChange);\n+ this.netInfoUnsubscribe && this.netInfoUnsubscribe();\n}\nonConnectionChange = ({ type }) => {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Use new NetInfo API
129,187
26.09.2019 12:18:17
14,400
f43524f62139fa80d884d8e2b845690b7e6b6193
[native] Cleanup and modernization of Calendar
[ { "change_type": "MODIFY", "old_path": "native/calendar/calendar.react.js", "new_path": "native/calendar/calendar.react.js", "diff": "@@ -119,9 +119,9 @@ type ExtraData = $ReadOnly<{|\n// than any other component in this project. This owes mostly to its complex\n// infinite-scrolling behavior.\n// But not this particular piece of sadness, actually. We have to cache the\n-// current InnerCalendar ref here so we can access it from the statically\n-// defined navigationOptions.tabBarOnPress below.\n-let currentCalendarRef: ?InnerCalendar = null;\n+// current Calendar ref here so we can access it from the statically defined\n+// navigationOptions.tabBarOnPress below.\n+let currentCalendarRef: ?Calendar = null;\nconst forceInset = { top: 'always', bottom: 'never' };\n@@ -153,7 +153,7 @@ type State = {|\nextraData: ExtraData,\ndisableInputBar: bool,\n|};\n-class InnerCalendar extends React.PureComponent<Props, State> {\n+class Calendar extends React.PureComponent<Props, State> {\nstatic propTypes = {\nnavigation: PropTypes.shape({\n@@ -223,9 +223,9 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n// When an entry becomes active, we make a note of its key so that once the\n// keyboard event happens, we know where to move the scrollPos to\nlastEntryKeyActive: ?string = null;\n- keyboardShowListener: ?Object;\n- keyboardDismissListener: ?Object;\n- keyboardDidDismissListener: ?Object;\n+ keyboardShowListener: ?{ +remove: () => void };\n+ keyboardDismissListener: ?{ +remove: () => void };\n+ keyboardDidDismissListener: ?{ +remove: () => void };\nkeyboardShownHeight: ?number = null;\nkeyboardPartiallyVisible = false;\n// If the query fails, we try it again\n@@ -240,7 +240,7 @@ class InnerCalendar extends React.PureComponent<Props, State> {\nconstructor(props: Props) {\nsuper(props);\nconst textToMeasure = props.listData\n- ? InnerCalendar.textToMeasureFromListData(props.listData)\n+ ? Calendar.textToMeasureFromListData(props.listData)\n: [];\nthis.latestExtraData = {\nactiveEntries: {},\n@@ -320,72 +320,32 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n}\n}\n- componentWillReceiveProps(newProps: Props) {\n- // When the listData changes we may need to recalculate some heights\n- if (newProps.listData === this.props.listData) {\n- return;\n+ componentDidUpdate(prevProps: Props, prevState: State) {\n+ if (this.props.listData !== prevProps.listData) {\n+ this.handleNewTextToMeasure();\n}\n- const newListData = newProps.listData;\n- if (!newListData) {\n- this.latestExtraData = {\n- activeEntries: {},\n- visibleEntries: {},\n- };\n- this.setState({\n- textToMeasure: [],\n- listDataWithHeights: null,\n- readyToShowList: false,\n- extraData: this.latestExtraData,\n- });\n- this.topLoaderWaitingToLeaveView = true;\n- this.bottomLoaderWaitingToLeaveView = true;\n- return;\n+ const { loadingStatus, connectionStatus } = this.props;\n+ const {\n+ loadingStatus: prevLoadingStatus,\n+ connectionStatus: prevConnectionStatus,\n+ } = prevProps;\n+ if (\n+ (loadingStatus === \"error\" && prevLoadingStatus === \"loading\") ||\n+ (connectionStatus === \"connected\" && prevConnectionStatus !== \"connected\")\n+ ) {\n+ this.loadMoreAbove();\n+ this.loadMoreBelow();\n}\n- const newTextToMeasure = InnerCalendar.textToMeasureFromListData(\n- newListData,\n- );\n- const newText =\n- _differenceWith(_isEqual)(newTextToMeasure)(this.state.textToMeasure);\n- if (newText.length !== 0) {\n- // We set textHeights to null here since if a future set of text\n- // came in before we completed text measurement that was a subset\n- // of the earlier text, we would end up merging directly there, but\n- // then when the measurement for the middle text came in it would\n- // override the newer text heights.\n- this.textHeights = null;\n- this.setState({ textToMeasure: newTextToMeasure });\n+ const lastLDWH = prevState.listDataWithHeights;\n+ const newLDWH = this.state.listDataWithHeights;\n+ if (!lastLDWH || !newLDWH) {\nreturn;\n}\n- let allTextAlreadyMeasured = false;\n- if (this.textHeights) {\n- allTextAlreadyMeasured = true;\n- for (let textToMeasure of newTextToMeasure) {\n- if (!this.textHeights.has(textToMeasure.id)) {\n- allTextAlreadyMeasured = false;\n- break;\n- }\n- }\n- }\n- if (allTextAlreadyMeasured) {\n- this.mergeHeightsIntoListData(newListData);\n- }\n-\n- // If we don't have everything in textHeights, but we do have everything in\n- // textToMeasure, we can conclude that we're just waiting for the\n- // measurement to complete and then we'll be good.\n- }\n-\n- componentWillUpdate(nextProps: Props, nextState: State) {\n- if (\n- nextProps.listData &&\n- this.props.listData &&\n- nextProps.listData.length < this.props.listData.length &&\n- this.flatList\n- ) {\n- if (!nextProps.calendarActive) {\n+ if (newLDWH.length < lastLDWH.length && this.flatList) {\n+ if (!this.props.calendarActive) {\n// If the currentCalendarQuery gets reset we scroll to the center\nthis.scrollToToday();\n} else if (Date.now() - this.lastForegrounded < 500) {\n@@ -400,19 +360,14 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n}\n}\n- const lastLDWH = this.state.listDataWithHeights;\n- const newLDWH = nextState.listDataWithHeights;\n- if (!lastLDWH || !newLDWH) {\n- return;\n- }\nconst { lastStartDate, newStartDate, lastEndDate, newEndDate }\n- = InnerCalendar.datesFromListData(lastLDWH, newLDWH);\n+ = Calendar.datesFromListData(lastLDWH, newLDWH);\nif (newStartDate > lastStartDate || newEndDate < lastEndDate) {\n// If there are fewer items in our new data, which happens when the\n// current calendar query gets reset due to inactivity, let's reset the\n// scroll position to the center (today)\n- if (!nextProps.calendarActive) {\n+ if (!this.props.calendarActive) {\nsetTimeout(() => this.scrollToToday(), 50);\n}\nthis.firstScrollUpOnAndroidComplete = false;\n@@ -423,36 +378,16 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n} else if (newLDWH.length > lastLDWH.length) {\nLayoutAnimation.easeInEaseOut();\n}\n- }\n- componentDidUpdate(prevProps: Props, prevState: State) {\n- const { loadingStatus, connectionStatus } = this.props;\n- const {\n- loadingStatus: prevLoadingStatus,\n- connectionStatus: prevConnectionStatus,\n- } = prevProps;\n- if (\n- (loadingStatus === \"error\" && prevLoadingStatus === \"loading\") ||\n- (connectionStatus === \"connected\" && prevConnectionStatus !== \"connected\")\n- ) {\n- this.loadMoreAbove();\n- this.loadMoreBelow();\n- }\n-\n- const lastLDWH = prevState.listDataWithHeights;\n- const newLDWH = this.state.listDataWithHeights;\n- if (!lastLDWH || !newLDWH) {\n- return;\n- }\n- const { lastStartDate, newStartDate, lastEndDate, newEndDate }\n- = InnerCalendar.datesFromListData(lastLDWH, newLDWH);\n- if (newStartDate < lastStartDate || newEndDate > lastEndDate) {\n+ if (newStartDate < lastStartDate) {\nthis.topLoadingFromScroll = null;\n+ }\n+ if (newEndDate > lastEndDate) {\nthis.bottomLoadingFromScroll = null;\n}\nconst { keyboardShownHeight, lastEntryKeyActive } = this;\n- if (newLDWH && keyboardShownHeight && lastEntryKeyActive) {\n+ if (keyboardShownHeight && lastEntryKeyActive) {\nthis.scrollToKey(lastEntryKeyActive, keyboardShownHeight);\nthis.lastEntryKeyActive = null;\n}\n@@ -473,6 +408,57 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n}\n}\n+ handleNewTextToMeasure() {\n+ const { listData } = this.props;\n+ if (!listData) {\n+ this.latestExtraData = {\n+ activeEntries: {},\n+ visibleEntries: {},\n+ };\n+ this.setState({\n+ textToMeasure: [],\n+ listDataWithHeights: null,\n+ readyToShowList: false,\n+ extraData: this.latestExtraData,\n+ });\n+ this.topLoaderWaitingToLeaveView = true;\n+ this.bottomLoaderWaitingToLeaveView = true;\n+ return;\n+ }\n+\n+ const newTextToMeasure = Calendar.textToMeasureFromListData(listData);\n+ const newText =\n+ _differenceWith(_isEqual)(newTextToMeasure)(this.state.textToMeasure);\n+ if (newText.length !== 0) {\n+ // We set textHeights to null here since if a future set of text\n+ // came in before we completed text measurement that was a subset\n+ // of the earlier text, we would end up merging directly there, but\n+ // then when the measurement for the middle text came in it would\n+ // override the newer text heights.\n+ this.textHeights = null;\n+ this.setState({ textToMeasure: newTextToMeasure });\n+ return;\n+ }\n+\n+ let allTextAlreadyMeasured = false;\n+ if (this.textHeights) {\n+ allTextAlreadyMeasured = true;\n+ for (let textToMeasure of newTextToMeasure) {\n+ if (!this.textHeights.has(textToMeasure.id)) {\n+ allTextAlreadyMeasured = false;\n+ break;\n+ }\n+ }\n+ }\n+ if (allTextAlreadyMeasured) {\n+ this.mergeHeightsIntoListData();\n+ }\n+\n+ // If we don't have everything in textHeights, but we do have everything in\n+ // textToMeasure, we can conclude that we're just waiting for the\n+ // measurement to complete and then we'll be good.\n+ }\n+\nstatic datesFromListData(\nlastLDWH: $ReadOnlyArray<CalendarItemWithHeight>,\nnewLDWH: $ReadOnlyArray<CalendarItemWithHeight>,\n@@ -512,12 +498,12 @@ class InnerCalendar extends React.PureComponent<Props, State> {\nlastLDWH: $ReadOnlyArray<CalendarItemWithHeight>,\nnewLDWH: $ReadOnlyArray<CalendarItemWithHeight>,\n) {\n- const existingKeys = new Set(_map(InnerCalendar.keyExtractor)(lastLDWH));\n+ const existingKeys = new Set(_map(Calendar.keyExtractor)(lastLDWH));\nconst newItems = _filter(\n(item: CalendarItemWithHeight) =>\n- !existingKeys.has(InnerCalendar.keyExtractor(item)),\n+ !existingKeys.has(Calendar.keyExtractor(item)),\n)(newLDWH);\n- const heightOfNewItems = InnerCalendar.heightOfItems(newItems);\n+ const heightOfNewItems = Calendar.heightOfItems(newItems);\nconst flatList = this.flatList;\ninvariant(flatList, \"flatList should be set\");\nconst scrollAction = () => {\n@@ -590,7 +576,12 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n}\n}\n- mergeHeightsIntoListData(listData: $ReadOnlyArray<CalendarItem>) {\n+ mergeHeightsIntoListData() {\n+ const { listData } = this.props;\n+ if (!listData) {\n+ return;\n+ }\n+\nconst textHeights = this.textHeights;\ninvariant(textHeights, \"textHeights should be set\");\nconst listDataWithHeights = _map((item: CalendarItem) => {\n@@ -605,7 +596,7 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n);\nreturn {\nitemType: \"entryInfo\",\n- entryInfo: InnerCalendar.entryInfoWithHeight(\n+ entryInfo: Calendar.entryInfoWithHeight(\nitem.entryInfo,\ntextHeight,\n),\n@@ -616,7 +607,7 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n// want the loaders to trigger when nothing is there\n!this.state.listDataWithHeights ||\n// We know that this is going to shrink our FlatList. When our FlatList\n- // shrinks, componentWillUpdate will trigger scrollToToday\n+ // shrinks, componentDidUpdate will trigger scrollToToday\nlistDataWithHeights.length < this.state.listDataWithHeights.length\n) {\nthis.topLoaderWaitingToLeaveView = true;\n@@ -630,9 +621,9 @@ class InnerCalendar extends React.PureComponent<Props, State> {\nanimated = this.props.calendarActive;\n}\nconst ldwh = this.state.listDataWithHeights;\n- invariant(ldwh, \"should be set\");\n+ invariant(ldwh, \"scrollToToday called, but listDataWithHeights isn't set\");\nconst todayIndex = _findIndex(['dateString', dateString(new Date())])(ldwh);\n- invariant(this.flatList, \"flatList should be set\");\n+ invariant(this.flatList, \"scrollToToday called, but flatList isn't set\");\nthis.flatList.scrollToIndex({\nindex: todayIndex,\nanimated,\n@@ -723,10 +714,9 @@ class InnerCalendar extends React.PureComponent<Props, State> {\nif (!data) {\nreturn { length: 0, offset: 0, index };\n}\n- const offset =\n- InnerCalendar.heightOfItems(data.filter((_, i) => i < index));\n+ const offset = Calendar.heightOfItems(data.filter((_, i) => i < index));\nconst item = data[index];\n- const length = item ? InnerCalendar.itemHeight(item) : 0;\n+ const length = item ? Calendar.itemHeight(item) : 0;\nreturn { length, offset, index };\n}\n@@ -745,7 +735,7 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n}\nstatic heightOfItems(data: $ReadOnlyArray<CalendarItemWithHeight>): number {\n- return _sum(data.map(InnerCalendar.itemHeight));\n+ return _sum(data.map(Calendar.itemHeight));\n}\nrender() {\n@@ -758,8 +748,8 @@ class InnerCalendar extends React.PureComponent<Props, State> {\n<FlatList\ndata={listDataWithHeights}\nrenderItem={this.renderItem}\n- keyExtractor={InnerCalendar.keyExtractor}\n- getItemLayout={InnerCalendar.getItemLayout}\n+ keyExtractor={Calendar.keyExtractor}\n+ getItemLayout={Calendar.getItemLayout}\nonViewableItemsChanged={this.onViewableItemsChanged}\nonScroll={this.onScroll}\ninitialScrollIndex={initialScrollIndex}\n@@ -816,12 +806,12 @@ class InnerCalendar extends React.PureComponent<Props, State> {\ninitialScrollIndex(data: $ReadOnlyArray<CalendarItemWithHeight>) {\nconst todayIndex = _findIndex(['dateString', dateString(new Date())])(data);\n- const heightOfTodayHeader = InnerCalendar.itemHeight(data[todayIndex]);\n+ const heightOfTodayHeader = Calendar.itemHeight(data[todayIndex]);\nlet returnIndex = todayIndex;\nlet heightLeft = (this.flatListHeight() - heightOfTodayHeader) / 2;\nwhile (heightLeft > 0) {\n- heightLeft -= InnerCalendar.itemHeight(data[--returnIndex]);\n+ heightLeft -= Calendar.itemHeight(data[--returnIndex]);\n}\nreturn returnIndex;\n}\n@@ -932,15 +922,15 @@ class InnerCalendar extends React.PureComponent<Props, State> {\ninvariant(data, \"should be set\");\nconst index = _findIndex(\n(item: CalendarItemWithHeight) =>\n- InnerCalendar.keyExtractor(item) === lastEntryKeyActive,\n+ Calendar.keyExtractor(item) === lastEntryKeyActive,\n)(data);\nif (index === null || index === undefined) {\nreturn;\n}\n- const itemStart = InnerCalendar.heightOfItems(\n+ const itemStart = Calendar.heightOfItems(\ndata.filter((_, i) => i < index),\n);\n- const itemHeight = InnerCalendar.itemHeight(data[index]);\n+ const itemHeight = Calendar.itemHeight(data[index]);\nconst entryAdditionalActiveHeight = Platform.OS === \"android\" ? 21 : 20;\nconst itemEnd = itemStart + itemHeight + entryAdditionalActiveHeight;\nlet visibleHeight = this.flatListHeight() - keyboardHeight;\n@@ -970,9 +960,7 @@ class InnerCalendar extends React.PureComponent<Props, State> {\nreturn;\n}\nthis.textHeights = newTextHeights;\n- if (this.props.listData) {\n- this.mergeHeightsIntoListData(this.props.listData);\n- }\n+ this.mergeHeightsIntoListData();\n}\nonViewableItemsChanged = (info: {\n@@ -1196,7 +1184,7 @@ const loadingStatusSelector = createLoadingStatusSelector(\nconst activeTabSelector = createActiveTabSelector(CalendarRouteName);\nconst activeThreadPickerSelector =\ncreateIsForegroundSelector(ThreadPickerModalRouteName);\n-const Calendar = connect(\n+export default connect(\n(state: AppState) => ({\nlistData: calendarListData(state),\ncalendarActive: activeTabSelector(state) || activeThreadPickerSelector(state),\n@@ -1211,6 +1199,4 @@ const Calendar = connect(\nconnectionStatus: state.connection.status,\n}),\n{ updateCalendarQuery },\n-)(InnerCalendar);\n-\n-export default Calendar;\n+)(Calendar);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Cleanup and modernization of Calendar
129,187
26.09.2019 18:04:59
14,400
85cda4a6a31f05c19f2255814aebed379a256f0a
[native] react-native-in-app-notification@3
[ { "change_type": "MODIFY", "old_path": "native/app.react.js", "new_path": "native/app.react.js", "diff": "@@ -45,7 +45,10 @@ import { createReduxContainer } from 'react-navigation-redux-helpers';\nimport invariant from 'invariant';\nimport PropTypes from 'prop-types';\nimport NotificationsIOS from 'react-native-notifications';\n-import InAppNotification from 'react-native-in-app-notification';\n+import {\n+ InAppNotificationProvider,\n+ withInAppNotification,\n+} from 'react-native-in-app-notification';\nimport SplashScreen from 'react-native-splash-screen';\nimport Orientation from 'react-native-orientation-locker';\n@@ -106,6 +109,8 @@ const ReduxifiedRootNavigator = createReduxContainer(RootNavigator);\ntype NativeDispatch = Dispatch & ((action: NavigationAction) => boolean);\ntype Props = {\n+ // withInAppNotification\n+ showNotification: (spec: {...}) => void,\n// Redux state\nrehydrateConcluded: bool,\nnavigationState: NavigationState,\n@@ -131,6 +136,7 @@ type Props = {\nclass AppWithNavigationState extends React.PureComponent<Props> {\nstatic propTypes = {\n+ showNotification: PropTypes.func.isRequired,\nrehydrateConcluded: PropTypes.bool.isRequired,\nnavigationState: PropTypes.object.isRequired,\nactiveThread: PropTypes.string,\n@@ -148,7 +154,6 @@ class AppWithNavigationState extends React.PureComponent<Props> {\nsetDeviceToken: PropTypes.func.isRequired,\n};\ncurrentState: ?string = NativeAppState.currentState;\n- inAppNotification: ?InAppNotification = null;\nandroidTokenListener: ?(() => void) = null;\nandroidMessageListener: ?(() => void) = null;\nandroidNotifOpenListener: ?(() => void) = null;\n@@ -566,8 +571,7 @@ class AppWithNavigationState extends React.PureComponent<Props> {\nif (threadID === this.props.activeThread) {\nreturn;\n}\n- invariant(this.inAppNotification, \"should be set\");\n- this.inAppNotification.show({\n+ this.props.showNotification({\nmessage,\ntitle,\nonPress: () => this.onPressNotificationForThread(threadID, false),\n@@ -607,6 +611,10 @@ class AppWithNavigationState extends React.PureComponent<Props> {\nrender() {\nconst inAppNotificationHeight = DeviceInfo.isIPhoneX_deprecated ? 104 : 80;\nreturn (\n+ <InAppNotificationProvider\n+ height={inAppNotificationHeight}\n+ notificationBodyComponent={NotificationBody}\n+ >\n<View style={styles.app}>\n<Socket\ndetectUnsupervisedBackgroundRef={this.detectUnsupervisedBackgroundRef}\n@@ -616,22 +624,14 @@ class AppWithNavigationState extends React.PureComponent<Props> {\ndispatch={this.props.dispatch}\n/>\n<ConnectedStatusBar />\n- <InAppNotification\n- height={inAppNotificationHeight}\n- notificationBodyComponent={NotificationBody}\n- ref={this.inAppNotificationRef}\n- />\n<DisconnectedBarVisibilityHandler />\n<DimensionsUpdater />\n<ConnectivityUpdater />\n</View>\n+ </InAppNotificationProvider>\n);\n}\n- inAppNotificationRef = (inAppNotification: InAppNotification) => {\n- this.inAppNotification = inAppNotification;\n- }\n-\ndetectUnsupervisedBackgroundRef = (\ndetectUnsupervisedBackground: ?((alreadyClosed: bool) => bool),\n) => {\n@@ -665,7 +665,7 @@ const ConnectedAppWithNavigationState = connect(\n};\n},\n{ setDeviceToken },\n-)(AppWithNavigationState);\n+)(withInAppNotification(AppWithNavigationState));\nconst App = (props: {}) =>\n<Provider store={store}>\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"react-native-gesture-handler\": \"^1.4.1\",\n\"react-native-hyperlink\": \"git+https://git@github.com/ashoat/react-native-hyperlink.git#both\",\n\"react-native-image-resizer\": \"^1.0.1\",\n- \"react-native-in-app-notification\": \"^2.1.0\",\n+ \"react-native-in-app-notification\": \"^3.0.0\",\n\"react-native-keyboard-input\": \"^5.3.1\",\n\"react-native-keychain\": \"^4.0.0\",\n\"react-native-notifications\": \"git+https://git@github.com/ashoat/react-native-notifications.git\",\n" }, { "change_type": "MODIFY", "old_path": "native/push/notification-body.react.js", "new_path": "native/push/notification-body.react.js", "diff": "@@ -5,7 +5,7 @@ import type { ImageSource } from 'react-native/Libraries/Image/ImageSource';\nimport * as React from 'react';\nimport { View, StyleSheet, DeviceInfo, Platform } from 'react-native';\nimport DefaultNotificationBody\n- from 'react-native-in-app-notification/DefaultNotificationBody';\n+ from 'react-native-in-app-notification/src/DefaultNotificationBody';\ntype Props = {\ntitle: string,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] react-native-in-app-notification@3
129,187
26.09.2019 18:05:50
14,400
bcbec20a13c5a4bfcabe5804d71d875b5d1eac17
[web] Remove deprecated React lifecycle methods And other improvements
[ { "change_type": "MODIFY", "old_path": "web/app.react.js", "new_path": "web/app.react.js", "diff": "@@ -151,71 +151,68 @@ class App extends React.PureComponent<Props, State> {\n}\ncomponentDidUpdate(prevProps: Props) {\n- const { navInfo, serverVerificationResult } = this.props;\n- if (\n- !serverVerificationResult ||\n- serverVerificationResult.field !== verifyField.RESET_PASSWORD\n- ) {\n- return;\n- }\n- if (prevProps.navInfo.verify && !this.props.navInfo.verify) {\n- this.clearModal();\n- } else if (!prevProps.navInfo.verify && this.props.navInfo.verify) {\n- this.showResetPasswordModal();\n- }\n- }\n-\n- showResetPasswordModal() {\n- const newURL = canonicalURLFromReduxState(\n- {\n- ...this.props.navInfo,\n- verify: null,\n- },\n- this.props.location.pathname,\n- );\n- const onClose = () => history.push(newURL);\n- const onSuccess = () => history.replace(newURL);\n- this.setModal(\n- <ResetPasswordModal onClose={onClose} onSuccess={onSuccess} />\n- );\n- }\n-\n- componentWillReceiveProps(nextProps: Props) {\n- if (nextProps.loggedIn) {\n- if (nextProps.location.pathname !== this.props.location.pathname) {\n+ if (this.props.loggedIn) {\n+ if (this.props.location.pathname !== prevProps.location.pathname) {\nconst newNavInfo = navInfoFromURL(\n- nextProps.location.pathname,\n- { navInfo: nextProps.navInfo },\n+ this.props.location.pathname,\n+ { navInfo: this.props.navInfo },\n);\n- if (!_isEqual(newNavInfo)(nextProps.navInfo)) {\n+ if (!_isEqual(newNavInfo)(this.props.navInfo)) {\nthis.props.dispatchActionPayload(updateNavInfoActionType, newNavInfo);\n}\n- } else if (!_isEqual(nextProps.navInfo)(this.props.navInfo)) {\n+ } else if (!_isEqual(this.props.navInfo)(prevProps.navInfo)) {\nconst newURL = canonicalURLFromReduxState(\n- nextProps.navInfo,\n- nextProps.location.pathname,\n+ this.props.navInfo,\n+ this.props.location.pathname,\n);\n- if (newURL !== nextProps.location.pathname) {\n+ if (newURL !== this.props.location.pathname) {\nhistory.push(newURL);\n}\n}\n}\n- const justLoggedIn = nextProps.loggedIn && !this.props.loggedIn;\n+ const justLoggedIn = this.props.loggedIn && !prevProps.loggedIn;\nif (justLoggedIn) {\nconst newURL = canonicalURLFromReduxState(\n- nextProps.navInfo,\n- nextProps.location.pathname,\n+ this.props.navInfo,\n+ this.props.location.pathname,\n);\n- if (nextProps.location.pathname !== newURL) {\n+ if (this.props.location.pathname !== newURL) {\nhistory.replace(newURL);\n}\n}\n- const justLoggedOut = !nextProps.loggedIn && this.props.loggedIn;\n- if (justLoggedOut && nextProps.location.pathname !== '/') {\n+ const justLoggedOut = !this.props.loggedIn && prevProps.loggedIn;\n+ if (justLoggedOut && this.props.location.pathname !== '/') {\nhistory.replace('/');\n}\n+\n+ const { navInfo, serverVerificationResult } = this.props;\n+ if (\n+ serverVerificationResult &&\n+ serverVerificationResult.field === verifyField.RESET_PASSWORD\n+ ) {\n+ if (this.props.navInfo.verify && !prevProps.navInfo.verify) {\n+ this.showResetPasswordModal();\n+ } else if (!this.props.navInfo.verify && prevProps.navInfo.verify) {\n+ this.clearModal();\n+ }\n+ }\n+ }\n+\n+ showResetPasswordModal() {\n+ const newURL = canonicalURLFromReduxState(\n+ {\n+ ...this.props.navInfo,\n+ verify: null,\n+ },\n+ this.props.location.pathname,\n+ );\n+ const onClose = () => history.push(newURL);\n+ const onSuccess = () => history.replace(newURL);\n+ this.setModal(\n+ <ResetPasswordModal onClose={onClose} onSuccess={onSuccess} />\n+ );\n}\nrender() {\n" }, { "change_type": "MODIFY", "old_path": "web/calendar/day.react.js", "new_path": "web/calendar/day.react.js", "diff": "@@ -88,10 +88,11 @@ class Day extends React.PureComponent<Props, State> {\nthis.setState({ mounted: true });\n}\n- componentWillReceiveProps(newProps: Props) {\n- if (newProps.onScreenThreadInfos.length === 0) {\n- this.setState({ pickerOpen: false });\n+ static getDerivedStateFromProps(props: Props) {\n+ if (props.onScreenThreadInfos.length === 0) {\n+ return { pickerOpen: false };\n}\n+ return null;\n}\ncomponentDidUpdate(prevProps: Props, prevState: State) {\n" }, { "change_type": "MODIFY", "old_path": "web/calendar/thread-picker.react.js", "new_path": "web/calendar/thread-picker.react.js", "diff": "@@ -23,22 +23,12 @@ type OptionProps = {\n};\nclass ThreadPickerOption extends React.PureComponent<OptionProps> {\n- style: { backgroundColor: string };\n-\n- constructor(props: OptionProps) {\n- super(props);\n- this.style = { backgroundColor: \"#\" + props.threadInfo.color };\n- }\n-\n- componentWillReceiveProps(nextProps: OptionProps) {\n- this.style = { backgroundColor: \"#\" + nextProps.threadInfo.color };\n- }\n-\nrender() {\n+ const colorStyle = { backgroundColor: `#{this.props.threadInfo.color}` };\nreturn (\n<div className={css.option} onClick={this.onClick}>\n<span className={css.thread}>\n- <div className={css.colorPreview} style={this.style} />\n+ <div className={css.colorPreview} style={colorStyle} />\n<span className={css.threadName}>\n{this.props.threadInfo.uiName}\n</span>\n" }, { "change_type": "MODIFY", "old_path": "web/chat/robotext-message.react.js", "new_path": "web/chat/robotext-message.react.js", "diff": "@@ -50,9 +50,9 @@ class RobotextMessage extends React.PureComponent<Props> {\n);\n}\n- componentWillReceiveProps(nextProps: Props) {\n+ componentDidUpdate() {\ninvariant(\n- messageTypeIsRobotext(nextProps.item.messageInfo.type),\n+ messageTypeIsRobotext(this.props.item.messageInfo.type),\n\"TextMessage can only be used for robotext\",\n);\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Remove deprecated React lifecycle methods And other improvements
129,187
26.09.2019 18:06:19
14,400
364152ba903e25743f20b3159183e18226693c7b
Update react/redux/etc. package version
[ { "change_type": "MODIFY", "old_path": "lib/package.json", "new_path": "lib/package.json", "diff": "\"invariant\": \"^2.2.2\",\n\"lodash\": \"^4.17.5\",\n\"prop-types\": \"^15.6.0\",\n- \"react\": \"^16.5.2\",\n- \"react-redux\": \"^5.0.5\",\n+ \"react\": \"16.8.6\",\n+ \"react-redux\": \"^7.1.1\",\n\"reselect\": \"^3.0.1\",\n\"string-hash\": \"^1.1.3\",\n\"tokenize-text\": \"^1.1.3\",\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"react-navigation-redux-helpers\": \"^3.0.6\",\n\"react-navigation-stack\": \"^1.9.0\",\n\"react-navigation-tabs\": \"^2.5.4\",\n- \"react-redux\": \"^5.0.6\",\n+ \"react-redux\": \"^7.1.1\",\n\"reactotron-react-native\": \"4.0.0-beta.1\",\n\"reactotron-redux\": \"^3.1.1\",\n- \"redux\": \"^4.0.1\",\n+ \"redux\": \"^4.0.4\",\n\"redux-devtools-extension\": \"^2.13.2\",\n\"redux-persist\": \"^5.4.0\",\n\"redux-thunk\": \"^2.2.0\",\n" }, { "change_type": "MODIFY", "old_path": "server/package.json", "new_path": "server/package.json", "diff": "\"mysql2\": \"^1.5.1\",\n\"node-schedule\": \"^1.3.0\",\n\"nodemailer\": \"^4.4.2\",\n- \"react\": \"^16.2.0\",\n- \"react-dom\": \"^16.2.0\",\n+ \"react\": \"16.8.6\",\n+ \"react-dom\": \"16.8.6\",\n\"react-hot-loader\": \"^3.1.3\",\n\"react-html-email\": \"^3.0.0\",\n- \"react-redux\": \"^5.0.7\",\n+ \"react-redux\": \"^7.1.1\",\n\"react-router\": \"^4.2.0\",\n\"redis\": \"^2.8.0\",\n- \"redux\": \"^4.0.1\",\n+ \"redux\": \"^4.0.4\",\n\"sharp\": \"^0.22.1\",\n\"sql-template-strings\": \"^2.2.2\",\n\"stream-cache\": \"^0.0.2\",\n" }, { "change_type": "MODIFY", "old_path": "web/package.json", "new_path": "web/package.json", "diff": "\"lib\": \"0.0.1\",\n\"lodash\": \"^4.17.5\",\n\"prop-types\": \"^15.6.0\",\n- \"react\": \"^16.7.0\",\n+ \"react\": \"16.8.6\",\n\"react-circular-progressbar\": \"^1.0.0\",\n\"react-color\": \"^2.13.0\",\n\"react-dnd\": \"^7.0.2\",\n\"react-dnd-html5-backend\": \"^7.0.2\",\n- \"react-dom\": \"^16.7.0\",\n+ \"react-dom\": \"16.8.6\",\n\"react-feather\": \"^1.1.4\",\n\"react-hot-loader\": \"^4.6.3\",\n\"react-linkify\": \"^0.2.2\",\n- \"react-redux\": \"^5.0.5\",\n+ \"react-redux\": \"^7.1.1\",\n\"react-router\": \"^4.1.1\",\n\"react-router-dom\": \"^4.1.1\",\n\"react-switch\": \"^2.3.2\",\n\"react-text-truncate\": \"^0.10.2\",\n\"react-timeago\": \"^3.4.3\",\n- \"redux\": \"^4.0.1\",\n+ \"redux\": \"^4.0.4\",\n\"redux-devtools-extension\": \"^2.13.2\",\n\"redux-thunk\": \"^2.2.0\",\n\"reselect\": \"^3.0.1\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "pirates \"^4.0.0\"\nsource-map-support \"^0.5.9\"\n-\"@babel/runtime@^7.0.0\", \"@babel/runtime@^7.1.2\":\n+\"@babel/runtime@^7.0.0\":\nversion \"7.1.2\"\nresolved \"https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.1.2.tgz#81c89935f4647706fc54541145e6b4ecfef4b8e3\"\nintegrity sha512-Y3SCjmhSupzFB6wcv1KmmFucH6gDVnI30WjOcicV10ju0cZjak3Jcs67YLIXBrmZYw1xCrVeJPbycFwrqNyxpg==\n@@ -6290,7 +6290,7 @@ hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0:\nresolved \"https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47\"\nintegrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==\n-hoist-non-react-statics@^3.0.0, hoist-non-react-statics@^3.0.1, hoist-non-react-statics@^3.1.0:\n+hoist-non-react-statics@^3.0.1, hoist-non-react-statics@^3.1.0:\nversion \"3.1.0\"\nresolved \"https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.1.0.tgz#42414ccdfff019cd2168168be998c7b3bd5245c0\"\nintegrity sha512-MYcYuROh7SBM69xHGqXEwQqDux34s9tz+sCnxJmN18kgWh6JFdTw/5YdZtqsOdZJXddE/wUpCzfEdDrJj8p0Iw==\n@@ -10699,25 +10699,15 @@ react-dnd@^7.0.2:\nrecompose \"^0.30.0\"\nshallowequal \"^1.1.0\"\n-react-dom@^16.2.0:\n- version \"16.6.0\"\n- resolved \"https://registry.yarnpkg.com/react-dom/-/react-dom-16.6.0.tgz#6375b8391e019a632a89a0988bce85f0cc87a92f\"\n- integrity sha512-Stm2D9dXEUUAQdvpvhvFj/DEXwC2PAL/RwEMhoN4dvvD2ikTlJegEXf97xryg88VIAU22ZAP7n842l+9BTz6+w==\n- dependencies:\n- loose-envify \"^1.1.0\"\n- object-assign \"^4.1.1\"\n- prop-types \"^15.6.2\"\n- scheduler \"^0.10.0\"\n-\n-react-dom@^16.7.0:\n- version \"16.7.0\"\n- resolved \"https://registry.yarnpkg.com/react-dom/-/react-dom-16.7.0.tgz#a17b2a7ca89ee7390bc1ed5eb81783c7461748b8\"\n- integrity sha512-D0Ufv1ExCAmF38P2Uh1lwpminZFRXEINJe53zRAbm4KPwSyd6DY/uDoS0Blj9jvPpn1+wivKpZYc8aAAN/nAkg==\n+react-dom@16.8.6:\n+ version \"16.8.6\"\n+ resolved \"https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f\"\n+ integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7phIPjYrT0jp4HjyEQrEROnw4dG41VVwi/wfoCneoleqrNX7iAD+pXebJZwrwA==\ndependencies:\nloose-envify \"^1.1.0\"\nobject-assign \"^4.1.1\"\nprop-types \"^15.6.2\"\n- scheduler \"^0.12.0\"\n+ scheduler \"^0.13.6\"\nreact-feather@^1.1.4:\nversion \"1.1.4\"\n@@ -10757,7 +10747,7 @@ react-html-email@^3.0.0:\ndependencies:\nprop-types \"^15.5.10\"\n-react-is@^16.3.2, react-is@^16.6.0:\n+react-is@^16.3.2:\nversion \"16.6.0\"\nresolved \"https://registry.yarnpkg.com/react-is/-/react-is-16.6.0.tgz#456645144581a6e99f6816ae2bd24ee94bdd0c01\"\nintegrity sha512-q8U7k0Fi7oxF1HvQgyBjPwDXeMplEsArnKt2iYhuIF86+GBbgLHdAmokL3XUFjTd7Q363OSNG55FOGUdONVn1g==\n@@ -10767,7 +10757,12 @@ react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6:\nresolved \"https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16\"\nintegrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==\n-react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4:\n+react-is@^16.9.0:\n+ version \"16.9.0\"\n+ resolved \"https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb\"\n+ integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw==\n+\n+react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4:\nversion \"3.0.4\"\nresolved \"https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362\"\nintegrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==\n@@ -10834,13 +10829,20 @@ react-native-image-resizer@^1.0.1:\nresolved \"https://registry.yarnpkg.com/react-native-image-resizer/-/react-native-image-resizer-1.0.1.tgz#e9eeb7f81596ffc490f822897952b046c07ee95c\"\nintegrity sha512-upBF/9TIs4twg19dSkSaDW/MzMpNbysEXtPuapu3GqvOuGIYHKQ30v6httDn7rIb6uCcNIWL1BwZJM2cDt/C9Q==\n-react-native-in-app-notification@^2.1.0:\n- version \"2.2.0\"\n- resolved \"https://registry.yarnpkg.com/react-native-in-app-notification/-/react-native-in-app-notification-2.2.0.tgz#690a9ef75bd0eecc15de77468f009a762c9f1748\"\n- integrity sha512-/BZSWahntJcDM6Kv8JBU4MtwpbAROk3kqa0LQJ8yF/Xz5Z1t9sFVDIrzOhtU3MviAsc2/zOGh3jHfLrHXQmbXQ==\n+react-native-in-app-notification@^3.0.0:\n+ version \"3.0.0\"\n+ resolved \"https://registry.yarnpkg.com/react-native-in-app-notification/-/react-native-in-app-notification-3.0.0.tgz#1ebc4f8f463fe70b366b17901441c81806656632\"\n+ integrity sha512-0oLUcS/TgLJFfyQkp6FxgQslJnnsvXaVyca8QvFWbw44cjK8zDqDk3HiOQKdW/UCbRbTQ0akMwgjESxNEGgIMg==\ndependencies:\n+ hoist-non-react-statics \"^3.0.1\"\n+ react-native-iphone-x-helper \"^1.2.0\"\nreact-native-swipe-gestures \"^1.0.2\"\n+react-native-iphone-x-helper@^1.2.0:\n+ version \"1.2.1\"\n+ resolved \"https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.1.tgz#645e2ffbbb49e80844bb4cbbe34a126fda1e6772\"\n+ integrity sha512-/VbpIEp8tSNNHIvstuA3Swx610whci1Zpc9mqNkqn14DkMbw+ORviln2u0XyHG1kPvvwTNGZY6QpeFwxYaSdbQ==\n+\nreact-native-keyboard-input@^5.3.1:\nversion \"5.3.1\"\nresolved \"https://registry.yarnpkg.com/react-native-keyboard-input/-/react-native-keyboard-input-5.3.1.tgz#e90f43e17c070535cb54cc0be66a247f177474fc\"\n@@ -10884,10 +10886,9 @@ react-native-progress@^3.6.0:\ndependencies:\nprop-types \"^15.7.2\"\n-react-native-reanimated@^1.2.0:\n+\"react-native-reanimated@https://github.com/kmagiera/react-native-reanimated.git#cd5a319eb6afd6efe5fb6750f7cef332fd17bdbd\":\nversion \"1.2.0\"\n- resolved \"https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-1.2.0.tgz#9219227a52a5dfa4d34c324596d6726ccd874293\"\n- integrity sha512-vkWRHrPK5qfHP/ZawlRoo38oeYe9NZaaOH/lmFxRcsKzaSK6x3H5ZPXI8lK6MfTLveqwo1QhJje3zIKXO4nQQw==\n+ resolved \"https://github.com/kmagiera/react-native-reanimated.git#cd5a319eb6afd6efe5fb6750f7cef332fd17bdbd\"\nreact-native-safe-area-view@^0.14.1:\nversion \"0.14.6\"\n@@ -11032,18 +11033,17 @@ react-proxy@^3.0.0-alpha.0:\ndependencies:\nlodash \"^4.6.1\"\n-react-redux@^5.0.5, react-redux@^5.0.6, react-redux@^5.0.7:\n- version \"5.1.0\"\n- resolved \"https://registry.yarnpkg.com/react-redux/-/react-redux-5.1.0.tgz#948b1e2686473d1999092bcfb32d0dc43d33f667\"\n- integrity sha512-CRMpEx8+ccpoVxQrQDkG1obExNYpj6dZ1Ni7lUNFB9wcxOhy02tIqpFo4IUXc0kYvCGMu6ABj9A4imEX2VGZJQ==\n+react-redux@^7.1.1:\n+ version \"7.1.1\"\n+ resolved \"https://registry.yarnpkg.com/react-redux/-/react-redux-7.1.1.tgz#ce6eee1b734a7a76e0788b3309bf78ff6b34fa0a\"\n+ integrity sha512-QsW0vcmVVdNQzEkrgzh2W3Ksvr8cqpAv5FhEk7tNEft+5pp7rXxAudTz3VOPawRkLIepItpkEIyLcN/VVXzjTg==\ndependencies:\n- \"@babel/runtime\" \"^7.1.2\"\n- hoist-non-react-statics \"^3.0.0\"\n+ \"@babel/runtime\" \"^7.5.5\"\n+ hoist-non-react-statics \"^3.3.0\"\ninvariant \"^2.2.4\"\n- loose-envify \"^1.1.0\"\n- prop-types \"^15.6.1\"\n- react-is \"^16.6.0\"\n- react-lifecycles-compat \"^3.0.0\"\n+ loose-envify \"^1.4.0\"\n+ prop-types \"^15.7.2\"\n+ react-is \"^16.9.0\"\nreact-refresh@^0.4.0:\nversion \"0.4.2\"\n@@ -11122,26 +11122,6 @@ react@16.8.6:\nprop-types \"^15.6.2\"\nscheduler \"^0.13.6\"\n-react@^16.2.0, react@^16.5.2:\n- version \"16.6.0\"\n- resolved \"https://registry.yarnpkg.com/react/-/react-16.6.0.tgz#b34761cfaf3e30f5508bc732fb4736730b7da246\"\n- integrity sha512-zJPnx/jKtuOEXCbQ9BKaxDMxR0001/hzxXwYxG8septeyYGfsgAei6NgfbVgOhbY1WOP2o3VPs/E9HaN+9hV3Q==\n- dependencies:\n- loose-envify \"^1.1.0\"\n- object-assign \"^4.1.1\"\n- prop-types \"^15.6.2\"\n- scheduler \"^0.10.0\"\n-\n-react@^16.7.0:\n- version \"16.7.0\"\n- resolved \"https://registry.yarnpkg.com/react/-/react-16.7.0.tgz#b674ec396b0a5715873b350446f7ea0802ab6381\"\n- integrity sha512-StCz3QY8lxTb5cl2HJxjwLFOXPIFQp+p+hxQfc8WE0QiLfCtIlKj8/+5tjjKm8uSTlAW+fCPaavGFS06V9Ar3A==\n- dependencies:\n- loose-envify \"^1.1.0\"\n- object-assign \"^4.1.1\"\n- prop-types \"^15.6.2\"\n- scheduler \"^0.12.0\"\n-\nreactcss@^1.2.0:\nversion \"1.2.3\"\nresolved \"https://registry.yarnpkg.com/reactcss/-/reactcss-1.2.3.tgz#c00013875e557b1cf0dfd9a368a1c3dab3b548dd\"\n@@ -11370,6 +11350,14 @@ redux@^4.0.1:\nloose-envify \"^1.4.0\"\nsymbol-observable \"^1.2.0\"\n+redux@^4.0.4:\n+ version \"4.0.4\"\n+ resolved \"https://registry.yarnpkg.com/redux/-/redux-4.0.4.tgz#4ee1aeb164b63d6a1bcc57ae4aa0b6e6fa7a3796\"\n+ integrity sha512-vKv4WdiJxOWKxK0yRoaK3Y4pxxB0ilzVx6dszU2W8wLxlb2yikRph4iV/ymtdJ6ZxpBLFbyrxklnT5yBbQSl3Q==\n+ dependencies:\n+ loose-envify \"^1.4.0\"\n+ symbol-observable \"^1.2.0\"\n+\nregenerate-unicode-properties@^7.0.0:\nversion \"7.0.0\"\nresolved \"https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c\"\n@@ -11812,14 +11800,6 @@ scheduler@0.14.0:\nloose-envify \"^1.1.0\"\nobject-assign \"^4.1.1\"\n-scheduler@^0.10.0:\n- version \"0.10.0\"\n- resolved \"https://registry.yarnpkg.com/scheduler/-/scheduler-0.10.0.tgz#7988de90fe7edccc774ea175a783e69c40c521e1\"\n- integrity sha512-+TSTVTCBAA3h8Anei3haDc1IRwMeDmtI/y/o3iBe3Mjl2vwYF9DtPDt929HyRmV/e7au7CLu8sc4C4W0VOs29w==\n- dependencies:\n- loose-envify \"^1.1.0\"\n- object-assign \"^4.1.1\"\n-\nscheduler@^0.12.0:\nversion \"0.12.0\"\nresolved \"https://registry.yarnpkg.com/scheduler/-/scheduler-0.12.0.tgz#8ab17699939c0aedc5a196a657743c496538647b\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Update react/redux/etc. package version
129,187
26.09.2019 18:16:12
14,400
e46a106b086b2d17038d505314a88155cb1eaafa
[native] react-native-keyboard-input patch to avoid componentWillReceiveProps
[ { "change_type": "MODIFY", "old_path": "patches/react-native-keyboard-input+5.3.1.patch", "new_path": "patches/react-native-keyboard-input+5.3.1.patch", "diff": "@@ -24,7 +24,7 @@ index 2a31b47..21090bf 100644\nUIView* inputField = [self.bridge.uiManager viewForReactTag:inputFieldTag];\nif(inputField != nil)\ndiff --git a/node_modules/react-native-keyboard-input/lib/ios/RCTCustomInputController/RCTCustomKeyboardViewController.m b/node_modules/react-native-keyboard-input/lib/ios/RCTCustomInputController/RCTCustomKeyboardViewController.m\n-index e856264..cc5ba15 100644\n+index e856264..3286907 100644\n--- a/node_modules/react-native-keyboard-input/lib/ios/RCTCustomInputController/RCTCustomKeyboardViewController.m\n+++ b/node_modules/react-native-keyboard-input/lib/ios/RCTCustomInputController/RCTCustomKeyboardViewController.m\n@@ -62,6 +62,40 @@ index 0000000..9f724be\n+ s.dependency 'react-native-keyboard-tracking-view'\n+\n+end\n+diff --git a/node_modules/react-native-keyboard-input/src/CustomKeyboardView.js b/node_modules/react-native-keyboard-input/src/CustomKeyboardView.js\n+index 078efb6..da709f1 100644\n+--- a/node_modules/react-native-keyboard-input/src/CustomKeyboardView.js\n++++ b/node_modules/react-native-keyboard-input/src/CustomKeyboardView.js\n+@@ -49,16 +49,16 @@ export default class CustomKeyboardView extends Component {\n+ }\n+ }\n+\n+- async componentWillReceiveProps(nextProps) {\n+- const {inputRef, component, initialProps, onRequestShowKeyboard} = nextProps;\n++ async componentDidUpdate(prevProps) {\n++ const {inputRef, component, initialProps, onRequestShowKeyboard} = this.props;\n+\n+ if (IsAndroid) {\n+- if (this.props.component !== component && !component) {\n++ if (prevProps.component !== component && !component) {\n+ await TextInputKeyboardManagerAndroid.reset();\n+ }\n+ }\n+\n+- if (IsIOS && TextInputKeyboardManagerIOS && inputRef && component !== this.props.component) {\n++ if (IsIOS && TextInputKeyboardManagerIOS && inputRef && component !== prevProps.component) {\n+ if (component) {\n+ TextInputKeyboardManagerIOS.setInputComponent(inputRef, {component, initialProps});\n+ } else {\n+@@ -72,7 +72,7 @@ export default class CustomKeyboardView extends Component {\n+ onRequestShowKeyboard(args.keyboardId);\n+ });\n+ }\n+- this.registerListener(this.props, nextProps);\n++ this.registerListener(prevProps, this.props);\n+ }\n+\n+ shouldComponentUpdate(nextProps) {\ndiff --git a/node_modules/react-native-keyboard-input/src/TextInputKeyboardMangerIOS.js b/node_modules/react-native-keyboard-input/src/TextInputKeyboardMangerIOS.js\nindex 20d61c9..13a6493 100644\n--- a/node_modules/react-native-keyboard-input/src/TextInputKeyboardMangerIOS.js\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] react-native-keyboard-input patch to avoid componentWillReceiveProps
129,187
26.09.2019 18:27:15
14,400
b7b33d6ec1448ad309ab75e1d60bd9fa936805fc
[native] react-native-swipe-gestures patch to avoid deprecated React lifecycle methods
[ { "change_type": "ADD", "old_path": null, "new_path": "patches/react-native-swipe-gestures+1.0.2.patch", "diff": "+diff --git a/node_modules/react-native-swipe-gestures/index.js b/node_modules/react-native-swipe-gestures/index.js\n+index caa2a53..6737084 100644\n+--- a/node_modules/react-native-swipe-gestures/index.js\n++++ b/node_modules/react-native-swipe-gestures/index.js\n+@@ -24,13 +24,7 @@ class GestureRecognizer extends Component {\n+ constructor(props, context) {\n+ super(props, context);\n+ this.swipeConfig = Object.assign(swipeConfig, props.config);\n+- }\n+-\n+- componentWillReceiveProps(props) {\n+- this.swipeConfig = Object.assign(swipeConfig, props.config);\n+- }\n+\n+- componentWillMount() {\n+ const responderEnd = this._handlePanResponderEnd.bind(this);\n+ const shouldSetResponder = this._handleShouldSetPanResponder.bind(this);\n+ this._panResponder = PanResponder.create({ //stop JS beautify collapse\n+@@ -41,6 +35,12 @@ class GestureRecognizer extends Component {\n+ });\n+ }\n+\n++ componentDidUpdate(prevProps) {\n++ if (this.props.config !== prevProps.config) {\n++ this.swipeConfig = Object.assign(swipeConfig, this.props.config);\n++ }\n++ }\n++\n+ _handleShouldSetPanResponder(evt, gestureState) {\n+ return evt.nativeEvent.touches.length === 1 && !this._gestureIsClick(gestureState);\n+ }\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] react-native-swipe-gestures patch to avoid deprecated React lifecycle methods
129,187
26.09.2019 18:48:22
14,400
e344c34cc047b6794372f294eeffed0c9ac0031f
[native] react-native-hyperlink patch to avoid componentWillReceiveProps
[ { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"react-native-floating-action\": \"^1.9.0\",\n\"react-native-fs\": \"^2.14.1\",\n\"react-native-gesture-handler\": \"^1.4.1\",\n- \"react-native-hyperlink\": \"git+https://git@github.com/ashoat/react-native-hyperlink.git#both\",\n+ \"react-native-hyperlink\": \"^0.0.16\",\n\"react-native-image-resizer\": \"^1.0.1\",\n\"react-native-in-app-notification\": \"^3.0.0\",\n\"react-native-keyboard-input\": \"^5.3.1\",\n" }, { "change_type": "ADD", "old_path": null, "new_path": "patches/react-native-hyperlink+0.0.16.patch", "diff": "+diff --git a/node_modules/react-native-hyperlink/dist/index.js b/node_modules/react-native-hyperlink/dist/index.js\n+index a895324..caa80b6 100644\n+--- a/node_modules/react-native-hyperlink/dist/index.js\n++++ b/node_modules/react-native-hyperlink/dist/index.js\n+@@ -52,13 +52,11 @@ var Hyperlink = function (_Component) {\n+ }\n+\n+ _createClass(Hyperlink, [{\n+- key: 'componentWillReceiveProps',\n+- value: function componentWillReceiveProps() {\n+- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n+- _ref$linkify = _ref.linkify,\n+- linkify = _ref$linkify === undefined ? require('linkify-it')() : _ref$linkify;\n+-\n+- this.linkifyIt = linkify;\n++ key: 'componentDidUpdate',\n++ value: function componentDidUpdate(prevProps) {\n++ if (this.props.linkify !== prevProps.linkify) {\n++ this.linkifyIt = this.props.linkify || require('linkify-it')()\n++ }\n+ }\n+ }, {\n+ key: 'render',\n+@@ -115,7 +113,7 @@ var Hyperlink = function (_Component) {\n+ if (_this2.props.linkText) text = typeof _this2.props.linkText === 'function' ? _this2.props.linkText(url) : _this2.props.linkText;\n+\n+ var clickHandlerProps = {};\n+- if (OS !== 'web') {\n++ if (OS !== 'web' && this.props.onLongPress) {\n+ clickHandlerProps.onLongPress = _this2.props.onLongPress ? function () {\n+ return _this2.props.onLongPress(url, text);\n+ } : undefined;\n+diff --git a/node_modules/react-native-hyperlink/src/Hyperlink.js b/node_modules/react-native-hyperlink/src/Hyperlink.js\n+index c391bb0..7d6f69e 100644\n+--- a/node_modules/react-native-hyperlink/src/Hyperlink.js\n++++ b/node_modules/react-native-hyperlink/src/Hyperlink.js\n+@@ -23,8 +23,10 @@ class Hyperlink extends Component {\n+ this.linkifyIt = props.linkify || require('linkify-it')()\n+ }\n+\n+- componentWillReceiveProps ({ linkify = require('linkify-it')() } = {}) {\n+- this.linkifyIt = linkify\n++ componentDidUpdate(prevProps) {\n++ if (this.props.linkify !== prevProps.linkify) {\n++ this.linkifyIt = this.props.linkify || require('linkify-it')()\n++ }\n+ }\n+\n+ render() {\n+@@ -79,7 +81,7 @@ class Hyperlink extends Component {\n+ : this.props.linkText\n+\n+ const clickHandlerProps = {}\n+- if (OS !== 'web') {\n++ if (OS !== 'web' && this.props.onLongPress) {\n+ clickHandlerProps.onLongPress = this.props.onLongPress\n+ ? () => this.props.onLongPress(url, text)\n+ : undefined\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -7929,13 +7929,6 @@ lightercollective@^0.1.0:\nresolved \"https://registry.yarnpkg.com/lightercollective/-/lightercollective-0.1.0.tgz#70df102c530dcb8d0ccabfe6175a8d00d5f61300\"\nintegrity sha512-J9tg5uraYoQKaWbmrzDDexbG6hHnMcWS1qLYgJSWE+mpA3U5OCSeMUhb+K55otgZJ34oFdR0ECvdIb3xuO5JOQ==\n-linkify-it@^1.2.0:\n- version \"1.2.4\"\n- resolved \"https://registry.yarnpkg.com/linkify-it/-/linkify-it-1.2.4.tgz#0773526c317c8fd13bd534ee1d180ff88abf881a\"\n- integrity sha1-B3NSbDF8j9E71TTuHRgP+Iq/iBo=\n- dependencies:\n- uc.micro \"^1.0.1\"\n-\nlinkify-it@^2.0.3:\nversion \"2.0.3\"\nresolved \"https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.0.3.tgz#d94a4648f9b1c179d64fa97291268bdb6ce9434f\"\n@@ -7943,6 +7936,13 @@ linkify-it@^2.0.3:\ndependencies:\nuc.micro \"^1.0.1\"\n+linkify-it@^2.2.0:\n+ version \"2.2.0\"\n+ resolved \"https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.2.0.tgz#e3b54697e78bf915c70a38acd78fd09e0058b1cf\"\n+ integrity sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==\n+ dependencies:\n+ uc.micro \"^1.0.1\"\n+\nlistenercount@~1.0.1:\nversion \"1.0.1\"\nresolved \"https://registry.yarnpkg.com/listenercount/-/listenercount-1.0.1.tgz#84c8a72ab59c4725321480c975e6508342e70937\"\n@@ -10817,11 +10817,12 @@ react-native-gesture-handler@^1.4.1:\ninvariant \"^2.2.4\"\nprop-types \"^15.7.2\"\n-\"react-native-hyperlink@git+https://git@github.com/ashoat/react-native-hyperlink.git#both\":\n- version \"0.0.12\"\n- resolved \"git+https://git@github.com/ashoat/react-native-hyperlink.git#0c872d5be30ba6382c926e78ad1545a97f586f85\"\n+react-native-hyperlink@^0.0.16:\n+ version \"0.0.16\"\n+ resolved \"https://registry.yarnpkg.com/react-native-hyperlink/-/react-native-hyperlink-0.0.16.tgz#3f60f6d1fb86ea883c64a2cec3e9ee2c890ae739\"\n+ integrity sha512-3W+dK0u96XTbNzmjTV0NLBCjZuF3r87Zr1FwDYeob5fjeU9grc9dss5Rind/drJFmXH5hXRyhKxX0xFs1gULFw==\ndependencies:\n- linkify-it \"^1.2.0\"\n+ linkify-it \"^2.2.0\"\nmdurl \"^1.0.0\"\nreact-native-image-resizer@^1.0.1:\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] react-native-hyperlink patch to avoid componentWillReceiveProps
129,187
26.09.2019 22:48:34
14,400
df223806020d7fc781521168ab11eda34c300c10
[native] react-native-floating-action@^1.19.1
[ { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"react-native-exit-app\": \"^1.1.0\",\n\"react-native-fast-image\": \"^7.0.2\",\n\"react-native-firebase\": \"^5.5.6\",\n- \"react-native-floating-action\": \"^1.9.0\",\n+ \"react-native-floating-action\": \"^1.19.1\",\n\"react-native-fs\": \"^2.14.1\",\n\"react-native-gesture-handler\": \"^1.4.1\",\n\"react-native-hyperlink\": \"^0.0.16\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -10794,10 +10794,10 @@ react-native-firebase@^5.5.6:\nopencollective-postinstall \"^2.0.0\"\nprop-types \"^15.7.2\"\n-react-native-floating-action@^1.9.0:\n- version \"1.13.0\"\n- resolved \"https://registry.yarnpkg.com/react-native-floating-action/-/react-native-floating-action-1.13.0.tgz#876ab9227c4eda8630020a6a3adc20041870edf3\"\n- integrity sha512-KqqaEO/nIdims+reWq1pPPDptKqEuG9N8Pt+FtnuVUr35HvyWfiwBf91o9ZMRuO2S+X9AKnq+xuy1iuQK77eQQ==\n+react-native-floating-action@^1.19.1:\n+ version \"1.19.1\"\n+ resolved \"https://registry.yarnpkg.com/react-native-floating-action/-/react-native-floating-action-1.19.1.tgz#fc3dcd0441ecbaf2d870b71f6db27f2db0f811b3\"\n+ integrity sha512-6zgiCJyV63TOxpDKK+OxzhghMcBSn1Qhjb8p8TrfrUGAkzh7gQcmNN4ahq1CVbrN0ZpKhWET68WeifisYnQWyg==\nreact-native-fs@^2.14.1:\nversion \"2.14.1\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] react-native-floating-action@^1.19.1
129,187
27.09.2019 00:55:22
14,400
f9a9936bfdc678087c3d5532adfe1bbf250f98f2
[web] Match with react-dom version
[ { "change_type": "MODIFY", "old_path": "web/package.json", "new_path": "web/package.json", "diff": "\"@babel/preset-env\": \"^7.2.3\",\n\"@babel/preset-flow\": \"^7.0.0\",\n\"@babel/preset-react\": \"^7.0.0\",\n- \"@hot-loader/react-dom\": \"^16.7.0\",\n+ \"@hot-loader/react-dom\": \"16.8.6\",\n\"assets-webpack-plugin\": \"^3.9.7\",\n\"babel-plugin-transform-remove-console\": \"^6.8.4\",\n\"concurrently\": \"^3.5.1\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "dependencies:\n\"@hapi/hoek\" \"8.x.x\"\n-\"@hot-loader/react-dom@^16.7.0\":\n- version \"16.7.0\"\n- resolved \"https://registry.yarnpkg.com/@hot-loader/react-dom/-/react-dom-16.7.0.tgz#892e9f13a4eff04bf9164870d0082ce2a69bee69\"\n- integrity sha512-4MEXzIaKgCIaPSl4vRfmiD/WgTyhNWBPxYD5E5hnsn7V+K3L4fkysI21jcgV3gH2ILqVpwkqN0oZNVkiDiWNYQ==\n+\"@hot-loader/react-dom@16.8.6\":\n+ version \"16.8.6\"\n+ resolved \"https://registry.yarnpkg.com/@hot-loader/react-dom/-/react-dom-16.8.6.tgz#7923ba27db1563a7cc48d4e0b2879a140df461ea\"\n+ integrity sha512-+JHIYh33FVglJYZAUtRjfT5qZoT2mueJGNzU5weS2CVw26BgbxGKSujlJhO85BaRbg8sqNWyW1hYBILgK3ZCgA==\ndependencies:\nloose-envify \"^1.1.0\"\nobject-assign \"^4.1.1\"\nprop-types \"^15.6.2\"\n- scheduler \"^0.12.0\"\n+ scheduler \"^0.13.6\"\n\"@jest/console@^24.7.1\":\nversion \"24.7.1\"\n@@ -11797,14 +11797,6 @@ scheduler@0.14.0:\nloose-envify \"^1.1.0\"\nobject-assign \"^4.1.1\"\n-scheduler@^0.12.0:\n- version \"0.12.0\"\n- resolved \"https://registry.yarnpkg.com/scheduler/-/scheduler-0.12.0.tgz#8ab17699939c0aedc5a196a657743c496538647b\"\n- integrity sha512-t7MBR28Akcp4Jm+QoR63XgAi9YgCUmgvDHqf5otgAj4QvdoBE4ImCX0ffehefePPG+aitiYHp0g/mW6s4Tp+dw==\n- dependencies:\n- loose-envify \"^1.1.0\"\n- object-assign \"^4.1.1\"\n-\nscheduler@^0.13.6:\nversion \"0.13.6\"\nresolved \"https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Match @hot-loader/react-dom with react-dom version
129,187
03.10.2019 15:46:57
14,400
e0f6ac64a20328d8adc2b27af462bd733b14fa00
[lib] Remove unused whatwg-fetch We only need to polyfill on web, and we're doing that already with `isomorphic-fetch`
[ { "change_type": "DELETE", "old_path": "lib/flow-typed/npm/whatwg-fetch_vx.x.x.js", "new_path": null, "diff": "-// flow-typed signature: 6d8a62d17e58e83d837c9742d272b2a3\n-// flow-typed version: <<STUB>>/whatwg-fetch_v^2.0.3/flow_v0.98.0\n-\n-/**\n- * This is an autogenerated libdef stub for:\n- *\n- * 'whatwg-fetch'\n- *\n- * Fill this stub out by replacing all the `any` types.\n- *\n- * Once filled out, we encourage you to share your work with the\n- * community by sending a pull request to:\n- * https://github.com/flowtype/flow-typed\n- */\n-\n-declare module 'whatwg-fetch' {\n- declare module.exports: any;\n-}\n-\n-/**\n- * We include stubs for each file inside this npm package in case you need to\n- * require those files directly. Feel free to delete any files that aren't\n- * needed.\n- */\n-declare module 'whatwg-fetch/fetch' {\n- declare module.exports: any;\n-}\n-\n-// Filename aliases\n-declare module 'whatwg-fetch/fetch.js' {\n- declare module.exports: $Exports<'whatwg-fetch/fetch'>;\n-}\n" }, { "change_type": "MODIFY", "old_path": "lib/package.json", "new_path": "lib/package.json", "diff": "\"reselect\": \"^3.0.1\",\n\"string-hash\": \"^1.1.3\",\n\"tokenize-text\": \"^1.1.3\",\n- \"util-inspect\": \"^0.1.8\",\n- \"whatwg-fetch\": \"^2.0.3\"\n+ \"util-inspect\": \"^0.1.8\"\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -14189,11 +14189,6 @@ whatwg-fetch@>=0.10.0, whatwg-fetch@^3.0.0:\nresolved \"https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb\"\nintegrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==\n-whatwg-fetch@^2.0.3:\n- version \"2.0.4\"\n- resolved \"https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f\"\n- integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==\n-\nwhatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0:\nversion \"2.2.0\"\nresolved \"https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.2.0.tgz#a3d58ef10b76009b042d03e25591ece89b88d171\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Remove unused whatwg-fetch We only need to polyfill on web, and we're doing that already with `isomorphic-fetch`
129,187
03.10.2019 16:14:03
14,400
2d2be4660e0a74b8b7bf9972922817e2b8304a5e
[native] Remove unused url-parse
[ { "change_type": "MODIFY", "old_path": "native/account/native-credentials.js", "new_path": "native/account/native-credentials.js", "diff": "@@ -9,7 +9,6 @@ import {\nresetInternetCredentials,\ntype UserCredentials,\n} from 'react-native-keychain';\n-import URL from 'url-parse';\ntype StoredCredentials = {|\nstate: \"undetermined\" | \"determined\" | \"unsupported\",\n" }, { "change_type": "DELETE", "old_path": "native/flow-typed/npm/url-parse_vx.x.x.js", "new_path": null, "diff": "-// flow-typed signature: a05a57e7bdb95ff52c93b9116eeadf37\n-// flow-typed version: <<STUB>>/url-parse_v^1.1.9/flow_v0.98.0\n-\n-/**\n- * This is an autogenerated libdef stub for:\n- *\n- * 'url-parse'\n- *\n- * Fill this stub out by replacing all the `any` types.\n- *\n- * Once filled out, we encourage you to share your work with the\n- * community by sending a pull request to:\n- * https://github.com/flowtype/flow-typed\n- */\n-\n-declare module 'url-parse' {\n- declare module.exports: any;\n-}\n-\n-/**\n- * We include stubs for each file inside this npm package in case you need to\n- * require those files directly. Feel free to delete any files that aren't\n- * needed.\n- */\n-declare module 'url-parse/dist/url-parse' {\n- declare module.exports: any;\n-}\n-\n-declare module 'url-parse/dist/url-parse.min' {\n- declare module.exports: any;\n-}\n-\n-// Filename aliases\n-declare module 'url-parse/dist/url-parse.js' {\n- declare module.exports: $Exports<'url-parse/dist/url-parse'>;\n-}\n-declare module 'url-parse/dist/url-parse.min.js' {\n- declare module.exports: $Exports<'url-parse/dist/url-parse.min'>;\n-}\n-declare module 'url-parse/index' {\n- declare module.exports: $Exports<'url-parse'>;\n-}\n-declare module 'url-parse/index.js' {\n- declare module.exports: $Exports<'url-parse'>;\n-}\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"redux-thunk\": \"^2.2.0\",\n\"reselect\": \"^3.0.1\",\n\"shallowequal\": \"^1.0.2\",\n- \"tinycolor2\": \"^1.4.1\",\n- \"url-parse\": \"^1.1.9\"\n+ \"tinycolor2\": \"^1.4.1\"\n},\n\"devDependencies\": {\n\"@babel/core\": \"^7.5.5\",\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Remove unused url-parse
129,187
03.10.2019 17:45:56
14,400
88059bedc36d80955319bdb5e7c2a2a2aec571ac
[native] Don't use url-loader except in dev Only need it when resolving URLs with `css-loader`, which only happens in dev
[ { "change_type": "MODIFY", "old_path": "web/webpack.config.js", "new_path": "web/webpack.config.js", "diff": "@@ -199,7 +199,6 @@ module.exports = function(env) {\n],\n},\n},\n- imageRule,\n{\ntest: /\\.css$/,\nexclude: /node_modules\\/.*\\.css$/,\n@@ -253,7 +252,6 @@ module.exports = function(env) {\nmodule: {\nrules: [\nbabelRule,\n- imageRule,\n{\ntest: /\\.css$/,\nuse: {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Don't use url-loader except in dev Only need it when resolving URLs with `css-loader`, which only happens in dev
129,187
03.10.2019 17:47:14
14,400
2b5cfb4e3a446ec7f4bea1131b08db582cebce21
[server] Update loader.mjs for Node 12
[ { "change_type": "MODIFY", "old_path": "server/loader.mjs", "new_path": "server/loader.mjs", "diff": "-import url from 'url';\n+import { URL, pathToFileURL } from 'url';\nimport Module from 'module';\nimport fs from 'fs';\nimport { promisify } from 'util';\nconst builtins = Module.builtinModules;\n-const extensions = { js: 'esm', json: \"json\" };\n+const extensions = { js: 'module', json: \"json\" };\nconst access = promisify(fs.access);\nconst readFile = promisify(fs.readFile);\n-const baseURL = new url.URL('file://');\n+const baseURL = pathToFileURL(process.cwd()).href;\nexport async function resolve(\nspecifier,\n@@ -32,7 +32,7 @@ export async function resolve(\nconst isJSON = resultURL.search(/json(:[0-9]+)?$/) !== -1;\nreturn {\nurl: resultURL,\n- format: isJSON ? 'json' : 'esm',\n+ format: isJSON ? 'json' : 'module',\n};\n}\n@@ -43,7 +43,7 @@ export async function resolve(\n//console.log(`${specifier} -> ${resultURL} is server -> web`);\nreturn {\nurl: resultURL,\n- format: \"cjs\",\n+ format: \"commonjs\",\n};\n}\n@@ -57,7 +57,7 @@ export async function resolve(\n//console.log(`${specifier} -> ${resultURL} is server -> web`);\nreturn {\nurl: resultURL,\n- format: 'esm',\n+ format: 'module',\n};\n}\n@@ -68,11 +68,11 @@ export async function resolve(\n) {\nlet error;\ntry {\n- const candidateURL = new url.URL(specifier, parentModuleURL);\n+ const candidateURL = new URL(specifier, parentModuleURL);\nawait access(candidateURL.pathname);\nreturn {\nurl: candidateURL.href,\n- format: \"esm\",\n+ format: \"module\",\n};\n} catch (err) {\nerror = err;\n@@ -80,7 +80,7 @@ export async function resolve(\nfor (let extension in extensions) {\nconst candidate = `${specifier}.${extension}`;\ntry {\n- const candidateURL = new url.URL(candidate, parentModuleURL);\n+ const candidateURL = new URL(candidate, parentModuleURL);\nawait access(candidateURL.pathname);\nconst resultURL = candidateURL.href;\n//console.log(`${specifier} -> ${resultURL} is server -> server`);\n@@ -152,17 +152,17 @@ async function resolveModule(specifier, defaultResult) {\nnew RegExp(`file://(.*node_modules\\/${module})`),\n)[1];\nif (localPath) {\n- const esPathURL = new url.URL(`file://${moduleFolder}/es/${localPath}.js`);\n+ const esPathURL = new URL(`file://${moduleFolder}/es/${localPath}.js`);\ntry {\nawait access(esPathURL.pathname);\nreturn {\nurl: esPathURL.href,\n- format: \"esm\",\n+ format: \"module\",\n};\n} catch (err) {\nreturn {\nurl: defaultResult.url,\n- format: \"esm\",\n+ format: \"module\",\n};\n}\n}\n@@ -172,13 +172,13 @@ async function resolveModule(specifier, defaultResult) {\nif (packageJSON[\"jsnext:main\"]) {\nreturn {\nurl: `file://${moduleFolder}/${packageJSON[\"jsnext:main\"]}`,\n- format: \"esm\",\n+ format: \"module\",\n};\n}\nif (packageJSON.module) {\nreturn {\nurl: `file://${moduleFolder}/${packageJSON.module}`,\n- format: \"esm\",\n+ format: \"module\",\n};\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Update loader.mjs for Node 12
129,187
03.10.2019 19:06:13
14,400
f3f473d584bab73085d1634867880ded1e01abb3
[server] Use dynamic import to open assets.json on prod
[ { "change_type": "MODIFY", "old_path": "server/.babelrc", "new_path": "server/.babelrc", "diff": "presets: ['@babel/preset-react', '@babel/preset-flow'],\nplugins: [\n'@babel/plugin-proposal-class-properties',\n- '@babel/plugin-proposal-object-rest-spread'\n+ '@babel/plugin-proposal-object-rest-spread',\n+ '@babel/plugin-syntax-dynamic-import'\n],\n}\n" }, { "change_type": "MODIFY", "old_path": "server/package.json", "new_path": "server/package.json", "diff": "\"@babel/node\": \"^7.6.2\",\n\"@babel/plugin-proposal-class-properties\": \"^7.5.5\",\n\"@babel/plugin-proposal-object-rest-spread\": \"^7.6.2\",\n+ \"@babel/plugin-syntax-dynamic-import\": \"^7.2.0\",\n\"@babel/preset-flow\": \"^7.0.0\",\n\"@babel/preset-react\": \"^7.0.0\",\n\"chokidar-cli\": \"^2.0.0\",\n" }, { "change_type": "MODIFY", "old_path": "server/src/responders/website-responders.js", "new_path": "server/src/responders/website-responders.js", "diff": "@@ -56,7 +56,7 @@ if (process.env.NODE_ENV === \"dev\") {\nfontsURL = \"fonts/local-fonts.css\";\ncssInclude = \"\";\n} else {\n- const assets = require('../../compiled/assets');\n+ const assets = import('../../compiled/assets');\njsURL = `compiled/${assets.browser.js}`;\nfontsURL = \"https://fonts.googleapis.com/css?family=Open+Sans:300,600%7CAnaheim\";\ncssInclude = html`<link\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Use dynamic import to open assets.json on prod
129,187
03.10.2019 23:43:04
14,400
8fc260e0bd4440465efef2a2d94dceb816c75d00
[server] Fix up asset fetching on prod
[ { "change_type": "MODIFY", "old_path": "server/src/responders/website-responders.js", "new_path": "server/src/responders/website-responders.js", "diff": "@@ -50,20 +50,32 @@ const { renderToString } = ReactDOMServer;\nconst { Provider } = ReactRedux;\nconst { reducer } = ReduxSetup;\n-let jsURL, fontsURL, cssInclude;\n+type AssetInfo = {| jsURL: string, fontsURL: string, cssInclude: string |};\n+let assetInfo: ?AssetInfo = null;\n+async function getAssetInfo() {\n+ if (assetInfo) {\n+ return assetInfo;\n+ }\nif (process.env.NODE_ENV === \"dev\") {\n- jsURL = \"http://localhost:8080/dev.build.js\";\n- fontsURL = \"fonts/local-fonts.css\";\n- cssInclude = \"\";\n-} else {\n- const assets = import('../../compiled/assets');\n- jsURL = `compiled/${assets.browser.js}`;\n- fontsURL = \"https://fonts.googleapis.com/css?family=Open+Sans:300,600%7CAnaheim\";\n- cssInclude = html`<link\n+ assetInfo = {\n+ jsURL: \"http://localhost:8080/dev.build.js\",\n+ fontsURL: \"fonts/local-fonts.css\",\n+ cssInclude: \"\",\n+ };\n+ return assetInfo;\n+ }\n+ // $FlowFixMe compiled/assets.json doesn't always exist\n+ const { default: assets } = await import('../../compiled/assets');\n+ assetInfo = {\n+ jsURL: `compiled/${assets.browser.js}`,\n+ fontsURL: \"https://fonts.googleapis.com/css?family=Open+Sans:300,600%7CAnaheim\",\n+ cssInclude: html`<link\nrel=\"stylesheet\"\ntype=\"text/css\"\nhref=\"compiled/${assets.browser.css}\"\n- />`;\n+ />`,\n+ };\n+ return assetInfo;\n}\nasync function websiteResponder(viewer: Viewer, url: string): Promise<string> {\n@@ -91,6 +103,7 @@ async function websiteResponder(viewer: Viewer, url: string): Promise<string> {\n{ rawEntryInfos, userInfos: entryUserInfos },\n{ rawMessageInfos, truncationStatuses, userInfos: messageUserInfos },\nverificationResult,\n+ { jsURL, fontsURL, cssInclude },\n] = await Promise.all([\nfetchThreadInfos(viewer),\nfetchCurrentUserInfo(viewer),\n@@ -101,6 +114,7 @@ async function websiteResponder(viewer: Viewer, url: string): Promise<string> {\ndefaultNumberPerThread,\n),\nhandleVerificationRequest(viewer, navInfo.verify),\n+ getAssetInfo(),\nviewer.loggedIn ? setNewSession(viewer, calendarQuery, initialTime) : null,\n]);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Fix up asset fetching on prod
129,187
03.10.2019 23:44:33
14,400
76d9fef76793ddc81f565f2e914247b7749bfade
Use user agent on server to detect browser for SSR
[ { "change_type": "MODIFY", "old_path": "server/src/responders/website-responders.js", "new_path": "server/src/responders/website-responders.js", "diff": "@@ -185,6 +185,7 @@ async function websiteResponder(viewer: Viewer, url: string): Promise<string> {\nforeground: true,\nnextLocalID: 0,\ntimeZone: viewer.timeZone,\n+ userAgent: viewer.userAgent,\n}: AppState),\n);\nconst routerContext = {};\n@@ -204,7 +205,7 @@ async function websiteResponder(viewer: Viewer, url: string): Promise<string> {\n}\nconst state = store.getState();\n- const filteredState = { ...state, timeZone: null };\n+ const filteredState = { ...state, timeZone: null, userAgent: null };\nconst stringifiedState =\nJSON.stringify(filteredState).replace(/</g, '\\\\u003c');\n" }, { "change_type": "MODIFY", "old_path": "server/src/session/cookies.js", "new_path": "server/src/session/cookies.js", "diff": "@@ -50,6 +50,7 @@ type SessionParameterInfo = {|\nsessionID: ?string,\nsessionIdentifierType: SessionIdentifierType,\nipAddress: string,\n+ userAgent: ?string,\n|};\ntype FetchViewerResult =\n@@ -154,6 +155,7 @@ async function fetchUserViewer(\nsessionInfo,\nisScriptViewer: false,\nipAddress: sessionParameterInfo.ipAddress,\n+ userAgent: sessionParameterInfo.userAgent,\n});\nreturn { type: \"valid\", viewer };\n}\n@@ -237,6 +239,7 @@ async function fetchAnonymousViewer(\nsessionInfo,\nisScriptViewer: false,\nipAddress: sessionParameterInfo.ipAddress,\n+ userAgent: sessionParameterInfo.userAgent,\n});\nreturn { type: \"valid\", viewer };\n}\n@@ -366,7 +369,13 @@ function getSessionParameterInfoFromRequestBody(\n: sessionIdentifierTypes.COOKIE_ID;\nconst ipAddress = req.get(\"X-Forwarded-For\");\ninvariant(ipAddress, \"X-Forwarded-For header missing\");\n- return { isSocket: false, sessionID, sessionIdentifierType, ipAddress };\n+ return {\n+ isSocket: false,\n+ sessionID,\n+ sessionIdentifierType,\n+ ipAddress,\n+ userAgent: req.get('User-Agent'),\n+ };\n}\nasync function fetchViewerForJSONRequest(req: $Request): Promise<Viewer> {\n@@ -406,6 +415,7 @@ async function fetchViewerForSocket(\n? sessionIdentifierTypes.BODY_SESSION_ID\n: sessionIdentifierTypes.COOKIE_ID,\nipAddress,\n+ userAgent: req.get('User-Agent'),\n};\nlet result = await fetchViewerFromRequestBody(\n@@ -494,6 +504,7 @@ function createViewerForInvalidFetchViewerResult(\nsessionIdentifierType: result.sessionParameterInfo.sessionIdentifierType,\nisSocket: result.sessionParameterInfo.isSocket,\nipAddress: result.sessionParameterInfo.ipAddress,\n+ userAgent: result.sessionParameterInfo.userAgent,\n});\nviewer.sessionChanged = true;\n@@ -555,10 +566,10 @@ const defaultPlatformDetails = {};\n// The result of this function should not be passed directly to the Viewer\n// constructor. Instead, it should be passed to viewer.setNewCookie. There are\n// several fields on AnonymousViewerData that are not set by this function:\n-// sessionIdentifierType, cookieSource, and ipAddress. These parameters all\n-// depend on the initial request. If the result of this function is passed to\n-// the Viewer constructor directly, the resultant Viewer object will throw\n-// whenever anybody attempts to access the relevant properties.\n+// sessionIdentifierType, cookieSource, ipAddress, and userAgent. These\n+// parameters all depend on the initial request. If the result of this function\n+// is passed to the Viewer constructor directly, the resultant Viewer object\n+// will throw whenever anybody attempts to access the relevant properties.\nasync function createNewAnonymousCookie(\nparams: CookieCreationParams,\n): Promise<AnonymousViewerData> {\n" }, { "change_type": "MODIFY", "old_path": "server/src/session/viewer.js", "new_path": "server/src/session/viewer.js", "diff": "@@ -30,6 +30,7 @@ export type UserViewerData = {|\n+isScriptViewer: bool,\n+isSocket?: bool,\n+ipAddress?: string,\n+ +userAgent?: ?string,\n|};\nexport type AnonymousViewerData = {|\n@@ -47,6 +48,7 @@ export type AnonymousViewerData = {|\n+isScriptViewer: bool,\n+isSocket?: bool,\n+ipAddress?: string,\n+ +userAgent?: ?string,\n|};\ntype SessionInfo = {|\n@@ -117,6 +119,14 @@ class Viewer {\n} else {\nthis.cachedTimeZone = undefined;\n}\n+ if (data.userAgent === null || data.userAgent === undefined) {\n+ if (data.loggedIn) {\n+ data = { ...data, userAgent: this.userAgent };\n+ } else {\n+ // This is a separate condition because of Flow\n+ data = { ...data, userAgent: this.userAgent };\n+ }\n+ }\nthis.data = data;\nthis.sessionChanged = true;\n@@ -307,6 +317,10 @@ class Viewer {\nreturn this.data.ipAddress;\n}\n+ get userAgent(): ?string {\n+ return this.data.userAgent;\n+ }\n+\nget timeZone(): ?string {\nif (this.cachedTimeZone === undefined) {\nconst geoData = geoip.lookup(this.ipAddress);\n" }, { "change_type": "MODIFY", "old_path": "web/chat/chat-message-list.react.js", "new_path": "web/chat/chat-message-list.react.js", "diff": "@@ -50,9 +50,6 @@ import LoadingIndicator from '../loading-indicator.react';\nimport MessageTimestampTooltip from './message-timestamp-tooltip.react';\nimport css from './chat-message-list.css';\n-const browser = detectBrowser();\n-const usingFlexDirectionColumnReverse = browser && browser.name === \"chrome\";\n-\ntype PassedProps = {|\nactiveChatThreadID: ?string,\nchatInputState: ?ChatInputState,\n@@ -62,6 +59,7 @@ type PassedProps = {|\nmessageListData: ?$ReadOnlyArray<ChatMessageItem>,\nstartReached: bool,\ntimeZone: ?string,\n+ usingFlexDirectionColumnReverse: bool,\n// Redux dispatch functions\ndispatchActionPromise: DispatchActionPromise,\n// async functions that hit server APIs\n@@ -94,6 +92,7 @@ class ChatMessageList extends React.PureComponent<Props, State> {\nmessageListData: PropTypes.arrayOf(chatMessageItemPropType),\nstartReached: PropTypes.bool.isRequired,\ntimeZone: PropTypes.string,\n+ usingFlexDirectionColumnReverse: PropTypes.bool.isRequired,\ndispatchActionPromise: PropTypes.func.isRequired,\nfetchMessagesBeforeCursor: PropTypes.func.isRequired,\nfetchMostRecentMessages: PropTypes.func.isRequired,\n@@ -127,7 +126,7 @@ class ChatMessageList extends React.PureComponent<Props, State> {\n}\ngetSnapshotBeforeUpdate(prevProps: Props): ?number {\n- if (usingFlexDirectionColumnReverse) {\n+ if (this.props.usingFlexDirectionColumnReverse) {\nreturn null;\n}\n@@ -301,7 +300,7 @@ class ChatMessageList extends React.PureComponent<Props, State> {\n);\nlet content;\n- if (!usingFlexDirectionColumnReverse) {\n+ if (!this.props.usingFlexDirectionColumnReverse) {\ncontent = (\n<div\nclassName={css.invertedMessageContainer}\n@@ -417,6 +416,9 @@ registerFetchKey(fetchMostRecentMessagesActionTypes);\nconst ReduxConnectedChatMessageList = connect(\n(state: AppState, ownProps: { activeChatThreadID: ?string }) => {\nconst { activeChatThreadID } = ownProps;\n+ const browser = detectBrowser(state.userAgent);\n+ const usingFlexDirectionColumnReverse =\n+ browser && browser.name === \"chrome\";\nreturn {\nthreadInfo: activeChatThreadID\n? threadInfoSelector(state)[activeChatThreadID]\n@@ -425,6 +427,7 @@ const ReduxConnectedChatMessageList = connect(\nstartReached: !!(activeChatThreadID &&\nstate.messageStore.threads[activeChatThreadID].startReached),\ntimeZone: state.timeZone,\n+ usingFlexDirectionColumnReverse,\n};\n},\n{ fetchMessagesBeforeCursor, fetchMostRecentMessages },\n" }, { "change_type": "MODIFY", "old_path": "web/redux-setup.js", "new_path": "web/redux-setup.js", "diff": "@@ -63,6 +63,7 @@ export type AppState = {|\nforeground: bool,\nnextLocalID: number,\ntimeZone: ?string,\n+ userAgent: ?string,\n|};\nexport const updateNavInfoActionType = \"UPDATE_NAV_INFO\";\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Use user agent on server to detect browser for SSR
129,187
03.10.2019 23:46:03
14,400
fd6b5c7a63bb705562517bdcbd9852b667601654
[web] Move ReactDnD to App So that it's included in SSR
[ { "change_type": "MODIFY", "old_path": "web/app.react.js", "new_path": "web/app.react.js", "diff": "@@ -19,6 +19,8 @@ import faCalendar from '@fortawesome/fontawesome-free-solid/faCalendar';\nimport faChat from '@fortawesome/fontawesome-free-solid/faComments';\nimport classNames from 'classnames';\nimport fontawesome from '@fortawesome/fontawesome';\n+import HTML5Backend from 'react-dnd-html5-backend';\n+import { DragDropContext } from 'react-dnd';\nimport { getDate } from 'lib/utils/date-utils';\nimport {\n@@ -375,4 +377,4 @@ export default connect(\n},\nnull,\ntrue,\n-)(App);\n+)(DragDropContext(HTML5Backend)(App));\n" }, { "change_type": "MODIFY", "old_path": "web/root.js", "new_path": "web/root.js", "diff": "@@ -9,8 +9,6 @@ import thunk from 'redux-thunk';\nimport {\ncomposeWithDevTools,\n} from 'redux-devtools-extension/logOnlyInProduction';\n-import HTML5Backend from 'react-dnd-html5-backend';\n-import { DragDropContext } from 'react-dnd';\nimport { reduxLoggerMiddleware } from 'lib/utils/redux-logger';\n@@ -26,11 +24,9 @@ const store: Store<AppState, Action> = createStore(\n),\n);\n-const ReactDnDConnectedRoot = DragDropContext(HTML5Backend)(HotRoot);\n-\nconst RootProvider = () => (\n<Provider store={store}>\n- <ReactDnDConnectedRoot />\n+ <HotRoot />\n</Provider>\n);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Move ReactDnD to App So that it's included in SSR
129,187
04.10.2019 00:18:07
14,400
a248535a9e53d960147efd89f3fcf78af0511379
Set all workspace package.json types to "module"
[ { "change_type": "MODIFY", "old_path": "lib/package.json", "new_path": "lib/package.json", "diff": "{\n\"name\": \"lib\",\n\"version\": \"0.0.1\",\n+ \"type\": \"module\",\n\"devDependencies\": {\n\"flow-bin\": \"^0.98.0\"\n},\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "{\n\"name\": \"native\",\n\"version\": \"0.0.1\",\n+ \"type\": \"module\",\n\"private\": true,\n\"scripts\": {\n\"postinstall\": \"node link-workspaces.js && cd ../ && patch-package && npx flow-mono create-symlinks native/.flowconfig && cd native && npx jetify\",\n" }, { "change_type": "MODIFY", "old_path": "server/package.json", "new_path": "server/package.json", "diff": "{\n\"name\": \"server\",\n\"version\": \"0.0.1\",\n+ \"type\": \"module\",\n\"description\": \"\",\n\"main\": \"dist/server\",\n\"scripts\": {\n" }, { "change_type": "MODIFY", "old_path": "web/package.json", "new_path": "web/package.json", "diff": "{\n\"name\": \"web\",\n\"version\": \"0.0.1\",\n+ \"type\": \"module\",\n\"devDependencies\": {\n\"@babel/core\": \"^7.2.2\",\n\"@babel/plugin-proposal-class-properties\": \"^7.2.3\",\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Set all workspace package.json types to "module"
129,187
04.10.2019 00:19:41
14,400
1521eb6a8acaac63a5fc6ff004c73dd607881d9a
app.build -> app.build.js
[ { "change_type": "MODIFY", "old_path": "server/.flowconfig", "new_path": "server/.flowconfig", "diff": "[options]\nmodule.file_ext=.js\nmodule.file_ext=.json\n-module.file_ext=.build\n[lints]\nsketchy-null-number=warn\n" }, { "change_type": "MODIFY", "old_path": "server/loader.mjs", "new_path": "server/loader.mjs", "diff": "@@ -39,7 +39,7 @@ export async function resolve(\n// Hitting web/dist/app.build from server\nif (specifier === 'web/dist/app.build') {\nconst [ rootURL ] = parentModuleURL.split(\"/squadcal/\");\n- const resultURL = `${rootURL}/squadcal/server/dist/web/dist/app.build`;\n+ const resultURL = `${rootURL}/squadcal/server/dist/web/dist/app.build.js`;\n//console.log(`${specifier} -> ${resultURL} is server -> web`);\nreturn {\nurl: resultURL,\n" }, { "change_type": "MODIFY", "old_path": "server/package.json", "new_path": "server/package.json", "diff": "\"description\": \"\",\n\"main\": \"dist/server\",\n\"scripts\": {\n- \"babel\": \"babel src/ --out-dir dist/ --config-file ./.babelrc --verbose --ignore 'src/lib/flow-typed','src/lib/node_modules','src/lib/package.json','src/web/flow-typed','src/web/node_modules','src/web/package.json','src/web/dist/hot','src/web/dist/dev.build.js','src/web/dist/*.build.js','src/web/webpack.config.js','src/web/account-bar.react.js','src/web/app.react.js','src/web/calendar','src/web/chat','src/web/flow','src/web/loading-indicator.react.js','src/web/modals','src/web/root.js','src/web/router-history.js','src/web/script.js','src/web/selectors/chat-selectors.js','src/web/selectors/entry-selectors.js','src/web/splash','src/web/vector-utils.js','src/web/vectors.react.js'\",\n- \"rsync\": \"rsync -rLpmuv --exclude '*/package.json' --exclude '*/node_modules/*' --exclude '*/hot/*' --include '*.json' --include '*.build' --exclude '*.*' src/ dist/\",\n+ \"babel\": \"babel src/ --out-dir dist/ --config-file ./.babelrc --verbose --ignore 'src/lib/flow-typed','src/lib/node_modules','src/lib/package.json','src/web/flow-typed','src/web/node_modules','src/web/package.json','src/web/dist/*.build.js','src/web/webpack.config.js','src/web/account-bar.react.js','src/web/app.react.js','src/web/calendar','src/web/chat','src/web/flow','src/web/loading-indicator.react.js','src/web/modals','src/web/root.js','src/web/router-history.js','src/web/script.js','src/web/selectors/chat-selectors.js','src/web/selectors/entry-selectors.js','src/web/splash','src/web/vector-utils.js','src/web/vectors.react.js'\",\n+ \"rsync\": \"rsync -rLpmuv --exclude '*/package.json' --exclude '*/node_modules/*' --include '*.json' --include 'app.build.js' --exclude '*.*' src/ dist/\",\n\"prod-build\": \"npm run babel && npm run rsync && npm run update-geoip\",\n\"update-geoip\": \"cd ../node_modules/geoip-lite && npm run updatedb\",\n\"prod\": \"node --experimental-modules --loader ./loader.mjs dist/server\",\n" }, { "change_type": "MODIFY", "old_path": "web/webpack.config.js", "new_path": "web/webpack.config.js", "diff": "@@ -244,7 +244,7 @@ module.exports = function(env) {\nserver: [ './server-rendering.js', './app.react.js' ],\n},\noutput: {\n- filename: 'app.build',\n+ filename: 'app.build.js',\nlibrary: 'app',\nlibraryTarget: 'commonjs2',\npath: path.join(__dirname, 'dist'),\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
app.build -> app.build.js
129,187
04.10.2019 00:56:37
14,400
f93d9134e1f5a9153e02171ffb33980f31ea1084
[native] Re-add libdef Needed because `react-navigation-redux-helpers` had to move back to importing from there to maintain web compatibility
[ { "change_type": "ADD", "old_path": null, "new_path": "native/flow-typed/npm/@react-navigation/core_v3.x.x.js", "diff": "+// flow-typed signature: 0c3d632e4f2f81ae39d42e771b493d79\n+// flow-typed version: 536c492332/@react-navigation/core_v3.x.x/flow_>=v0.92.x <=v0.103.x\n+\n+// @flow\n+\n+declare module '@react-navigation/core' {\n+\n+ //---------------------------------------------------------------------------\n+ // SECTION 1: IDENTICAL TYPE DEFINITIONS\n+ // This section is identical across all React Navigation libdefs and contains\n+ // shared definitions. We wish we could make it DRY and import from a shared\n+ // definition, but that isn't yet possible.\n+ //---------------------------------------------------------------------------\n+\n+ /**\n+ * SECTION 1A\n+ * We start with some definitions that we have copy-pasted from React Native\n+ * source files.\n+ */\n+\n+ // This is a bastardization of the true StyleObj type located in\n+ // react-native/Libraries/StyleSheet/StyleSheetTypes. We unfortunately can't\n+ // import that here, and it's too lengthy (and consequently too brittle) to\n+ // copy-paste here either.\n+ declare type StyleObj =\n+ | null\n+ | void\n+ | number\n+ | false\n+ | ''\n+ | $ReadOnlyArray<StyleObj>\n+ | { [name: string]: any };\n+ declare type ViewStyleProp = StyleObj;\n+ declare type TextStyleProp = StyleObj;\n+ declare type AnimatedViewStyleProp = StyleObj;\n+ declare type AnimatedTextStyleProp = StyleObj;\n+\n+ /**\n+ * SECTION 1B\n+ * The following are type declarations for core types necessary for every\n+ * React Navigation libdef.\n+ */\n+\n+ /**\n+ * Navigation State + Action\n+ */\n+\n+ declare export type NavigationParams = {\n+ [key: string]: mixed,\n+ };\n+\n+ declare export type NavigationBackAction = {|\n+ type: 'Navigation/BACK',\n+ key?: ?string,\n+ |};\n+ declare export type NavigationInitAction = {|\n+ type: 'Navigation/INIT',\n+ params?: NavigationParams,\n+ |};\n+ declare export type NavigationNavigateAction = {|\n+ type: 'Navigation/NAVIGATE',\n+ routeName: string,\n+ params?: NavigationParams,\n+\n+ // The action to run inside the sub-router\n+ action?: NavigationNavigateAction,\n+\n+ key?: string,\n+ |};\n+ declare export type NavigationSetParamsAction = {|\n+ type: 'Navigation/SET_PARAMS',\n+\n+ // The key of the route where the params should be set\n+ key: string,\n+\n+ // The new params to merge into the existing route params\n+ params: NavigationParams,\n+ |};\n+\n+ declare export type NavigationPopAction = {|\n+ +type: 'Navigation/POP',\n+ +n?: number,\n+ +immediate?: boolean,\n+ |};\n+ declare export type NavigationPopToTopAction = {|\n+ +type: 'Navigation/POP_TO_TOP',\n+ +immediate?: boolean,\n+ |};\n+ declare export type NavigationPushAction = {|\n+ +type: 'Navigation/PUSH',\n+ +routeName: string,\n+ +params?: NavigationParams,\n+ +action?: NavigationNavigateAction,\n+ +key?: string,\n+ |};\n+ declare export type NavigationResetAction = {|\n+ type: 'Navigation/RESET',\n+ index: number,\n+ key?: ?string,\n+ actions: Array<NavigationNavigateAction>,\n+ |};\n+ declare export type NavigationReplaceAction = {|\n+ +type: 'Navigation/REPLACE',\n+ +key: string,\n+ +routeName: string,\n+ +params?: NavigationParams,\n+ +action?: NavigationNavigateAction,\n+ |};\n+ declare export type NavigationCompleteTransitionAction = {|\n+ +type: 'Navigation/COMPLETE_TRANSITION',\n+ +key?: string,\n+ |};\n+\n+ declare export type NavigationOpenDrawerAction = {|\n+ +type: 'Navigation/OPEN_DRAWER',\n+ +key?: string,\n+ |};\n+ declare export type NavigationCloseDrawerAction = {|\n+ +type: 'Navigation/CLOSE_DRAWER',\n+ +key?: string,\n+ |};\n+ declare export type NavigationToggleDrawerAction = {|\n+ +type: 'Navigation/TOGGLE_DRAWER',\n+ +key?: string,\n+ |};\n+ declare export type NavigationDrawerOpenedAction = {|\n+ +type: 'Navigation/DRAWER_OPENED',\n+ +key?: string,\n+ |};\n+ declare export type NavigationDrawerClosedAction = {|\n+ +type: 'Navigation/DRAWER_CLOSED',\n+ +key?: string,\n+ |};\n+\n+ declare export type NavigationJumpToAction = {|\n+ +type: 'Navigation/JUMP_TO';\n+ +preserveFocus: boolean,\n+ +routeName: string,\n+ +key?: string,\n+ +params?: NavigationParams,\n+ |};\n+\n+ declare export type NavigationAction =\n+ | NavigationBackAction\n+ | NavigationInitAction\n+ | NavigationNavigateAction\n+ | NavigationSetParamsAction\n+ | NavigationPopAction\n+ | NavigationPopToTopAction\n+ | NavigationPushAction\n+ | NavigationResetAction\n+ | NavigationReplaceAction\n+ | NavigationCompleteTransitionAction\n+ | NavigationOpenDrawerAction\n+ | NavigationCloseDrawerAction\n+ | NavigationToggleDrawerAction\n+ | NavigationDrawerOpenedAction\n+ | NavigationDrawerClosedAction\n+ | NavigationJumpToAction;\n+\n+ /**\n+ * NavigationState is a tree of routes for a single navigator, where each\n+ * child route may either be a NavigationScreenRoute or a\n+ * NavigationRouterRoute. NavigationScreenRoute represents a leaf screen,\n+ * while the NavigationRouterRoute represents the state of a child navigator.\n+ *\n+ * NOTE: NavigationState is a state tree local to a single navigator and\n+ * its child navigators (via the routes field).\n+ * If we're in navigator nested deep inside the app, the state will only be\n+ * the state for that navigator.\n+ * The state for the root navigator of our app represents the whole navigation\n+ * state for the whole app.\n+ */\n+ declare export type NavigationState = {\n+ /**\n+ * Index refers to the active child route in the routes array.\n+ */\n+ index: number,\n+ routes: Array<NavigationRoute>,\n+ isTransitioning?: bool,\n+ };\n+\n+ declare export type NavigationRoute =\n+ | NavigationLeafRoute\n+ | NavigationStateRoute;\n+\n+ declare export type NavigationLeafRoute = {|\n+ /**\n+ * React's key used by some navigators. No need to specify these manually,\n+ * they will be defined by the router.\n+ */\n+ key: string,\n+ /**\n+ * For example 'Home'.\n+ * This is used as a key in a route config when creating a navigator.\n+ */\n+ routeName: string,\n+ /**\n+ * Path is an advanced feature used for deep linking and on the web.\n+ */\n+ path?: string,\n+ /**\n+ * Params passed to this route when navigating to it,\n+ * e.g. `{ car_id: 123 }` in a route that displays a car.\n+ */\n+ params?: NavigationParams,\n+ |};\n+\n+ declare export type NavigationStateRoute = {|\n+ ...NavigationLeafRoute,\n+ ...$Exact<NavigationState>,\n+ |};\n+\n+ /**\n+ * Router\n+ */\n+\n+ declare export type NavigationScreenProps = { [key: string]: mixed };\n+\n+ declare export type NavigationScreenOptionsGetter<Options: {}> = (\n+ navigation: NavigationScreenProp<NavigationRoute>,\n+ screenProps: ?NavigationScreenProps,\n+ theme: SupportedThemes,\n+ ) => Options;\n+\n+ declare export type NavigationRouter<State: NavigationState, Options: {}> = {\n+ /**\n+ * The reducer that outputs the new navigation state for a given action,\n+ * with an optional previous state. When the action is considered handled\n+ * but the state is unchanged, the output state is null.\n+ */\n+ getStateForAction: (action: NavigationAction, lastState: ?State) => ?State,\n+\n+ /**\n+ * Maps a URI-like string to an action. This can be mapped to a state\n+ * using `getStateForAction`.\n+ */\n+ getActionForPathAndParams: (\n+ path: string,\n+ params?: NavigationParams\n+ ) => ?NavigationAction,\n+\n+ getPathAndParamsForState: (\n+ state: State\n+ ) => {\n+ path: string,\n+ params?: NavigationParams,\n+ },\n+\n+ getComponentForRouteName: (routeName: string) => NavigationComponent,\n+\n+ getComponentForState: (state: State) => NavigationComponent,\n+\n+ /**\n+ * Gets the screen navigation options for a given screen.\n+ *\n+ * For example, we could get the config for the 'Foo' screen when the\n+ * `navigation.state` is:\n+ *\n+ * {routeName: 'Foo', key: '123'}\n+ */\n+ getScreenOptions: NavigationScreenOptionsGetter<Options>,\n+ };\n+\n+ declare export type NavigationScreenOptions = {\n+ title?: string,\n+ };\n+\n+ declare export type SupportedThemes = 'light' | 'dark';\n+\n+ declare export type NavigationScreenConfigProps = $Shape<{\n+ navigation: NavigationScreenProp<NavigationRoute>,\n+ screenProps: NavigationScreenProps,\n+ theme: SupportedThemes,\n+ }>;\n+\n+ declare export type NavigationScreenConfig<Options> =\n+ | Options\n+ | (({\n+ ...$Exact<NavigationScreenConfigProps>,\n+ navigationOptions: Options,\n+ }) => Options);\n+\n+ declare export type NavigationComponent =\n+ | NavigationScreenComponent<NavigationRoute, *, *>\n+ | NavigationNavigator<*, *, *>;\n+\n+ declare interface withOptionalNavigationOptions<Options> {\n+ navigationOptions?: NavigationScreenConfig<Options>;\n+ }\n+\n+ declare export type NavigationScreenComponent<\n+ Route: NavigationRoute,\n+ Options: {},\n+ Props: NavigationNavigatorProps<Options, Route>,\n+ > = React$ComponentType<Props> &\n+ withOptionalNavigationOptions<Options>;\n+\n+ declare interface withRouter<State, Options> {\n+ router: NavigationRouter<State, Options>;\n+ }\n+\n+ declare export type NavigationNavigator<\n+ State: NavigationState,\n+ Options: {},\n+ Props: NavigationNavigatorProps<Options, State>,\n+ > = React$ComponentType<Props> &\n+ withRouter<State, Options> &\n+ withOptionalNavigationOptions<Options>;\n+\n+ declare type _NavigationRouteConfigCore = {|\n+ navigationOptions?: NavigationScreenConfig<*>,\n+ params?: NavigationParams,\n+ path?: string,\n+ |};\n+ declare export type NavigationRouteConfig =\n+ | NavigationComponent\n+ | {| ..._NavigationRouteConfigCore, screen: NavigationComponent |}\n+ | {| ..._NavigationRouteConfigCore, getScreen: () => NavigationComponent |};\n+\n+ declare export type NavigationRouteConfigMap = {\n+ [routeName: string]: NavigationRouteConfig,\n+ };\n+\n+ /**\n+ * Navigator Prop\n+ */\n+\n+ declare export type NavigationDispatch = (\n+ action: NavigationAction\n+ ) => boolean;\n+\n+ declare export type EventType =\n+ | 'willFocus'\n+ | 'didFocus'\n+ | 'willBlur'\n+ | 'didBlur'\n+ | 'action';\n+\n+ declare export type NavigationEventPayload = {\n+ type: EventType,\n+ action: NavigationAction,\n+ state: NavigationState,\n+ lastState: ?NavigationState,\n+ };\n+\n+ declare export type NavigationEventCallback = (\n+ payload: NavigationEventPayload\n+ ) => void;\n+\n+ declare export type NavigationEventSubscription = {\n+ remove: () => void,\n+ };\n+\n+ declare export type NavigationScreenProp<+S> = {\n+ +state: S,\n+ dispatch: NavigationDispatch,\n+ addListener: (\n+ eventName: string,\n+ callback: NavigationEventCallback\n+ ) => NavigationEventSubscription,\n+ getParam: <ParamName: string>(\n+ paramName: ParamName,\n+ fallback?: $ElementType<\n+ $PropertyType<\n+ {|\n+ ...{| params: { } |},\n+ ...$Exact<S>,\n+ |},\n+ 'params'\n+ >,\n+ ParamName\n+ >\n+ ) => $ElementType<\n+ $PropertyType<\n+ {|\n+ ...{| params: { } |},\n+ ...$Exact<S>,\n+ |},\n+ 'params'\n+ >,\n+ ParamName\n+ >,\n+ dangerouslyGetParent: () => ?NavigationScreenProp<NavigationState>,\n+ isFocused: () => boolean,\n+ goBack: (routeKey?: ?string) => boolean,\n+ dismiss: () => boolean,\n+ navigate: (\n+ routeName:\n+ | string\n+ | {\n+ routeName: string,\n+ params?: NavigationParams,\n+ action?: NavigationNavigateAction,\n+ key?: string,\n+ },\n+ params?: NavigationParams,\n+ action?: NavigationNavigateAction\n+ ) => boolean,\n+ setParams: (newParams: NavigationParams) => boolean,\n+ };\n+\n+ declare export type NavigationNavigatorProps<O: {}, S: {}> = $Shape<{\n+ navigation: NavigationScreenProp<S>,\n+ screenProps?: NavigationScreenProps,\n+ navigationOptions?: O,\n+ theme?: SupportedThemes | 'no-preference',\n+ detached?: boolean,\n+ }>;\n+\n+ /**\n+ * Navigation container\n+ */\n+\n+ declare export type NavigationContainer<\n+ State: NavigationState,\n+ Options: {},\n+ Props: NavigationContainerProps<Options, State>,\n+ > = React$ComponentType<Props> &\n+ withRouter<State, Options> &\n+ withOptionalNavigationOptions<Options>;\n+\n+ declare export type NavigationContainerProps<S: {}, O: {}> = $Shape<{\n+ uriPrefix?: string | RegExp,\n+ onNavigationStateChange?: ?(\n+ NavigationState,\n+ NavigationState,\n+ NavigationAction\n+ ) => void,\n+ navigation?: NavigationScreenProp<S>,\n+ persistenceKey?: ?string,\n+ renderLoadingExperimental?: React$ComponentType<{}>,\n+ screenProps?: NavigationScreenProps,\n+ navigationOptions?: O,\n+ }>;\n+\n+ /**\n+ * NavigationDescriptor\n+ */\n+\n+ declare export type NavigationDescriptor = {\n+ key: string,\n+ state: NavigationRoute,\n+ navigation: NavigationScreenProp<NavigationRoute>,\n+ getComponent: () => NavigationComponent,\n+ };\n+\n+ //---------------------------------------------------------------------------\n+ // SECTION 2: SHARED TYPE DEFINITIONS\n+ // This section too is copy-pasted, but it's not identical across all React\n+ // Navigation libdefs. We pick out bits and pieces that we need.\n+ //---------------------------------------------------------------------------\n+\n+ /**\n+ * SECTION 2A\n+ * We start with definitions we have copy-pasted, either from in-package\n+ * types, other Flow libdefs, or from TypeScript types somewhere.\n+ */\n+\n+ // This is copied from\n+ // react-native/Libraries/Animated/src/nodes/AnimatedInterpolation.js\n+ declare type ExtrapolateType = 'extend' | 'identity' | 'clamp';\n+ declare type InterpolationConfigType = {\n+ inputRange: Array<number>,\n+ outputRange: Array<number> | Array<string>,\n+ easing?: (input: number) => number,\n+ extrapolate?: ExtrapolateType,\n+ extrapolateLeft?: ExtrapolateType,\n+ extrapolateRight?: ExtrapolateType,\n+ };\n+ declare class AnimatedInterpolation {\n+ interpolate(config: InterpolationConfigType): AnimatedInterpolation;\n+ }\n+\n+ // This is copied from\n+ // react-native/Libraries/Animated/src/animations/Animation.js\n+ declare type EndResult = { finished: boolean };\n+ declare type EndCallback = (result: EndResult) => void;\n+ declare class Animation {\n+ start(\n+ fromValue: number,\n+ onUpdate: (value: number) => void,\n+ onEnd: ?EndCallback,\n+ previousAnimation: ?Animation,\n+ animatedValue: AnimatedValue,\n+ ): void;\n+ stop(): void;\n+ }\n+\n+ // This is vaguely copied from\n+ // react-native/Libraries/Animated/src/nodes/AnimatedTracking.js\n+ declare class AnimatedTracking {\n+ constructor(\n+ value: AnimatedValue,\n+ parent: any,\n+ animationClass: any,\n+ animationConfig: Object,\n+ callback?: ?EndCallback,\n+ ): void;\n+ update(): void;\n+ }\n+\n+ // This is vaguely copied from\n+ // react-native/Libraries/Animated/src/nodes/AnimatedValue.js\n+ declare type ValueListenerCallback = (state: { value: number }) => void;\n+ declare class AnimatedValue {\n+ constructor(value: number): void;\n+ setValue(value: number): void;\n+ setOffset(offset: number): void;\n+ flattenOffset(): void;\n+ extractOffset(): void;\n+ addListener(callback: ValueListenerCallback): string;\n+ removeListener(id: string): void;\n+ removeAllListeners(): void;\n+ stopAnimation(callback?: ?(value: number) => void): void;\n+ resetAnimation(callback?: ?(value: number) => void): void;\n+ interpolate(config: InterpolationConfigType): AnimatedInterpolation;\n+ animate(animation: Animation, callback: ?EndCallback): void;\n+ stopTracking(): void;\n+ track(tracking: AnimatedTracking): void;\n+ }\n+\n+ /**\n+ * SECTION 2B\n+ * The following are the actually useful definitions in Section 2, that are\n+ * used below in section 3, but also in other libdefs.\n+ */\n+\n+ declare export type NavigationPathsConfig = {\n+ [routeName: string]: string,\n+ };\n+\n+ /**\n+ * SafeAreaView\n+ */\n+\n+ declare type _SafeAreaViewForceInsetValue = 'always' | 'never' | number;\n+ declare type _SafeAreaViewInsets = $Shape<{\n+ top: _SafeAreaViewForceInsetValue,\n+ bottom: _SafeAreaViewForceInsetValue,\n+ left: _SafeAreaViewForceInsetValue,\n+ right: _SafeAreaViewForceInsetValue,\n+ vertical: _SafeAreaViewForceInsetValue,\n+ horizontal: _SafeAreaViewForceInsetValue,\n+ }>;\n+\n+ /**\n+ * Interpolation\n+ */\n+\n+ declare export type NavigationStackInterpolatorProps = $Shape<{\n+ layout: NavigationStackLayout,\n+ scene: NavigationStackScene,\n+ scenes: NavigationStackScene[],\n+ position: AnimatedInterpolation,\n+ navigation: NavigationStackProp<NavigationState>,\n+ mode?: HeaderMode,\n+ shadowEnabled?: boolean,\n+ cardOverlayEnabled?: boolean,\n+ }>;\n+\n+ declare type _InterpolationResult = { [key: string]: mixed };\n+ declare export type NavigationStackInterpolator =\n+ (props: NavigationStackInterpolatorProps) => _InterpolationResult;\n+\n+ /**\n+ * Header\n+ */\n+\n+ declare export type HeaderMode = 'float' | 'screen' | 'none';\n+\n+ declare export type HeaderProps = {\n+ layout: NavigationStackLayout,\n+ scene: NavigationStackScene,\n+ scenes: NavigationStackScene[],\n+ position: AnimatedInterpolation,\n+ navigation: NavigationStackProp<NavigationState>,\n+ mode: HeaderMode,\n+ leftInterpolator?: NavigationStackInterpolator,\n+ titleInterpolator?: NavigationStackInterpolator,\n+ rightInterpolator?: NavigationStackInterpolator,\n+ backgroundInterpolator?: NavigationStackInterpolator,\n+ layoutPreset: 'left' | 'center',\n+ transitionPreset?: 'fade-in-place' | 'uikit',\n+ backTitleVisible?: boolean,\n+ isLandscape: boolean,\n+ };\n+\n+ /**\n+ * StackRouter\n+ */\n+\n+ declare export type NavigationStackProp<+S> =\n+ & NavigationScreenProp<S>\n+ & {\n+ pop: (n?: number, params?: { immediate?: boolean }) => boolean,\n+ popToTop: (params?: { immediate?: boolean }) => boolean,\n+ push: (\n+ routeName: string,\n+ params?: NavigationParams,\n+ action?: NavigationNavigateAction\n+ ) => boolean,\n+ replace: (\n+ routeName: string,\n+ params?: NavigationParams,\n+ action?: NavigationNavigateAction\n+ ) => boolean,\n+ reset: (actions: NavigationAction[], index: number) => boolean,\n+ };\n+\n+ declare type _HeaderBackButtonProps = {\n+ disabled?: boolean,\n+ onPress: () => void,\n+ pressColorAndroid?: string,\n+ tintColor?: ?string,\n+ backImage?: React$ComponentType<{ tintColor: string, title?: ?string }>,\n+ title?: ?string,\n+ truncatedTitle?: ?string,\n+ backTitleVisible?: boolean,\n+ allowFontScaling?: boolean,\n+ titleStyle?: ?TextStyleProp,\n+ headerLayoutPreset: 'left' | 'center',\n+ width?: ?number,\n+ scene: NavigationStackScene,\n+ };\n+\n+ declare export type NavigationStackScreenOptions = NavigationScreenOptions & {\n+ header?: ?(React$Node | (HeaderProps => React$Node)),\n+ headerTransparent?: boolean,\n+ headerTitle?: (props: { children: ?string }) => React$Node | React$Node,\n+ headerTitleStyle?: AnimatedTextStyleProp,\n+ headerTitleAllowFontScaling?: boolean,\n+ headerTintColor?: string,\n+ headerLeft?: ((props: _HeaderBackButtonProps) => React$Node) | React$Node,\n+ headerBackTitle?: string,\n+ headerBackImage?: (props: {|\n+ tintColor?: string,\n+ title?: ?string,\n+ |}) => React$Node,\n+ headerTruncatedBackTitle?: string,\n+ headerBackTitleStyle?: TextStyleProp,\n+ headerPressColorAndroid?: string,\n+ headerRight?: React$Node,\n+ headerStyle?: ViewStyleProp,\n+ headerForceInset?: _SafeAreaViewInsets,\n+ headerBackground?: React$Node | React$ElementType,\n+ gesturesEnabled?: boolean,\n+ gestureResponseDistance?: { vertical?: number, horizontal?: number },\n+ gestureDirection?: 'default' | 'inverted',\n+ };\n+\n+ declare export type NavigationStackRouterConfig = {|\n+ initialRouteName?: string,\n+ initialRouteParams?: NavigationParams,\n+ paths?: NavigationPathsConfig,\n+ navigationOptions?: NavigationScreenConfig<*>,\n+ defaultNavigationOptions?: NavigationScreenConfig<*>,\n+ initialRouteKey?: string,\n+ |};\n+\n+ /**\n+ * Stack Gestures, Animations, and Interpolators\n+ */\n+\n+ declare export type NavigationStackLayout = {\n+ height: AnimatedValue,\n+ initHeight: number,\n+ initWidth: number,\n+ isMeasured: boolean,\n+ width: AnimatedValue,\n+ };\n+\n+ declare export type NavigationStackScene = {\n+ index: number,\n+ isActive: boolean,\n+ isStale: boolean,\n+ key: string,\n+ route: NavigationRoute,\n+ descriptor: ?NavigationDescriptor,\n+ };\n+\n+ /**\n+ * SwitchRouter\n+ */\n+\n+ declare export type NavigationSwitchRouterConfig = {|\n+ initialRouteName?: string,\n+ initialRouteParams?: NavigationParams,\n+ paths?: NavigationPathsConfig,\n+ navigationOptions?: NavigationScreenConfig<*>,\n+ defaultNavigationOptions?: NavigationScreenConfig<*>,\n+ // todo: type these as the real route names rather than 'string'\n+ order?: string[],\n+ // Does the back button cause the router to switch to the initial tab\n+ backBehavior?: 'none' | 'initialRoute' | 'history' | 'order', // defaults `initialRoute`\n+ resetOnBlur?: boolean,\n+ |};\n+\n+ /**\n+ * TabRouter\n+ */\n+\n+ declare export type NavigationTabProp<+S> =\n+ & NavigationScreenProp<S>\n+ & { jumpTo: (routeName: string, key?: string) => void };\n+\n+ declare export type NavigationTabRouterConfig = NavigationSwitchRouterConfig;\n+\n+ declare export type NavigationTabScreenOptions = {|\n+ ...$Exact<NavigationScreenOptions>,\n+ tabBarLabel?: React$Node,\n+ tabBarVisible?: boolean,\n+ tabBarAccessibilityLabel?: string,\n+ tabBarTestID?: string,\n+ tabBarIcon?:\n+ | React$Node\n+ | ((props: {\n+ focused: boolean;\n+ tintColor?: string;\n+ horizontal?: boolean;\n+ }) => React$Node),\n+ tabBarOnPress?: (props: {\n+ navigation: NavigationTabProp<NavigationRoute>,\n+ defaultHandler: () => void,\n+ }) => void,\n+ tabBarOnLongPress?: (props: {\n+ navigation: NavigationTabProp<NavigationRoute>,\n+ defaultHandler: () => void,\n+ }) => void,\n+ |};\n+\n+ //---------------------------------------------------------------------------\n+ // SECTION 3: UNIQUE TYPE DEFINITIONS\n+ // This section normally contains exported types that are not present in any\n+ // other React Navigation libdef. But the main react-navigation libdef doesn't\n+ // have any, so it's empty here.\n+ //---------------------------------------------------------------------------\n+\n+ //---------------------------------------------------------------------------\n+ // SECTION 4: EXPORTED MODULE\n+ // This is the only section that types exports. Other sections export types,\n+ // but this section types the module's exports.\n+ //---------------------------------------------------------------------------\n+\n+ declare export var StateUtils: {\n+ get: (state: NavigationState, key: string) => ?NavigationRoute,\n+ indexOf: (state: NavigationState, key: string) => number,\n+ has: (state: NavigationState, key: string) => boolean,\n+ push: (state: NavigationState, route: NavigationRoute) => NavigationState,\n+ pop: (state: NavigationState) => NavigationState,\n+ jumpToIndex: (state: NavigationState, index: number) => NavigationState,\n+ jumpTo: (state: NavigationState, key: string) => NavigationState,\n+ back: (state: NavigationState) => NavigationState,\n+ forward: (state: NavigationState) => NavigationState,\n+ replaceAt: (\n+ state: NavigationState,\n+ key: string,\n+ route: NavigationRoute\n+ ) => NavigationState,\n+ replaceAtIndex: (\n+ state: NavigationState,\n+ index: number,\n+ route: NavigationRoute\n+ ) => NavigationState,\n+ reset: (\n+ state: NavigationState,\n+ routes: Array<NavigationRoute>,\n+ index?: number\n+ ) => NavigationState,\n+ };\n+\n+ declare export function getNavigation<State: NavigationState, Options: {}>(\n+ router: NavigationRouter<State, Options>,\n+ state: State,\n+ dispatch: NavigationDispatch,\n+ actionSubscribers: Set<NavigationEventCallback>,\n+ getScreenProps: () => {},\n+ getCurrentNavigation: () => ?NavigationScreenProp<State>\n+ ): NavigationScreenProp<State>;\n+\n+ declare type _NavigationView<O, S, N: NavigationScreenProp<S>> = React$ComponentType<{\n+ descriptors: { [key: string]: NavigationDescriptor },\n+ navigation: N,\n+ navigationConfig: *,\n+ }>;\n+ declare export function createNavigator<O: *, S: *, NavigatorConfig: *, N: NavigationScreenProp<S>>(\n+ view: _NavigationView<O, S, N>,\n+ router: NavigationRouter<S, O>,\n+ navigatorConfig?: NavigatorConfig\n+ ): NavigationNavigator<S, O, *>;\n+\n+ declare export var NavigationContext: React$Context<\n+ ?NavigationScreenProp<NavigationState | NavigationRoute>,\n+ >;\n+ declare export var NavigationProvider: $PropertyType<typeof NavigationContext, 'Provider'>;\n+ declare export var NavigationConsumer: $PropertyType<typeof NavigationContext, 'Consumer'>;\n+\n+ declare type _SwitchNavigatorConfig = NavigationSwitchRouterConfig;\n+ declare export function createSwitchNavigator(\n+ routeConfigs: NavigationRouteConfigMap,\n+ config?: _SwitchNavigatorConfig\n+ ): NavigationNavigator<*, *, *>;\n+\n+ declare export var ThemeContext: React$Context<SupportedThemes>;\n+ declare export var ThemeProvider: $PropertyType<typeof ThemeContext, 'Provider'>;\n+ declare export var ThemeConsumer: $PropertyType<typeof ThemeContext, 'Consumer'>;\n+ declare export var ThemeColors: {| [theme: SupportedThemes]: {| [key: string]: string |} |};\n+ declare export function useTheme(): SupportedThemes;\n+\n+ declare export var NavigationActions: {\n+ BACK: 'Navigation/BACK',\n+ INIT: 'Navigation/INIT',\n+ NAVIGATE: 'Navigation/NAVIGATE',\n+ SET_PARAMS: 'Navigation/SET_PARAMS',\n+\n+ back: (payload?: { key?: ?string }) => NavigationBackAction,\n+ init: (payload?: { params?: NavigationParams }) => NavigationInitAction,\n+ navigate: (payload: {\n+ routeName: string,\n+ params?: ?NavigationParams,\n+ action?: ?NavigationNavigateAction,\n+ key?: string,\n+ }) => NavigationNavigateAction,\n+ setParams: (payload: {\n+ key: string,\n+ params: NavigationParams,\n+ }) => NavigationSetParamsAction,\n+ };\n+\n+ declare export var StackActions: {\n+ POP: 'Navigation/POP',\n+ POP_TO_TOP: 'Navigation/POP_TO_TOP',\n+ PUSH: 'Navigation/PUSH',\n+ RESET: 'Navigation/RESET',\n+ REPLACE: 'Navigation/REPLACE',\n+ COMPLETE_TRANSITION: 'Navigation/COMPLETE_TRANSITION',\n+\n+ pop: (payload: {\n+ n?: number,\n+ immediate?: boolean,\n+ }) => NavigationPopAction,\n+ popToTop: (payload: {\n+ immediate?: boolean,\n+ }) => NavigationPopToTopAction,\n+ push: (payload: {\n+ routeName: string,\n+ params?: NavigationParams,\n+ action?: NavigationNavigateAction,\n+ key?: string,\n+ }) => NavigationPushAction,\n+ reset: (payload: {\n+ index: number,\n+ key?: ?string,\n+ actions: Array<NavigationNavigateAction>,\n+ }) => NavigationResetAction,\n+ replace: (payload: {\n+ key?: string,\n+ routeName: string,\n+ params?: NavigationParams,\n+ action?: NavigationNavigateAction,\n+ }) => NavigationReplaceAction,\n+ completeTransition: (payload: {\n+ key?: string,\n+ }) => NavigationCompleteTransitionAction,\n+ };\n+\n+ declare export var SwitchActions: {\n+ JUMP_TO: 'Navigation/JUMP_TO',\n+\n+ jumpTo: (payload: {\n+ routeName: string,\n+ key?: string,\n+ params?: NavigationParams,\n+ }) => NavigationJumpToAction,\n+ };\n+\n+ declare export function StackRouter(\n+ routeConfigs: NavigationRouteConfigMap,\n+ stackConfig?: NavigationStackRouterConfig\n+ ): NavigationRouter<*, NavigationStackScreenOptions>;\n+\n+ declare export function TabRouter(\n+ routeConfigs: NavigationRouteConfigMap,\n+ config?: NavigationTabRouterConfig\n+ ): NavigationRouter<*, NavigationTabScreenOptions>;\n+\n+ declare export function SwitchRouter(\n+ routeConfigs: NavigationRouteConfigMap,\n+ stackConfig?: NavigationSwitchRouterConfig\n+ ): NavigationRouter<*, {}>;\n+\n+ declare export function getActiveChildNavigationOptions<\n+ State: NavigationState,\n+ Options: {}\n+ >(\n+ navigation: NavigationScreenProp<State>,\n+ screenProps?: NavigationScreenProps,\n+ theme?: SupportedThemes,\n+ ): Options;\n+\n+ declare type _SceneViewProps = {\n+ component: React$ComponentType<{\n+ screenProps: ?NavigationScreenProps,\n+ navigation: NavigationScreenProp<NavigationRoute>,\n+ }>,\n+ screenProps: ?NavigationScreenProps,\n+ navigation: NavigationScreenProp<NavigationRoute>,\n+ };\n+ declare export var SceneView: React$ComponentType<_SceneViewProps>;\n+\n+ declare type _NavigationEventsProps = {\n+ navigation?: NavigationScreenProp<NavigationState>,\n+ onWillFocus?: NavigationEventCallback,\n+ onDidFocus?: NavigationEventCallback,\n+ onWillBlur?: NavigationEventCallback,\n+ onDidBlur?: NavigationEventCallback,\n+ };\n+ declare export var NavigationEvents: React$ComponentType<\n+ _NavigationEventsProps\n+ >;\n+\n+ declare export function withNavigation<Props: {}, ComponentType: React$ComponentType<Props>>(\n+ Component: ComponentType\n+ ): React$ComponentType<\n+ $Diff<\n+ React$ElementConfig<ComponentType>,\n+ {\n+ navigation: NavigationScreenProp<NavigationStateRoute> | void,\n+ }\n+ >\n+ >;\n+ declare export function withNavigationFocus<Props: {}, ComponentType: React$ComponentType<Props>>(\n+ Component: ComponentType\n+ ): React$ComponentType<$Diff<React$ElementConfig<ComponentType>, { isFocused: boolean | void }>>;\n+\n+}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Re-add @react-navigation/core libdef Needed because `react-navigation-redux-helpers` had to move back to importing from there to maintain web compatibility
129,187
04.10.2019 00:57:09
14,400
722818aacee722c50daed3debd0a628ff2a0c257
[server] Significantly simplify loader.mjs
[ { "change_type": "MODIFY", "old_path": "server/loader.mjs", "new_path": "server/loader.mjs", "diff": "-import { URL, pathToFileURL } from 'url';\n-import Module from 'module';\n+import { pathToFileURL } from 'url';\nimport fs from 'fs';\nimport { promisify } from 'util';\n-const builtins = Module.builtinModules;\n-const extensions = { js: 'module', json: \"json\" };\n-const access = promisify(fs.access);\nconst readFile = promisify(fs.readFile);\nconst baseURL = pathToFileURL(process.cwd()).href;\n@@ -14,173 +10,44 @@ export async function resolve(\nparentModuleURL = baseURL,\ndefaultResolve,\n) {\n- // Hitting node.js builtins from server\n- if (builtins.includes(specifier)) {\n- //console.log(`${specifier} is builtin`);\n- return {\n- url: specifier,\n- format: 'builtin',\n- };\n- }\n-\n- // Hitting lib from server or web\n- if (specifier.startsWith('lib')) {\n- const result = defaultResolve(specifier, parentModuleURL);\n- const resultURL =\n- result.url.replace(\"squadcal/lib\", \"squadcal/server/dist/lib\");\n- //console.log(`${specifier} -> ${resultURL} is server/web -> lib`);\n- const isJSON = resultURL.search(/json(:[0-9]+)?$/) !== -1;\n- return {\n- url: resultURL,\n- format: isJSON ? 'json' : 'module',\n- };\n- }\n-\n- // Hitting web/dist/app.build from server\n- if (specifier === 'web/dist/app.build') {\n- const [ rootURL ] = parentModuleURL.split(\"/squadcal/\");\n- const resultURL = `${rootURL}/squadcal/server/dist/web/dist/app.build.js`;\n- //console.log(`${specifier} -> ${resultURL} is server -> web`);\n- return {\n- url: resultURL,\n- format: \"commonjs\",\n- };\n- }\n-\n- // Hitting web from server\n- if (specifier.startsWith('web')) {\n- const result = defaultResolve(specifier, parentModuleURL);\n- const resultURL = result.url.replace(\n- \"squadcal/web\",\n- \"squadcal/server/dist/web\",\n- );\n- //console.log(`${specifier} -> ${resultURL} is server -> web`);\n- return {\n- url: resultURL,\n- format: 'module',\n- };\n- }\n-\n- // Hitting server from server\n- if (\n- /^\\.{0,2}[/]/.test(specifier) === true ||\n- specifier.startsWith('file:')\n- ) {\n- let error;\n- try {\n- const candidateURL = new URL(specifier, parentModuleURL);\n- await access(candidateURL.pathname);\n- return {\n- url: candidateURL.href,\n- format: \"module\",\n- };\n- } catch (err) {\n- error = err;\n- }\n- for (let extension in extensions) {\n- const candidate = `${specifier}.${extension}`;\n- try {\n- const candidateURL = new URL(candidate, parentModuleURL);\n- await access(candidateURL.pathname);\n- const resultURL = candidateURL.href;\n- //console.log(`${specifier} -> ${resultURL} is server -> server`);\n- return {\n- url: resultURL,\n- format: extensions[extension],\n- };\n- } catch (err) {\n- error = err;\n- }\n- }\n- const result = defaultResolve(specifier, parentModuleURL);\n- //console.log(`couldn't figure out ${specifier} -> ${result.url}`);\n- return result;\n- }\n+ const defaultResult = defaultResolve(specifier, parentModuleURL);\n- // Hitting node_modules from lib\n- if (parentModuleURL.includes(\"squadcal/server/dist/lib\")) {\n- const replacedModuleURL = parentModuleURL.replace(\n- \"squadcal/server/dist/lib\",\n- \"squadcal/lib\",\n- );\n- const result = await resolveModule(\n+ // Special hack to use Babel-transpiled lib and web\n+ if (specifier.startsWith('lib/') || specifier.startsWith('web/')) {\n+ const url = defaultResult.url.replace(\nspecifier,\n- defaultResolve(specifier, replacedModuleURL),\n+ `server/dist/${specifier}`,\n);\n- //console.log(`${specifier} -> ${result.url} is lib -> node_modules`);\n- return result;\n- }\n- // Hitting node_modules from web\n- if (parentModuleURL.includes(\"squadcal/server/dist/web\")) {\n- const replacedModuleURL = parentModuleURL.replace(\n- \"squadcal/server/dist/web\",\n- \"squadcal/web\",\n- );\n- const result = await resolveModule(\n- specifier,\n- defaultResolve(specifier, replacedModuleURL),\n- );\n- //console.log(`${specifier} -> ${result.url} is web -> node_modules`);\n- return result;\n+ let format;\n+ if (url.search(/json(:[0-9]+)?$/) !== -1) {\n+ format = 'json';\n+ } else if (specifier === 'web/dist/app.build') {\n+ format = 'commonjs';\n+ } else {\n+ format = 'module';\n}\n- // Hitting node_modules from server\n- const result = await resolveModule(\n- specifier,\n- defaultResolve(specifier, parentModuleURL),\n- );\n- //console.log(`${specifier} -> ${result.url} is server -> node_modules`);\n- return result;\n-}\n-\n-async function resolveModule(specifier, defaultResult) {\n- // defaultResult resolves as commonjs, and we do that for almost every module.\n- // We use esm in several specific cases below, as commonjs causes errors.\n- if (\n- !specifier.startsWith('reselect') &&\n- !specifier.startsWith('redux') &&\n- !specifier.startsWith('lodash-es') &&\n- !specifier.startsWith('react-router') &&\n- !specifier.startsWith('history')\n- ) {\n- return defaultResult;\n+ return { url, format };\n}\n- const [ module, localPath ] = specifier.split('/');\n+ // We prefer to resolve packages as modules so that Node allows us to do\n+ // destructuring imports, as sometimes Flow libdefs don't specify a default\n+ // export. defaultResolve doesn't look at the module property in package.json,\n+ // so we do it manually here\n+ if (specifier === 'reselect' || specifier === 'redux') {\nconst moduleFolder = defaultResult.url.match(\n- new RegExp(`file://(.*node_modules\\/${module})`),\n+ new RegExp(`file://(.*node_modules\\/${specifier})`),\n)[1];\n- if (localPath) {\n- const esPathURL = new URL(`file://${moduleFolder}/es/${localPath}.js`);\n- try {\n- await access(esPathURL.pathname);\n- return {\n- url: esPathURL.href,\n- format: \"module\",\n- };\n- } catch (err) {\n- return {\n- url: defaultResult.url,\n- format: \"module\",\n- };\n- }\n- }\n-\nconst packageConfig = await readFile(`${moduleFolder}/package.json`);\nconst packageJSON = JSON.parse(packageConfig);\n- if (packageJSON[\"jsnext:main\"]) {\n- return {\n- url: `file://${moduleFolder}/${packageJSON[\"jsnext:main\"]}`,\n- format: \"module\",\n- };\n- }\nif (packageJSON.module) {\nreturn {\nurl: `file://${moduleFolder}/${packageJSON.module}`,\n- format: \"module\",\n+ format: 'module',\n};\n}\n+ }\nreturn defaultResult;\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Significantly simplify loader.mjs
129,187
04.10.2019 01:08:16
14,400
d02a48035cc3cfe3e2560edae2c54ac77f6b25ae
[server] Avoid destructuring import from react-router We can't treat `react-router` as ESM anymore, as it now uses a destructuring import on `react-is`, which is CJS-only.
[ { "change_type": "RENAME", "old_path": "server/flow-typed/npm/react-router_v4.x.x.js", "new_path": "server/flow-typed/npm/react-router_v5.x.x.js", "diff": "-// flow-typed signature: fd05ff7ee75da2ba5d12a620675d5923\n-// flow-typed version: c6154227d1/react-router_v4.x.x/flow_>=v0.63.x <=v0.103.x\n+// flow-typed signature: 05910bbabd87fd1003a3fdba9a7bc58b\n+// flow-typed version: ad8465c97a/react-router_v5.x.x/flow_>=v0.63.x <=v0.103.x\ndeclare module \"react-router\" {\n// NOTE: many of these are re-exported by react-router-dom and\n@@ -104,7 +104,7 @@ declare module \"react-router\" {\ncomponent?: React$ComponentType<*>,\nrender?: (router: ContextRouter) => React$Node,\nchildren?: React$ComponentType<ContextRouter> | React$Node,\n- path?: string,\n+ path?: string | Array<string>,\nexact?: boolean,\nstrict?: boolean,\nlocation?: LocationShape,\n@@ -121,7 +121,7 @@ declare module \"react-router\" {\n): React$ComponentType<P>;\ndeclare type MatchPathOptions = {\n- path?: string,\n+ path?: string | string[],\nexact?: boolean,\nstrict?: boolean,\nsensitive?: boolean\n@@ -129,6 +129,22 @@ declare module \"react-router\" {\ndeclare export function matchPath(\npathname: string,\n- options?: MatchPathOptions | string\n+ options?: MatchPathOptions | string | string[]\n): null | Match;\n+\n+ declare export function generatePath(pattern?: string, params?: {}): string;\n+\n+ declare export default {\n+ StaticRouter: typeof StaticRouter,\n+ MemoryRouter: typeof MemoryRouter,\n+ Router: typeof Router,\n+ Prompt: typeof Prompt,\n+ Redirect: typeof Redirect,\n+ Route: typeof Route,\n+ Switch: typeof Switch,\n+ withRouter: typeof withRouter,\n+ matchPath: typeof matchPath,\n+ generatePath: typeof generatePath,\n+ };\n+\n}\n" }, { "change_type": "MODIFY", "old_path": "server/src/responders/website-responders.js", "new_path": "server/src/responders/website-responders.js", "diff": "@@ -11,7 +11,7 @@ import html from 'common-tags/lib/html';\nimport { createStore, type Store } from 'redux';\nimport ReactDOMServer from 'react-dom/server';\nimport ReactRedux from 'react-redux';\n-import { Route, StaticRouter } from 'react-router';\n+import ReactRouter from 'react-router';\nimport React from 'react';\nimport _keyBy from 'lodash/fp/keyBy';\n@@ -49,6 +49,7 @@ const { basePath, baseDomain } = urlFacts;\nconst { renderToString } = ReactDOMServer;\nconst { Provider } = ReactRedux;\nconst { reducer } = ReduxSetup;\n+const { Route, StaticRouter } = ReactRouter;\ntype AssetInfo = {| jsURL: string, fontsURL: string, cssInclude: string |};\nlet assetInfo: ?AssetInfo = null;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Avoid destructuring import from react-router We can't treat `react-router` as ESM anymore, as it now uses a destructuring import on `react-is`, which is CJS-only.
129,187
04.10.2019 01:31:15
14,400
c73d0b7252a3d83b0191d61c94aa2765a937ebd6
[native] Remove schedule Not sure why I ever added this?
[ { "change_type": "DELETE", "old_path": "native/flow-typed/npm/schedule_vx.x.x.js", "new_path": null, "diff": "-// flow-typed signature: 9957423a2fec1bb0b1ecaa87357364a3\n-// flow-typed version: <<STUB>>/schedule_v0.4.0/flow_v0.98.0\n-\n-/**\n- * This is an autogenerated libdef stub for:\n- *\n- * 'schedule'\n- *\n- * Fill this stub out by replacing all the `any` types.\n- *\n- * Once filled out, we encourage you to share your work with the\n- * community by sending a pull request to:\n- * https://github.com/flowtype/flow-typed\n- */\n-\n-declare module 'schedule' {\n- declare module.exports: any;\n-}\n-\n-/**\n- * We include stubs for each file inside this npm package in case you need to\n- * require those files directly. Feel free to delete any files that aren't\n- * needed.\n- */\n-declare module 'schedule/cjs/schedule-tracking.development' {\n- declare module.exports: any;\n-}\n-\n-declare module 'schedule/cjs/schedule-tracking.production.min' {\n- declare module.exports: any;\n-}\n-\n-declare module 'schedule/cjs/schedule-tracking.profiling.min' {\n- declare module.exports: any;\n-}\n-\n-declare module 'schedule/cjs/schedule.development' {\n- declare module.exports: any;\n-}\n-\n-declare module 'schedule/cjs/schedule.production.min' {\n- declare module.exports: any;\n-}\n-\n-declare module 'schedule/tracking-profiling' {\n- declare module.exports: any;\n-}\n-\n-declare module 'schedule/tracking' {\n- declare module.exports: any;\n-}\n-\n-declare module 'schedule/umd/schedule-tracking.development' {\n- declare module.exports: any;\n-}\n-\n-declare module 'schedule/umd/schedule-tracking.production.min' {\n- declare module.exports: any;\n-}\n-\n-declare module 'schedule/umd/schedule.development' {\n- declare module.exports: any;\n-}\n-\n-declare module 'schedule/umd/schedule.production.min' {\n- declare module.exports: any;\n-}\n-\n-// Filename aliases\n-declare module 'schedule/cjs/schedule-tracking.development.js' {\n- declare module.exports: $Exports<'schedule/cjs/schedule-tracking.development'>;\n-}\n-declare module 'schedule/cjs/schedule-tracking.production.min.js' {\n- declare module.exports: $Exports<'schedule/cjs/schedule-tracking.production.min'>;\n-}\n-declare module 'schedule/cjs/schedule-tracking.profiling.min.js' {\n- declare module.exports: $Exports<'schedule/cjs/schedule-tracking.profiling.min'>;\n-}\n-declare module 'schedule/cjs/schedule.development.js' {\n- declare module.exports: $Exports<'schedule/cjs/schedule.development'>;\n-}\n-declare module 'schedule/cjs/schedule.production.min.js' {\n- declare module.exports: $Exports<'schedule/cjs/schedule.production.min'>;\n-}\n-declare module 'schedule/index' {\n- declare module.exports: $Exports<'schedule'>;\n-}\n-declare module 'schedule/index.js' {\n- declare module.exports: $Exports<'schedule'>;\n-}\n-declare module 'schedule/tracking-profiling.js' {\n- declare module.exports: $Exports<'schedule/tracking-profiling'>;\n-}\n-declare module 'schedule/tracking.js' {\n- declare module.exports: $Exports<'schedule/tracking'>;\n-}\n-declare module 'schedule/umd/schedule-tracking.development.js' {\n- declare module.exports: $Exports<'schedule/umd/schedule-tracking.development'>;\n-}\n-declare module 'schedule/umd/schedule-tracking.production.min.js' {\n- declare module.exports: $Exports<'schedule/umd/schedule-tracking.production.min'>;\n-}\n-declare module 'schedule/umd/schedule.development.js' {\n- declare module.exports: $Exports<'schedule/umd/schedule.development'>;\n-}\n-declare module 'schedule/umd/schedule.production.min.js' {\n- declare module.exports: $Exports<'schedule/umd/schedule.production.min'>;\n-}\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"metro-react-native-babel-preset\": \"^0.56.0\",\n\"postinstall-postinstall\": \"^2.0.0\",\n\"react-devtools\": \"^3.0.0\",\n- \"react-test-renderer\": \"16.8.6\",\n- \"schedule\": \"0.4.0\"\n+ \"react-test-renderer\": \"16.8.6\"\n},\n\"jest\": {\n\"preset\": \"react-native\"\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -11056,13 +11056,6 @@ sax@^1.2.1, sax@^1.2.4, sax@~1.2.4:\nresolved \"https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9\"\nintegrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==\n-schedule@0.4.0:\n- version \"0.4.0\"\n- resolved \"https://registry.yarnpkg.com/schedule/-/schedule-0.4.0.tgz#fa20cfd0bfbf91c47d02272fd7096780d3170bbb\"\n- integrity sha512-hYjmoaEMojiMkWCxKr6ue+LYcZ29u29+AamWYmzwT2VOO9ws5UJp/wNhsVUPiUeNh+EdRfZm7nDeB40ffTfMhA==\n- dependencies:\n- object-assign \"^4.1.1\"\n-\nscheduler@0.14.0:\nversion \"0.14.0\"\nresolved \"https://registry.yarnpkg.com/scheduler/-/scheduler-0.14.0.tgz#b392c23c9c14bfa2933d4740ad5603cc0d59ea5b\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Remove schedule Not sure why I ever added this?
129,187
04.10.2019 01:39:25
14,400
2f051ce63c9818149b8bb82f10db7af504c372ae
[server] Fix up npm scripts
[ { "change_type": "MODIFY", "old_path": "server/package.json", "new_path": "server/package.json", "diff": "\"rsync\": \"rsync -rLpmuv --exclude '*/package.json' --exclude '*/node_modules/*' --include '*.json' --include 'app.build.js' --exclude '*.*' src/ dist/\",\n\"prod-build\": \"npm run babel && npm run rsync && npm run update-geoip\",\n\"update-geoip\": \"cd ../node_modules/geoip-lite && npm run updatedb\",\n- \"prod\": \"node --experimental-modules --loader ./loader.mjs dist/server\",\n- \"dev-rsync\": \"chokidar -s 'src/**/*.json' 'src/**/*.build' -c 'npm run rsync' > /dev/null 2>&1\",\n- \"dev\": \"NODE_ENV=dev concurrently \\\"npm run babel -- --watch\\\" \\\"npm run dev-rsync\\\" \\\"nodemon -e js,json,build --watch dist --experimental-modules --loader ./loader.mjs dist/server\\\"\",\n+ \"prod\": \"node --experimental-modules --loader ./loader.mjs --es-module-specifier-resolution node dist/server\",\n+ \"dev-rsync\": \"chokidar -s 'src/**/*.json' 'src/**/*.build.js' -c 'npm run rsync' > /dev/null 2>&1\",\n+ \"dev\": \"NODE_ENV=dev concurrently \\\"npm run babel -- --watch\\\" \\\"npm run dev-rsync\\\" \\\"nodemon -e js,json --watch dist --experimental-modules --loader ./loader.mjs --es-module-specifier-resolution node dist/server\\\"\",\n\"script\": \"node --experimental-modules --loader ./loader.mjs\"\n},\n\"author\": \"\",\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Fix up npm scripts
129,187
04.10.2019 01:57:33
14,400
8d0fbe0c08ca80ee91f225b0391acad1c973355d
Explicitly specify newer invariant version
[ { "change_type": "MODIFY", "old_path": "lib/package.json", "new_path": "lib/package.json", "diff": "\"dateformat\": \"^2.0.0\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n\"file-type\": \"^10.6.0\",\n- \"invariant\": \"^2.2.2\",\n+ \"invariant\": \"^2.2.4\",\n\"lodash\": \"^4.17.5\",\n\"prop-types\": \"^15.6.0\",\n\"react\": \"16.8.6\",\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"base-64\": \"^0.1.0\",\n\"color\": \"^2.0.0\",\n\"find-root\": \"^1.1.0\",\n- \"fs-extra\": \"^6.0.1\",\n\"hoist-non-react-statics\": \"^3.1.0\",\n- \"invariant\": \"^2.2.2\",\n+ \"invariant\": \"^2.2.4\",\n\"lib\": \"0.0.1\",\n\"lodash\": \"^4.17.5\",\n\"lottie-ios\": \"3.1.3\",\n\"eslint\": \"^6.1.0\",\n\"flow-bin\": \"^0.98.0\",\n\"flow-mono-cli\": \"^1.5.0\",\n+ \"fs-extra\": \"^6.0.1\",\n\"get-yarn-workspaces\": \"^1.0.2\",\n\"jest\": \"^24.8.0\",\n\"jetifier\": \"^1.6.4\",\n" }, { "change_type": "MODIFY", "old_path": "server/package.json", "new_path": "server/package.json", "diff": "\"express-ws\": \"^4.0.0\",\n\"firebase-admin\": \"^8.6.0\",\n\"geoip-lite\": \"^1.3.8\",\n- \"invariant\": \"^2.2.2\",\n+ \"invariant\": \"^2.2.4\",\n\"lib\": \"0.0.1\",\n\"lodash\": \"^4.17.5\",\n\"multer\": \"^1.4.1\",\n" }, { "change_type": "MODIFY", "old_path": "web/package.json", "new_path": "web/package.json", "diff": "\"dateformat\": \"^2.0.0\",\n\"detect-browser\": \"^4.0.4\",\n\"history\": \"^4.6.3\",\n- \"invariant\": \"^2.2.2\",\n+ \"invariant\": \"^2.2.4\",\n\"isomorphic-fetch\": \"^2.2.1\",\n\"lib\": \"0.0.1\",\n\"lodash\": \"^4.17.5\",\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Explicitly specify newer invariant version
129,187
04.10.2019 02:00:02
14,400
2c47b0c74da269ee1fd400c49c8a6e86fcae1092
[server] Remove react-hot-loader
[ { "change_type": "DELETE", "old_path": "server/flow-typed/npm/react-hot-loader_v3.x.x.js", "new_path": null, "diff": "-// flow-typed signature: 8adc69d74f9d234d3f81c4acfb6a5759\n-// flow-typed version: c6154227d1/react-hot-loader_v3.x.x/flow_>=v0.53.0 <=v0.103.x\n-\n-// @flow\n-declare module \"react-hot-loader\" {\n- declare class AppContainer<S, A> extends React$Component<{\n- errorReporter?: React$Element<any> | (() => React$Element<any>),\n- children: React$Element<any>\n- }> {}\n-}\n" }, { "change_type": "MODIFY", "old_path": "server/package.json", "new_path": "server/package.json", "diff": "\"nodemailer\": \"^4.4.2\",\n\"react\": \"16.8.6\",\n\"react-dom\": \"16.8.6\",\n- \"react-hot-loader\": \"^3.1.3\",\n\"react-html-email\": \"^3.0.0\",\n\"react-redux\": \"^7.1.1\",\n\"react-router\": \"^5.1.2\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -4292,13 +4292,6 @@ error-ex@^1.2.0, error-ex@^1.3.1:\ndependencies:\nis-arrayish \"^0.2.1\"\n-error-stack-parser@^1.3.6:\n- version \"1.3.6\"\n- resolved \"https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-1.3.6.tgz#e0e73b93e417138d1cd7c0b746b1a4a14854c292\"\n- integrity sha1-4Oc7k+QXE40c18C3RrGkoUhUwpI=\n- dependencies:\n- stackframe \"^0.3.1\"\n-\nerrorhandler@^1.5.0:\nversion \"1.5.1\"\nresolved \"https://registry.yarnpkg.com/errorhandler/-/errorhandler-1.5.1.tgz#b9ba5d17cf90744cd1e851357a6e75bf806a9a91\"\n@@ -9765,7 +9758,7 @@ prompts@^2.0.1:\nkleur \"^3.0.3\"\nsisteransi \"^1.0.3\"\n-prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:\n+prop-types@^15.5.10, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:\nversion \"15.7.2\"\nresolved \"https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5\"\nintegrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==\n@@ -10001,11 +9994,6 @@ react-deep-force-update@^1.0.0:\nresolved \"https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-1.1.2.tgz#3d2ae45c2c9040cbb1772be52f8ea1ade6ca2ee1\"\nintegrity sha512-WUSQJ4P/wWcusaH+zZmbECOk7H5N2pOIl0vzheeornkIMhu+qrNdGFm0bDZLCb0hSF0jf/kH1SgkNGfBdTc4wA==\n-react-deep-force-update@^2.1.1:\n- version \"2.1.3\"\n- resolved \"https://registry.yarnpkg.com/react-deep-force-update/-/react-deep-force-update-2.1.3.tgz#740612322e617bcced38f61794a4af75dc3d98e7\"\n- integrity sha512-lqD4eHKVuB65RyO/hGbEST53E2/GPbcIPcFYyeW/p4vNngtH4G7jnKGlU6u1OqrFo0uNfIvwuBOg98IbLHlNEA==\n-\nreact-devtools-core@^3.6.0, react-devtools-core@^3.6.1:\nversion \"3.6.3\"\nresolved \"https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-3.6.3.tgz#977d95b684c6ad28205f0c62e1e12c5f16675814\"\n@@ -10059,17 +10047,6 @@ react-feather@^1.1.4:\nresolved \"https://registry.yarnpkg.com/react-feather/-/react-feather-1.1.6.tgz#2a547e3d5cd5e383d3da0128d593cbdb3c1b32f7\"\nintegrity sha512-iCofWhTjX+vQwvDmg7o6vg0XrUg1c41yBDZG+l83nz1FiCsleJoUgd3O+kHpOeWMXuPrRIFfCixvcqyOLGOgIg==\n-react-hot-loader@^3.1.3:\n- version \"3.1.3\"\n- resolved \"https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-3.1.3.tgz#6f92877326958c7cb0134b512474517869126082\"\n- integrity sha512-d7nZf78irxoGN5PY4zd6CSgZiroOhvIWzRast3qwTn4sSnBwlt08kV8WMQ9mitmxEdlCTwZt+5ClrRSjxWguMQ==\n- dependencies:\n- global \"^4.3.0\"\n- react-deep-force-update \"^2.1.1\"\n- react-proxy \"^3.0.0-alpha.0\"\n- redbox-react \"^1.3.6\"\n- source-map \"^0.6.1\"\n-\nreact-hot-loader@^4.6.3:\nversion \"4.12.14\"\nresolved \"https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.14.tgz#81ca06ffda0b90aad15d6069339f73ed6428340a\"\n@@ -10355,13 +10332,6 @@ react-proxy@^1.1.7:\nlodash \"^4.6.1\"\nreact-deep-force-update \"^1.0.0\"\n-react-proxy@^3.0.0-alpha.0:\n- version \"3.0.0-alpha.1\"\n- resolved \"https://registry.yarnpkg.com/react-proxy/-/react-proxy-3.0.0-alpha.1.tgz#4400426bcfa80caa6724c7755695315209fa4b07\"\n- integrity sha1-RABCa8+oDKpnJMd1VpUxUgn6Swc=\n- dependencies:\n- lodash \"^4.6.1\"\n-\nreact-redux@^7.1.1:\nversion \"7.1.1\"\nresolved \"https://registry.yarnpkg.com/react-redux/-/react-redux-7.1.1.tgz#ce6eee1b734a7a76e0788b3309bf78ff6b34fa0a\"\n@@ -10605,16 +10575,6 @@ rechoir@^0.6.2:\ndependencies:\nresolve \"^1.1.6\"\n-redbox-react@^1.3.6:\n- version \"1.6.0\"\n- resolved \"https://registry.yarnpkg.com/redbox-react/-/redbox-react-1.6.0.tgz#e753ac02595bc1bf695b3935889a4f5b1b5a21a1\"\n- integrity sha512-mLjM5eYR41yOp5YKHpd3syFeGq6B4Wj5vZr64nbLvTZW5ZLff4LYk7VE4ITpVxkZpCY6OZuqh0HiP3A3uEaCpg==\n- dependencies:\n- error-stack-parser \"^1.3.6\"\n- object-assign \"^4.0.1\"\n- prop-types \"^15.5.4\"\n- sourcemapped-stacktrace \"^1.1.6\"\n-\nredent@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde\"\n@@ -11442,11 +11402,6 @@ source-map-url@^0.4.0:\nresolved \"https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3\"\nintegrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=\n-source-map@0.5.6:\n- version \"0.5.6\"\n- resolved \"https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412\"\n- integrity sha1-dc449SvwczxafwwRjYEzSiu19BI=\n-\nsource-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6:\nversion \"0.5.7\"\nresolved \"https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc\"\n@@ -11462,13 +11417,6 @@ source-map@^0.7.3:\nresolved \"https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383\"\nintegrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==\n-sourcemapped-stacktrace@^1.1.6:\n- version \"1.1.11\"\n- resolved \"https://registry.yarnpkg.com/sourcemapped-stacktrace/-/sourcemapped-stacktrace-1.1.11.tgz#e2dede7fc148599c52a4f883276e527f8452657d\"\n- integrity sha512-O0pcWjJqzQFVsisPlPXuNawJHHg9N9UgpJ/aDmvi9+vnS3x1C0NhwkVFzzZ1VN0Xo+bekyweoqYvBw5ZBKiNnQ==\n- dependencies:\n- source-map \"0.5.6\"\n-\nspawn-command@^0.0.2-1:\nversion \"0.0.2-1\"\nresolved \"https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0\"\n@@ -11592,11 +11540,6 @@ stack-utils@^1.0.1:\nresolved \"https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8\"\nintegrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==\n-stackframe@^0.3.1:\n- version \"0.3.1\"\n- resolved \"https://registry.yarnpkg.com/stackframe/-/stackframe-0.3.1.tgz#33aa84f1177a5548c8935533cbfeb3420975f5a4\"\n- integrity sha1-M6qE8Rd6VUjIk1Uzy/6zQgl19aQ=\n-\nstacktrace-parser@^0.1.3:\nversion \"0.1.7\"\nresolved \"https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.7.tgz#9ed005638a5e79dcf256611da1dfb4871e6fd14d\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[server] Remove react-hot-loader
129,187
04.10.2019 02:01:03
14,400
363d9080cfa072e0aab98dd68698ed02ff1f6189
[web] Explicitly use react-hot-loader latest version
[ { "change_type": "MODIFY", "old_path": "web/package.json", "new_path": "web/package.json", "diff": "\"react-dnd-html5-backend\": \"^7.0.2\",\n\"react-dom\": \"16.8.6\",\n\"react-feather\": \"^1.1.4\",\n- \"react-hot-loader\": \"^4.6.3\",\n+ \"react-hot-loader\": \"^4.12.14\",\n\"react-linkify\": \"^0.2.2\",\n\"react-redux\": \"^7.1.1\",\n\"react-router\": \"^5.1.2\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -10047,7 +10047,7 @@ react-feather@^1.1.4:\nresolved \"https://registry.yarnpkg.com/react-feather/-/react-feather-1.1.6.tgz#2a547e3d5cd5e383d3da0128d593cbdb3c1b32f7\"\nintegrity sha512-iCofWhTjX+vQwvDmg7o6vg0XrUg1c41yBDZG+l83nz1FiCsleJoUgd3O+kHpOeWMXuPrRIFfCixvcqyOLGOgIg==\n-react-hot-loader@^4.6.3:\n+react-hot-loader@^4.12.14:\nversion \"4.12.14\"\nresolved \"https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.14.tgz#81ca06ffda0b90aad15d6069339f73ed6428340a\"\nintegrity sha512-ecxH4eBvEaJ9onT8vkEmK1FAAJUh1PqzGqds9S3k+GeihSp7nKAp4fOxytO+Ghr491LiBD38jaKyDXYnnpI9pQ==\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Explicitly use react-hot-loader latest version
129,187
04.10.2019 02:08:54
14,400
39582cbd065411a0eed14ddac5ac033ed8d98aa2
Remove color in favor of tinycolor2
[ { "change_type": "DELETE", "old_path": "lib/flow-typed/npm/color_vx.x.x.js", "new_path": null, "diff": "-// flow-typed signature: e903454cf2ff881c10001325a0a86b3a\n-// flow-typed version: <<STUB>>/color_v^1.0.3/flow_v0.98.0\n-\n-/**\n- * This is an autogenerated libdef stub for:\n- *\n- * 'color'\n- *\n- * Fill this stub out by replacing all the `any` types.\n- *\n- * Once filled out, we encourage you to share your work with the\n- * community by sending a pull request to:\n- * https://github.com/flowtype/flow-typed\n- */\n-\n-declare module 'color' {\n- declare module.exports: any;\n-}\n-\n-/**\n- * We include stubs for each file inside this npm package in case you need to\n- * require those files directly. Feel free to delete any files that aren't\n- * needed.\n- */\n-\n-\n-// Filename aliases\n-declare module 'color/index' {\n- declare module.exports: $Exports<'color'>;\n-}\n-declare module 'color/index.js' {\n- declare module.exports: $Exports<'color'>;\n-}\n" }, { "change_type": "ADD", "old_path": null, "new_path": "lib/flow-typed/npm/tinycolor2_vx.x.x.js", "diff": "+// flow-typed signature: ac13a909f0cfd61a18ac96a206beccd0\n+// flow-typed version: <<STUB>>/tinycolor2_v1.4.1/flow_v0.98.0\n+\n+/**\n+ * This is an autogenerated libdef stub for:\n+ *\n+ * 'tinycolor2'\n+ *\n+ * Fill this stub out by replacing all the `any` types.\n+ *\n+ * Once filled out, we encourage you to share your work with the\n+ * community by sending a pull request to:\n+ * https://github.com/flowtype/flow-typed\n+ */\n+\n+declare module 'tinycolor2' {\n+ declare module.exports: any;\n+}\n+\n+/**\n+ * We include stubs for each file inside this npm package in case you need to\n+ * require those files directly. Feel free to delete any files that aren't\n+ * needed.\n+ */\n+declare module 'tinycolor2/demo/jquery-1.9.1' {\n+ declare module.exports: any;\n+}\n+\n+declare module 'tinycolor2/dist/tinycolor-min' {\n+ declare module.exports: any;\n+}\n+\n+declare module 'tinycolor2/Gruntfile' {\n+ declare module.exports: any;\n+}\n+\n+declare module 'tinycolor2/test/qunit' {\n+ declare module.exports: any;\n+}\n+\n+declare module 'tinycolor2/test/test' {\n+ declare module.exports: any;\n+}\n+\n+declare module 'tinycolor2/tinycolor' {\n+ declare module.exports: any;\n+}\n+\n+// Filename aliases\n+declare module 'tinycolor2/demo/jquery-1.9.1.js' {\n+ declare module.exports: $Exports<'tinycolor2/demo/jquery-1.9.1'>;\n+}\n+declare module 'tinycolor2/dist/tinycolor-min.js' {\n+ declare module.exports: $Exports<'tinycolor2/dist/tinycolor-min'>;\n+}\n+declare module 'tinycolor2/Gruntfile.js' {\n+ declare module.exports: $Exports<'tinycolor2/Gruntfile'>;\n+}\n+declare module 'tinycolor2/test/qunit.js' {\n+ declare module.exports: $Exports<'tinycolor2/test/qunit'>;\n+}\n+declare module 'tinycolor2/test/test.js' {\n+ declare module.exports: $Exports<'tinycolor2/test/test'>;\n+}\n+declare module 'tinycolor2/tinycolor.js' {\n+ declare module.exports: $Exports<'tinycolor2/tinycolor'>;\n+}\n" }, { "change_type": "MODIFY", "old_path": "lib/package.json", "new_path": "lib/package.json", "diff": "\"flow\": \"flow; test $? -eq 0 -o $? -eq 2\"\n},\n\"dependencies\": {\n- \"color\": \"^1.0.3\",\n\"dateformat\": \"^2.0.0\",\n\"fast-json-stable-stringify\": \"^2.0.0\",\n\"file-type\": \"^10.6.0\",\n\"react-redux\": \"^7.1.1\",\n\"reselect\": \"^4.0.0\",\n\"string-hash\": \"^1.1.3\",\n+ \"tinycolor2\": \"^1.4.1\",\n\"tokenize-text\": \"^1.1.3\",\n\"util-inspect\": \"^0.1.8\"\n}\n" }, { "change_type": "MODIFY", "old_path": "lib/shared/thread-utils.js", "new_path": "lib/shared/thread-utils.js", "diff": "@@ -12,7 +12,7 @@ import {\n} from '../types/thread-types';\nimport type { UserInfo } from '../types/user-types';\n-import Color from 'color';\n+import tinycolor from 'tinycolor2';\nimport { pluralize } from '../utils/text-utils';\nimport {\n@@ -21,7 +21,7 @@ import {\n} from '../permissions/thread-permissions';\nfunction colorIsDark(color: string) {\n- return Color(`#${color}`).dark();\n+ return tinycolor(`#${color}`).isDark();\n}\n// Randomly distributed in RGB-space\n" }, { "change_type": "DELETE", "old_path": "native/flow-typed/npm/color_vx.x.x.js", "new_path": null, "diff": "-// flow-typed signature: dd8f4b3f24518905cfb55589a2dd813e\n-// flow-typed version: <<STUB>>/color_v^2.0.0/flow_v0.98.0\n-\n-/**\n- * This is an autogenerated libdef stub for:\n- *\n- * 'color'\n- *\n- * Fill this stub out by replacing all the `any` types.\n- *\n- * Once filled out, we encourage you to share your work with the\n- * community by sending a pull request to:\n- * https://github.com/flowtype/flow-typed\n- */\n-\n-declare module 'color' {\n- declare module.exports: any;\n-}\n-\n-/**\n- * We include stubs for each file inside this npm package in case you need to\n- * require those files directly. Feel free to delete any files that aren't\n- * needed.\n- */\n-\n-\n-// Filename aliases\n-declare module 'color/index' {\n- declare module.exports: $Exports<'color'>;\n-}\n-declare module 'color/index.js' {\n- declare module.exports: $Exports<'color'>;\n-}\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"@react-native-community/cameraroll\": \"^1.2.1\",\n\"@react-native-community/netinfo\": \"^4.2.1\",\n\"base-64\": \"^0.1.0\",\n- \"color\": \"^2.0.0\",\n\"find-root\": \"^1.1.0\",\n\"hoist-non-react-statics\": \"^3.1.0\",\n\"invariant\": \"^2.2.4\",\n" }, { "change_type": "MODIFY", "old_path": "server/.flowconfig", "new_path": "server/.flowconfig", "diff": "../web\n[libs]\n+../lib/flow-typed\n[options]\nmodule.file_ext=.js\n" }, { "change_type": "MODIFY", "old_path": "web/.flowconfig", "new_path": "web/.flowconfig", "diff": "../lib\n[libs]\n+../lib/flow-typed\n[options]\nmodule.name_mapper.extension='css' -> '<PROJECT_ROOT>/flow/CSSModule.js.flow'\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -3117,7 +3117,7 @@ collection-visit@^1.0.0:\nmap-visit \"^1.0.0\"\nobject-visit \"^1.0.0\"\n-color-convert@^1.8.2, color-convert@^1.9.0, color-convert@^1.9.1:\n+color-convert@^1.9.0, color-convert@^1.9.1:\nversion \"1.9.3\"\nresolved \"https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8\"\nintegrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==\n@@ -3134,7 +3134,7 @@ color-name@^1.0.0:\nresolved \"https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2\"\nintegrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==\n-color-string@^1.4.0, color-string@^1.5.2:\n+color-string@^1.5.2:\nversion \"1.5.3\"\nresolved \"https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc\"\nintegrity sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==\n@@ -3147,22 +3147,6 @@ color-support@^1.1.3:\nresolved \"https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2\"\nintegrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==\n-color@^1.0.3:\n- version \"1.0.3\"\n- resolved \"https://registry.yarnpkg.com/color/-/color-1.0.3.tgz#e48e832d85f14ef694fb468811c2d5cfe729b55d\"\n- integrity sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=\n- dependencies:\n- color-convert \"^1.8.2\"\n- color-string \"^1.4.0\"\n-\n-color@^2.0.0:\n- version \"2.0.1\"\n- resolved \"https://registry.yarnpkg.com/color/-/color-2.0.1.tgz#e4ed78a3c4603d0891eba5430b04b86314f4c839\"\n- integrity sha512-ubUCVVKfT7r2w2D3qtHakj8mbmKms+tThR8gI8zEYCbUBl8/voqFGt3kgBqGwXAopgXybnkuOq+qMYCRrp4cXw==\n- dependencies:\n- color-convert \"^1.9.1\"\n- color-string \"^1.5.2\"\n-\ncolor@^3.0.0, color@^3.1.1:\nversion \"3.1.2\"\nresolved \"https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Remove color in favor of tinycolor2
129,187
04.10.2019 02:58:21
14,400
ef35784f7879f7fb4a8ad9f123a3f3f0ae51fac4
[web] Update several Webpack loaders
[ { "change_type": "MODIFY", "old_path": "web/package.json", "new_path": "web/package.json", "diff": "\"concurrently\": \"^4.1.2\",\n\"css-loader\": \"^3.2.0\",\n\"flow-bin\": \"^0.98.0\",\n- \"mini-css-extract-plugin\": \"^0.5.0\",\n+ \"mini-css-extract-plugin\": \"^0.8.0\",\n\"optimize-css-assets-webpack-plugin\": \"^5.0.1\",\n- \"style-loader\": \"^0.23.1\",\n+ \"style-loader\": \"^1.0.0\",\n\"terser-webpack-plugin\": \"^1.2.1\",\n- \"url-loader\": \"^1.1.2\",\n+ \"url-loader\": \"^2.1.0\",\n\"webpack\": \"^4.41.0\",\n\"webpack-cli\": \"^3.3.9\",\n\"webpack-dev-server\": \"^3.8.2\"\n" }, { "change_type": "MODIFY", "old_path": "web/webpack.config.js", "new_path": "web/webpack.config.js", "diff": "@@ -122,24 +122,14 @@ module.exports = function(env) {\ntest: /\\.css$/,\nexclude: /node_modules\\/.*\\.css$/,\nuse: [\n- {\n- loader: 'style-loader',\n- options: {\n- sourceMap: true,\n- },\n- },\n+ 'style-loader',\ncssLoader,\n],\n},\n{\ntest: /node_modules\\/.*\\.css$/,\nuse: [\n- {\n- loader: 'style-loader',\n- options: {\n- sourceMap: true,\n- },\n- },\n+ 'style-loader',\n{\n...cssLoader,\noptions: {\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -8067,7 +8067,7 @@ mime@1.6.0:\nresolved \"https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1\"\nintegrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==\n-mime@^2.0.3, mime@^2.2.0, mime@^2.4.1, mime@^2.4.4:\n+mime@^2.2.0, mime@^2.4.1, mime@^2.4.4:\nversion \"2.4.4\"\nresolved \"https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5\"\nintegrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==\n@@ -8108,12 +8108,13 @@ mini-create-react-context@^0.3.0:\ngud \"^1.0.0\"\ntiny-warning \"^1.0.2\"\n-mini-css-extract-plugin@^0.5.0:\n- version \"0.5.0\"\n- resolved \"https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.5.0.tgz#ac0059b02b9692515a637115b0cc9fed3a35c7b0\"\n- integrity sha512-IuaLjruM0vMKhUUT51fQdQzBYTX49dLj8w68ALEAe2A4iYNpIC4eMac67mt3NzycvjOlf07/kYxJDc0RTl1Wqw==\n+mini-css-extract-plugin@^0.8.0:\n+ version \"0.8.0\"\n+ resolved \"https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-0.8.0.tgz#81d41ec4fe58c713a96ad7c723cdb2d0bd4d70e1\"\n+ integrity sha512-MNpRGbNA52q6U92i0qbVpQNsgk7LExy41MdAlG84FeytfDOtRIf/mCHdEgG8rpTKOaNKiqUnZdlptF469hxqOw==\ndependencies:\nloader-utils \"^1.1.0\"\n+ normalize-url \"1.9.1\"\nschema-utils \"^1.0.0\"\nwebpack-sources \"^1.1.0\"\n@@ -8557,6 +8558,16 @@ normalize-path@^3.0.0:\nresolved \"https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65\"\nintegrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==\n+normalize-url@1.9.1:\n+ version \"1.9.1\"\n+ resolved \"https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c\"\n+ integrity sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=\n+ dependencies:\n+ object-assign \"^4.0.1\"\n+ prepend-http \"^1.0.0\"\n+ query-string \"^4.1.0\"\n+ sort-keys \"^1.0.0\"\n+\nnormalize-url@2.0.1:\nversion \"2.0.1\"\nresolved \"https://registry.yarnpkg.com/normalize-url/-/normalize-url-2.0.1.tgz#835a9da1551fa26f70e92329069a23aa6574d7e6\"\n@@ -9646,7 +9657,7 @@ prelude-ls@~1.1.2:\nresolved \"https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54\"\nintegrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=\n-prepend-http@^1.0.1:\n+prepend-http@^1.0.0, prepend-http@^1.0.1:\nversion \"1.0.4\"\nresolved \"https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc\"\nintegrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=\n@@ -9873,6 +9884,14 @@ query-string@6.8.1:\nsplit-on-first \"^1.0.0\"\nstrict-uri-encode \"^2.0.0\"\n+query-string@^4.1.0:\n+ version \"4.3.4\"\n+ resolved \"https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb\"\n+ integrity sha1-u7aTucqRXCMlFbIosaArYJBD2+s=\n+ dependencies:\n+ object-assign \"^4.1.0\"\n+ strict-uri-encode \"^1.0.0\"\n+\nquery-string@^5.0.1:\nversion \"5.1.1\"\nresolved \"https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb\"\n@@ -11014,7 +11033,7 @@ schema-utils@^1.0.0:\najv-errors \"^1.0.0\"\najv-keywords \"^3.1.0\"\n-schema-utils@^2.0.0:\n+schema-utils@^2.0.0, schema-utils@^2.0.1:\nversion \"2.4.1\"\nresolved \"https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.4.1.tgz#e89ade5d056dc8bcaca377574bb4a9c4e1b8be56\"\nintegrity sha512-RqYLpkPZX5Oc3fw/kHHHyP56fg5Y+XBpIpV8nCg0znIALfq3OH+Ea9Hfeac9BAMwG5IICltiZ0vxFvJQONfA5w==\n@@ -11339,6 +11358,13 @@ sockjs@0.3.19:\nfaye-websocket \"^0.10.0\"\nuuid \"^3.0.1\"\n+sort-keys@^1.0.0:\n+ version \"1.1.2\"\n+ resolved \"https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad\"\n+ integrity sha1-RBttTTRnmPG05J6JIK37oOVD+a0=\n+ dependencies:\n+ is-plain-obj \"^1.0.0\"\n+\nsort-keys@^2.0.0:\nversion \"2.0.0\"\nresolved \"https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128\"\n@@ -11741,13 +11767,13 @@ stubs@^3.0.0:\nresolved \"https://registry.yarnpkg.com/stubs/-/stubs-3.0.0.tgz#e8d2ba1fa9c90570303c030b6900f7d5f89abe5b\"\nintegrity sha1-6NK6H6nJBXAwPAMLaQD31fiavls=\n-style-loader@^0.23.1:\n- version \"0.23.1\"\n- resolved \"https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925\"\n- integrity sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==\n+style-loader@^1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/style-loader/-/style-loader-1.0.0.tgz#1d5296f9165e8e2c85d24eee0b7caf9ec8ca1f82\"\n+ integrity sha512-B0dOCFwv7/eY31a5PCieNwMgMhVGFe9w+rh7s/Bx8kfFkrth9zfTZquoYvdw8URgiqxObQKcpW51Ugz1HjfdZw==\ndependencies:\n- loader-utils \"^1.1.0\"\n- schema-utils \"^1.0.0\"\n+ loader-utils \"^1.2.3\"\n+ schema-utils \"^2.0.1\"\nstylehacks@^4.0.0:\nversion \"4.0.3\"\n@@ -12409,14 +12435,14 @@ urix@^0.1.0:\nresolved \"https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72\"\nintegrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=\n-url-loader@^1.1.2:\n- version \"1.1.2\"\n- resolved \"https://registry.yarnpkg.com/url-loader/-/url-loader-1.1.2.tgz#b971d191b83af693c5e3fea4064be9e1f2d7f8d8\"\n- integrity sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg==\n+url-loader@^2.1.0:\n+ version \"2.1.0\"\n+ resolved \"https://registry.yarnpkg.com/url-loader/-/url-loader-2.1.0.tgz#bcc1ecabbd197e913eca23f5e0378e24b4412961\"\n+ integrity sha512-kVrp/8VfEm5fUt+fl2E0FQyrpmOYgMEkBsv8+UDP1wFhszECq5JyGF33I7cajlVY90zRZ6MyfgKXngLvHYZX8A==\ndependencies:\n- loader-utils \"^1.1.0\"\n- mime \"^2.0.3\"\n- schema-utils \"^1.0.0\"\n+ loader-utils \"^1.2.3\"\n+ mime \"^2.4.4\"\n+ schema-utils \"^2.0.0\"\nurl-parse-lax@^1.0.0:\nversion \"1.0.0\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Update several Webpack loaders