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,203
26.08.2022 16:38:56
14,400
08dfbbfd79e7bb0a8714296e7d99c40e11e3af5d
[native] Use `values(...)` in `InputStateContainer` Summary: Saw [[ | comment ]] on D4892. Test Plan: Flow, close reading. Reviewers: atul, tomek Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "native/input/input-state-container.react.js", "new_path": "native/input/input-state-container.react.js", "diff": "@@ -77,6 +77,7 @@ import type {\nFetchJSONOptions,\nFetchJSONServerResponse,\n} from 'lib/utils/fetch-json';\n+import { values } from 'lib/utils/objects';\nimport { useIsReportEnabled } from 'lib/utils/report-utils';\nimport { disposeTempFile } from '../media/file-utils';\n@@ -371,12 +372,9 @@ class InputStateContainer extends React.PureComponent<Props, State> {\nreturn true;\n}\nconst { pendingUploads } = this.state;\n- return Object.keys(pendingUploads).some(localMessageID => {\n- const messagePendingUploads = pendingUploads[localMessageID];\n- return Object.keys(messagePendingUploads).some(\n- localUploadID => !messagePendingUploads[localUploadID].failed,\n+ return values(pendingUploads).some(messagePendingUploads =>\n+ values(messagePendingUploads).some(upload => !upload.failed),\n);\n- });\n};\nsendTextMessage = async (\n@@ -972,9 +970,7 @@ class InputStateContainer extends React.PureComponent<Props, State> {\nif (!pendingUploads) {\nreturn false;\n}\n- return Object.keys(pendingUploads).some(\n- localUploadID => pendingUploads[localUploadID].failed,\n- );\n+ return values(pendingUploads).some(upload => upload.failed);\n};\naddReply = (message: string) => {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Use `values(...)` in `InputStateContainer` Summary: Saw @ashoat's [[ https://phab.comm.dev/D4892?id=15798#inline-31980 | comment ]] on D4892. Test Plan: Flow, close reading. Reviewers: atul, tomek Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4961
129,184
22.08.2022 18:25:05
14,400
6a02276242fdb9971428676e0ef51971705a3d70
[native] Rename callbacks in `InputStateContainer:uploadFile` for clarity Summary: The `fail(...)` and `finish(...)` naming was confusing both when defined and at callsites. I think switching the naming to `onUpload[Finished/Failed]` makes things clearer. Test Plan: This is a noop, no functional change. Reviewers: abosh, varun, tomek, jacek Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "native/input/input-state-container.react.js", "new_path": "native/input/input-state-container.react.js", "diff": "@@ -596,7 +596,7 @@ class InputStateContainer extends React.PureComponent<Props, State> {\nlet errorMessage;\nlet reportPromise;\n- const finish = async (result: MediaMissionResult) => {\n+ const onUploadFinished = async (result: MediaMissionResult) => {\nif (!this.props.mediaReportsEnabled) {\nreturn errorMessage;\n}\n@@ -612,7 +612,7 @@ class InputStateContainer extends React.PureComponent<Props, State> {\n);\nreturn errorMessage;\n};\n- const fail = (mediaID: string, message: string) => {\n+ const onUploadFailed = (mediaID: string, message: string) => {\nerrorMessage = message;\nthis.handleUploadFailure(localMessageID, mediaID);\nuserTime = Date.now() - start;\n@@ -632,13 +632,13 @@ class InputStateContainer extends React.PureComponent<Props, State> {\nprocessResult.reason === 'video_too_long'\n? `can't do vids longer than ${videoDurationLimit}min`\n: 'processing failed';\n- fail(localMediaID, message);\n- return await finish(processResult);\n+ onUploadFailed(localMediaID, message);\n+ return await onUploadFinished(processResult);\n}\nprocessedMedia = processResult;\n} catch (e) {\n- fail(localMediaID, 'processing failed');\n- return await finish({\n+ onUploadFailed(localMediaID, 'processing failed');\n+ return await onUploadFinished({\nsuccess: false,\nreason: 'processing_exception',\ntime: Date.now() - processingStart,\n@@ -672,7 +672,7 @@ class InputStateContainer extends React.PureComponent<Props, State> {\nmediaMissionResult = { success: true };\n} catch (e) {\nuploadExceptionMessage = getMessageForException(e);\n- fail(localMediaID, 'upload failed');\n+ onUploadFailed(localMediaID, 'upload failed');\nmediaMissionResult = {\nsuccess: false,\nreason: 'http_upload_failed',\n@@ -775,7 +775,7 @@ class InputStateContainer extends React.PureComponent<Props, State> {\nawait Promise.all(promises);\n- return await finish(mediaMissionResult);\n+ return await onUploadFinished(mediaMissionResult);\n}\nmediaProcessConfig(localMessageID: string, localID: string) {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Rename callbacks in `InputStateContainer:uploadFile` for clarity Summary: The `fail(...)` and `finish(...)` naming was confusing both when defined and at callsites. I think switching the naming to `onUpload[Finished/Failed]` makes things clearer. Test Plan: This is a noop, no functional change. Reviewers: abosh, varun, tomek, jacek Reviewed By: abosh Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4900
129,184
29.08.2022 18:20:59
14,400
16897bd6ff2de6cf9e5c456f6ca4356519fec38e
[native] Rename `promises` to `cleanupPromises` at end of uploadFile(...) Summary: There are a lot of promises in `uploadFile(...)`... figured giving this "section" of them a more descriptive name. Depends on D4980 Test Plan: NA, simple rename Reviewers: abosh, jacek, tomek, ashoat
[ { "change_type": "MODIFY", "old_path": "native/input/input-state-container.react.js", "new_path": "native/input/input-state-container.react.js", "diff": "@@ -721,14 +721,14 @@ class InputStateContainer extends React.PureComponent<Props, State> {\nhasWiFi,\n});\n- const promises = [];\n+ const cleanupPromises = [];\nif (shouldDisposePath) {\n// If processMedia needed to do any transcoding before upload, we dispose\n// of the resultant temporary file here. Since the transcoded temporary\n// file is only used for upload, we can dispose of it after processMedia\n// (reportPromise) and the upload are complete\n- promises.push(\n+ cleanupPromises.push(\n(async () => {\nconst disposeStep = await disposeTempFile(shouldDisposePath);\nsteps.push(disposeStep);\n@@ -740,7 +740,7 @@ class InputStateContainer extends React.PureComponent<Props, State> {\n// instead of in media-utils, will be changed in later diffs\nif (processedMedia.mediaType === 'video') {\nconst { uploadThumbnailURI } = processedMedia;\n- promises.push(\n+ cleanupPromises.push(\n(async () => {\nconst disposeStep = await disposeTempFile(uploadThumbnailURI);\nsteps.push(disposeStep);\n@@ -757,7 +757,7 @@ class InputStateContainer extends React.PureComponent<Props, State> {\n// be replaced with the remote URI before we can dispose. Check out the\n// Multimedia component to see how the URIs get switched out.\nconst captureURI = selection.uri;\n- promises.push(\n+ cleanupPromises.push(\n(async () => {\nconst {\nsteps: clearSteps,\n@@ -773,7 +773,7 @@ class InputStateContainer extends React.PureComponent<Props, State> {\n);\n}\n- await Promise.all(promises);\n+ await Promise.all(cleanupPromises);\nreturn await onUploadFinished(mediaMissionResult);\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Rename `promises` to `cleanupPromises` at end of uploadFile(...) Summary: There are a lot of promises in `uploadFile(...)`... figured giving this "section" of them a more descriptive name. --- Depends on D4980 Test Plan: NA, simple rename Reviewers: abosh, jacek, tomek, ashoat Reviewed By: abosh Differential Revision: https://phab.comm.dev/D4981
129,196
31.08.2022 11:02:50
-7,200
db29683e6497726600de9257143df78b29bb8890
[native] codeVersion -> 143
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -434,8 +434,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 142\n- versionName '1.0.142'\n+ versionCode 143\n+ versionName '1.0.143'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{142};\n+ const int codeVersion{143};\nstd::shared_ptr<WorkerThread> databaseThread;\nstd::unique_ptr<WorkerThread> cryptoThread;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.142</string>\n+ <string>1.0.143</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>142</string>\n+ <string>143</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.142</string>\n+ <string>1.0.143</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>142</string>\n+ <string>143</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] codeVersion -> 143
129,185
05.09.2022 09:48:34
-7,200
952451feac8e473358f0139ca9721eaeeee41f5c
[web] Introduce `onMouse` calbacks for tooltip component in `TooltipContext` Summary: Intrroducing mause actions callbacks on tooltip component, to correctly handle clearing the tooltip. Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/chat/tooltip-provider.js", "new_path": "web/chat/tooltip-provider.js", "diff": "@@ -6,6 +6,7 @@ import * as React from 'react';\nimport type { TooltipPositionStyle } from './tooltip-utils';\nconst onMouseLeaveSourceDisappearTimeoutMs = 200;\n+const onMouseLeaveTooltipDisappearTimeoutMs = 100;\nexport type RenderTooltipParams = {\n+newNode: React.Node,\n@@ -96,10 +97,20 @@ function TooltipProvider(props: Props): React.Node {\n);\n// eslint-disable-next-line no-unused-vars\n- const onMouseEnterTooltip = React.useCallback(() => {}, []);\n+ const onMouseEnterTooltip = React.useCallback(() => {\n+ if (tooltipSymbol.current) {\n+ clearTimeout(tooltipCancelTimer.current);\n+ }\n+ }, []);\n// eslint-disable-next-line no-unused-vars\n- const onMouseLeaveTooltip = React.useCallback(() => {}, []);\n+ const onMouseLeaveTooltip = React.useCallback(() => {\n+ const timer = setTimeout(\n+ clearCurrentTooltip,\n+ onMouseLeaveTooltipDisappearTimeoutMs,\n+ );\n+ tooltipCancelTimer.current = timer;\n+ }, [clearCurrentTooltip]);\nconst tooltip = React.useMemo(() => {}, []);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Introduce `onMouse` calbacks for tooltip component in `TooltipContext` Summary: Intrroducing mause actions callbacks on tooltip component, to correctly handle clearing the tooltip. Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Reviewed By: tomek, atul Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4910
129,185
05.09.2022 09:48:34
-7,200
411deb4acee0b95aa3d953a5d688428c29d0062e
[web] Introduce tooltip container with positioning in `TooltipContext` Summary: Introduce tooltip container that displays tooltip in correct position depending on provided tooltip style object Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/chat/tooltip-provider.js", "new_path": "web/chat/tooltip-provider.js", "diff": "// @flow\n+import classNames from 'classnames';\nimport invariant from 'invariant';\nimport * as React from 'react';\nimport type { TooltipPositionStyle } from './tooltip-utils';\n+import css from './tooltip.css';\nconst onMouseLeaveSourceDisappearTimeoutMs = 200;\nconst onMouseLeaveTooltipDisappearTimeoutMs = 100;\n@@ -112,7 +114,37 @@ function TooltipProvider(props: Props): React.Node {\ntooltipCancelTimer.current = timer;\n}, [clearCurrentTooltip]);\n- const tooltip = React.useMemo(() => {}, []);\n+ const tooltip = React.useMemo(() => {\n+ if (!tooltipNode || !tooltipPosition) {\n+ return null;\n+ }\n+ const tooltipContainerStyle = {\n+ position: 'absolute',\n+ top: tooltipPosition.yCoord,\n+ left: tooltipPosition.xCoord,\n+ };\n+\n+ const { verticalPosition, horizontalPosition } = tooltipPosition;\n+\n+ const tooltipClassName = classNames(css.tooltipAbsolute, {\n+ [css.tooltipAbsoluteLeft]: horizontalPosition === 'right',\n+ [css.tooltipAbsoluteRight]: horizontalPosition === 'left',\n+ [css.tooltipAbsoluteTop]: verticalPosition === 'bottom',\n+ [css.tooltipAbsoluteBottom]: verticalPosition === 'top',\n+ });\n+\n+ return (\n+ <div style={tooltipContainerStyle}>\n+ <div\n+ className={tooltipClassName}\n+ onMouseEnter={onMouseEnterTooltip}\n+ onMouseLeave={onMouseLeaveTooltip}\n+ >\n+ {tooltipNode}\n+ </div>\n+ </div>\n+ );\n+ }, [onMouseEnterTooltip, onMouseLeaveTooltip, tooltipNode, tooltipPosition]);\nconst value = React.useMemo(\n() => ({\n" }, { "change_type": "MODIFY", "old_path": "web/chat/tooltip.css", "new_path": "web/chat/tooltip.css", "diff": "@@ -46,3 +46,23 @@ div.messageTimestampTooltip {\noverflow: auto;\nmin-width: 72px;\n}\n+\n+div.tooltipAbsolute {\n+ position: absolute;\n+}\n+\n+div.tooltipAbsoluteLeft {\n+ left: 0;\n+}\n+\n+div.tooltipAbsoluteRight {\n+ right: 0;\n+}\n+\n+div.tooltipAbsoluteTop {\n+ top: 0;\n+}\n+\n+div.tooltipAbsoluteBottom {\n+ bottom: 0;\n+}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Introduce tooltip container with positioning in `TooltipContext` Summary: Introduce tooltip container that displays tooltip in correct position depending on provided tooltip style object Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Reviewed By: tomek, atul Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4911
129,185
05.09.2022 09:48:34
-7,200
36b1f6c71dcbcd90f21c8fef757aed8fb26d5291
[web] Refactor `MessageTooltip` component Summary: Major refactor of MessageTooltip that simplifies the component leaving only necessary properties and removing positioning logic out of the component The new component: {F146979} Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Subscribers: ashoat
[ { "change_type": "ADD", "old_path": null, "new_path": "web/chat/chat-constants.js", "diff": "+// @flow\n+\n+export const tooltipStyle = {\n+ paddingLeft: 5,\n+ paddingRight: 5,\n+ rowGap: 3,\n+};\n+\n+export const tooltipLabelStyle = {\n+ padding: 6,\n+ height: 20,\n+};\n+export const tooltipButtonStyle = {\n+ paddingLeft: 6,\n+ paddingRight: 6,\n+ width: 30,\n+ height: 38,\n+};\n" }, { "change_type": "MODIFY", "old_path": "web/chat/composed-message.react.js", "new_path": "web/chat/composed-message.react.js", "diff": "@@ -124,31 +124,12 @@ class ComposedMessage extends React.PureComponent<Props> {\nthis.props.mouseOverMessagePosition.item.messageInfo.id === id &&\n(this.props.sidebarExistsOrCanBeCreated || this.props.canReply)\n) {\n+ // eslint-disable-next-line no-unused-vars\nconst availableTooltipPositions = isViewer\n? availableTooltipPositionsForViewerMessage\n: availableTooltipPositionsForNonViewerMessage;\n- const messageTooltipProps = {\n- threadInfo,\n- item,\n- availableTooltipPositions,\n- mouseOverMessagePosition: this.props.mouseOverMessagePosition,\n- };\n-\n- if (this.props.canReply) {\n- messageTooltip = (\n- <MessageTooltip\n- {...messageTooltipProps}\n- canReply={true}\n- setMouseOverMessagePosition={this.props.setMouseOverMessagePosition}\n- inputState={this.props.inputState}\n- />\n- );\n- } else {\n- messageTooltip = (\n- <MessageTooltip {...messageTooltipProps} canReply={false} />\n- );\n- }\n+ messageTooltip = <MessageTooltip messageTimestamp=\"\" actions={[]} />;\n}\nlet messageTooltipLinks;\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message-tooltip.css", "new_path": "web/chat/message-tooltip.css", "diff": "+div.messageTooltipContainer {\n+ display: flex;\n+ flex-direction: column;\n+ align-items: center;\n+ font-size: var(--s-font-14);\n+}\n+\ndiv.messageActionContainer {\ndisplay: flex;\nflex-direction: row;\nalign-items: center;\njustify-content: center;\n- padding: 0 6px;\nbackground-color: var(--message-action-tooltip-bg);\nborder-radius: 8px;\nwidth: fit-content;\n@@ -17,66 +23,38 @@ div.messageActionButtons svg {\npadding: 10px 6px 6px;\ncolor: var(--color-disabled);\n}\n+\ndiv.messageActionButtons svg:hover {\ncursor: pointer;\ncolor: var(--fg);\n}\n-div.messageActionButtonsViewer {\n- flex-direction: row;\n- margin-left: auto;\n- margin-right: 0;\n-}\n-div.messageActionButtonsNonViewer {\n- flex-direction: row-reverse;\n- margin-left: 0;\n- margin-right: auto;\n-}\n-div.messageActionLinkIcon {\n- margin: 0 3px;\n- position: relative;\n-}\n-div.messageActionExtraAreaTop:before {\n- height: 15px;\n- width: 55px;\n- content: '';\n- position: absolute;\n- bottom: -15px;\n-}\n-div.messageActionExtraAreaTopRight:before {\n- right: 0;\n-}\n-div.messageActionExtraAreaTopLeft:before {\n- left: 0;\n-}\n-div.messageActionExtraArea:before {\n- height: 30px;\n- width: 20px;\n- content: '';\n- position: absolute;\n-}\n-div.messageActionExtraAreaRight:before {\n- left: -20px;\n-}\n-div.messageActionExtraAreaLeft:before {\n- right: -20px;\n+\n+div.messageTooltipButton {\n+ display: flex;\n+ align-items: center;\n+ justify-content: center;\n}\n-div.messageActionTopRightTooltip {\n- bottom: 100%;\n- margin-bottom: 1px;\n- right: 0;\n+\n+div.messageTooltipLabel {\n+ display: flex;\n+ flex-direction: row;\n+ align-items: center;\n+ justify-content: center;\n+ background-color: var(--message-action-tooltip-bg);\n+ color: var(--tool-tip-color);\n+ border-radius: 8px;\n+ overflow: auto;\n+ white-space: nowrap;\n}\n-div.messageActionTopLeftTooltip {\n- bottom: 100%;\n- margin-bottom: 1px;\n- left: 0;\n+\n+div.leftTooltipAlign {\n+ align-items: flex-start;\n}\n-div.messageActionLeftTooltip {\n- top: 50%;\n- right: 100%;\n- margin-right: 7px;\n+\n+div.centerTooltipAlign {\n+ align-items: center;\n}\n-div.messageActionRightTooltip {\n- top: 50%;\n- left: 100%;\n- margin-left: 7px;\n+\n+div.rightTooltipAlign {\n+ align-items: flex-end;\n}\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message-tooltip.react.js", "new_path": "web/chat/message-tooltip.react.js", "diff": "// @flow\nimport classNames from 'classnames';\n-import invariant from 'invariant';\nimport * as React from 'react';\n-import type { ChatMessageInfoItem } from 'lib/selectors/chat-selectors';\n-import { useSidebarExistsOrCanBeCreated } from 'lib/shared/thread-utils';\n-import type { ThreadInfo } from 'lib/types/thread-types';\n-\n-import CommIcon from '../CommIcon.react.js';\n-import type { InputState } from '../input/input-state';\nimport {\n- useOnClickThread,\n- useOnClickPendingSidebar,\n-} from '../selectors/nav-selectors';\n-import MessageReplyButton from './message-reply-button.react';\n+ tooltipButtonStyle,\n+ tooltipLabelStyle,\n+ tooltipStyle,\n+} from './chat-constants';\nimport css from './message-tooltip.css';\n-import type {\n- ItemAndContainerPositionInfo,\n- MessagePositionInfo,\n- OnMessagePositionWithContainerInfo,\n- PositionInfo,\n-} from './position-types';\n-import { tooltipPositions, type TooltipPosition } from './tooltip-utils';\n-import {\n- TooltipMenu,\n- type TooltipStyle,\n- TooltipTextItem,\n-} from './tooltip.react';\n-\n-const messageActionIconExcessVerticalWhitespace = 10;\n-\n-const openSidebarText = 'Go to thread';\n-const createSidebarText = 'Create thread';\n+import { type MessageTooltipAction } from './tooltip-utils';\n-type TooltipType = 'sidebar' | 'reply';\n-\n-type BaseMessageTooltipProps = {\n- +threadInfo: ThreadInfo,\n- +item: ChatMessageInfoItem,\n- +availableTooltipPositions: $ReadOnlyArray<TooltipPosition>,\n- +mouseOverMessagePosition: OnMessagePositionWithContainerInfo,\n-};\n-type MessageTooltipProps =\n- | {\n- ...BaseMessageTooltipProps,\n- +canReply: false,\n- }\n- | {\n- ...BaseMessageTooltipProps,\n- +canReply: true,\n- +inputState: ?InputState,\n- +setMouseOverMessagePosition: (\n- messagePositionInfo: MessagePositionInfo,\n- ) => void,\n+type MessageTooltipProps = {\n+ +actions: $ReadOnlyArray<MessageTooltipAction>,\n+ +messageTimestamp: string,\n+ +alignment?: 'left' | 'center' | 'right',\n};\nfunction MessageTooltip(props: MessageTooltipProps): React.Node {\n- const {\n- threadInfo,\n- item,\n- availableTooltipPositions,\n- mouseOverMessagePosition,\n- canReply,\n- } = props;\n-\n- const { containerPosition } = mouseOverMessagePosition;\n-\n- const [activeTooltip, setActiveTooltip] = React.useState<?TooltipType>();\n- const [pointingTo, setPointingTo] = React.useState();\n-\n- const showTooltip = React.useCallback(\n- (tooltipType: TooltipType, iconPosition: ItemAndContainerPositionInfo) => {\n- if (activeTooltip) {\n- return;\n- }\n- setActiveTooltip(tooltipType);\n- setPointingTo(iconPosition);\n- },\n- [activeTooltip],\n- );\n-\n- const hideTooltip = React.useCallback(() => {\n- setActiveTooltip(null);\n- }, []);\n-\n- const showSidebarTooltip = React.useCallback(\n- (event: SyntheticEvent<HTMLDivElement>) => {\n- const rect = event.currentTarget.getBoundingClientRect();\n- const iconPosition = getIconPosition(rect, containerPosition);\n- showTooltip('sidebar', iconPosition);\n- },\n- [containerPosition, showTooltip],\n- );\n-\n- const showReplyTooltip = React.useCallback(\n- (event: SyntheticEvent<HTMLDivElement>) => {\n- const rect = event.currentTarget.getBoundingClientRect();\n- const iconPosition = getIconPosition(rect, containerPosition);\n- showTooltip('reply', iconPosition);\n- },\n- [containerPosition, showTooltip],\n+ const { actions, messageTimestamp, alignment = 'left' } = props;\n+ const [activeTooltipLabel, setActiveTooltipLabel] = React.useState<?string>();\n+ const messageActionButtonsContainerClassName = classNames(\n+ css.messageActionContainer,\n+ css.messageActionButtons,\n);\n- const { threadCreatedFromMessage, messageInfo } = item;\n+ const messageTooltipButtonStyle = React.useMemo(() => tooltipButtonStyle, []);\n- const onThreadOpen = useOnClickThread(threadCreatedFromMessage);\n- const onPendingSidebarOpen = useOnClickPendingSidebar(\n- messageInfo,\n- threadInfo,\n- );\n- const onSidebarButtonClick = React.useCallback(\n- (event: SyntheticEvent<HTMLButtonElement>) => {\n- if (threadCreatedFromMessage) {\n- onThreadOpen(event);\n- } else {\n- onPendingSidebarOpen(event);\n+ const tooltipButtons = React.useMemo(() => {\n+ if (!actions || actions.length === 0) {\n+ return null;\n}\n- },\n- [onPendingSidebarOpen, onThreadOpen, threadCreatedFromMessage],\n+ const buttons = actions.map(({ label, onClick, actionButtonContent }) => {\n+ const onMouseEnter = () => {\n+ setActiveTooltipLabel(label);\n+ };\n+ const onMouseLeave = () =>\n+ setActiveTooltipLabel(oldLabel =>\n+ label === oldLabel ? null : oldLabel,\n);\n- const setMouseOverMessagePosition = props.canReply\n- ? props.setMouseOverMessagePosition\n- : null;\n-\n- const onReplyButtonClick = React.useCallback(() => {\n- setMouseOverMessagePosition?.({\n- type: 'off',\n- item: item,\n- });\n- }, [item, setMouseOverMessagePosition]);\n-\n- let tooltipText = '';\n- if (activeTooltip === 'reply') {\n- tooltipText = 'Reply';\n- } else if (activeTooltip === 'sidebar') {\n- tooltipText = threadCreatedFromMessage\n- ? openSidebarText\n- : createSidebarText;\n- }\n-\n- let tooltipMenu = null;\n- if (pointingTo && activeTooltip) {\n- tooltipMenu = (\n- <TooltipMenu\n- availableTooltipPositions={availableTooltipPositions}\n- targetPositionInfo={pointingTo}\n- layoutPosition=\"relative\"\n- getStyle={getMessageActionTooltipStyle}\n- >\n- <TooltipTextItem text={tooltipText} />\n- </TooltipMenu>\n- );\n- }\n-\n- let replyButton;\n- if (canReply) {\n- invariant(props.inputState, 'inputState must be set if replyButton exists');\n- replyButton = (\n+ return (\n<div\n- className={css.messageActionLinkIcon}\n- onMouseEnter={showReplyTooltip}\n- onMouseLeave={hideTooltip}\n+ onMouseEnter={onMouseEnter}\n+ onMouseLeave={onMouseLeave}\n+ key={label}\n+ onClick={onClick}\n+ style={messageTooltipButtonStyle}\n+ className={css.messageTooltipButton}\n>\n- <MessageReplyButton\n- messagePositionInfo={mouseOverMessagePosition}\n- onReplyClick={onReplyButtonClick}\n- inputState={props.inputState}\n- />\n- {activeTooltip === 'reply' ? tooltipMenu : null}\n+ {actionButtonContent}\n</div>\n);\n- }\n-\n- const sidebarExistsOrCanBeCreated = useSidebarExistsOrCanBeCreated(\n- threadInfo,\n- item,\n+ });\n+ return (\n+ <div className={messageActionButtonsContainerClassName}>{buttons}</div>\n);\n-\n- let sidebarButton;\n- if (sidebarExistsOrCanBeCreated) {\n- sidebarButton = (\n- <div\n- className={css.messageActionLinkIcon}\n- onMouseEnter={showSidebarTooltip}\n- onMouseLeave={hideTooltip}\n- onClick={onSidebarButtonClick}\n- >\n- <CommIcon icon=\"sidebar-filled\" size={16} />\n- {activeTooltip === 'sidebar' ? tooltipMenu : null}\n- </div>\n+ }, [\n+ actions,\n+ messageActionButtonsContainerClassName,\n+ messageTooltipButtonStyle,\n+ ]);\n+\n+ const messageTooltipLabelStyle = React.useMemo(() => tooltipLabelStyle, []);\n+ const messageTooltipTopLabelStyle = React.useMemo(\n+ () => ({\n+ height: `${tooltipLabelStyle.height + 2 * tooltipLabelStyle.padding}px`,\n+ }),\n+ [],\n);\n- }\n- const { isViewer } = messageInfo.creator;\n- const messageActionButtonsContainerClassName = classNames({\n- [css.messageActionContainer]: true,\n- [css.messageActionButtons]: true,\n- [css.messageActionButtonsViewer]: isViewer,\n- [css.messageActionButtonsNonViewer]: !isViewer,\n- });\n+ const tooltipLabel = React.useMemo(() => {\n+ if (!activeTooltipLabel) {\n+ return null;\n+ }\nreturn (\n- <div>\n- <div className={messageActionButtonsContainerClassName}>\n- {sidebarButton}\n- {replyButton}\n- </div>\n+ <div className={css.messageTooltipLabel} style={messageTooltipLabelStyle}>\n+ {activeTooltipLabel}\n</div>\n);\n-}\n+ }, [activeTooltipLabel, messageTooltipLabelStyle]);\n-function getIconPosition(\n- rect: ClientRect,\n- containerPosition: PositionInfo,\n-): ItemAndContainerPositionInfo {\n- const { top, bottom, left, right, width, height } = rect;\n- return {\n- containerPosition,\n- itemPosition: {\n- top:\n- top - containerPosition.top + messageActionIconExcessVerticalWhitespace,\n- bottom:\n- bottom -\n- containerPosition.top -\n- messageActionIconExcessVerticalWhitespace,\n- left: left - containerPosition.left,\n- right: right - containerPosition.left,\n- width,\n- height: height - messageActionIconExcessVerticalWhitespace * 2,\n- },\n- };\n+ const tooltipTimestamp = React.useMemo(() => {\n+ if (!messageTimestamp) {\n+ return null;\n}\n-\n-function getMessageActionTooltipStyle(\n- tooltipPosition: TooltipPosition,\n-): TooltipStyle {\n- let className;\n- if (tooltipPosition === tooltipPositions.TOP_RIGHT) {\n- className = classNames(\n- css.messageActionTopRightTooltip,\n- css.messageActionExtraAreaTop,\n- css.messageActionExtraAreaTopRight,\n- );\n- } else if (tooltipPosition === tooltipPositions.TOP_LEFT) {\n- className = classNames(\n- css.messageActionTopLeftTooltip,\n- css.messageActionExtraAreaTop,\n- css.messageActionExtraAreaTopLeft,\n- );\n- } else if (tooltipPosition === tooltipPositions.RIGHT) {\n- className = classNames(\n- css.messageActionRightTooltip,\n- css.messageActionExtraArea,\n- css.messageActionExtraAreaRight,\n+ return (\n+ <div className={css.messageTooltipLabel} style={messageTooltipLabelStyle}>\n+ {messageTimestamp}\n+ </div>\n);\n- } else if (tooltipPosition === tooltipPositions.LEFT) {\n- className = classNames(\n- css.messageActionLeftTooltip,\n- css.messageActionExtraArea,\n- css.messageActionExtraAreaLeft,\n+ }, [messageTimestamp, messageTooltipLabelStyle]);\n+\n+ const messageTooltipContainerStyle = React.useMemo(() => tooltipStyle, []);\n+\n+ const containerClassNames = React.useMemo(\n+ () =>\n+ classNames(css.messageTooltipContainer, {\n+ [css.leftTooltipAlign]: alignment === 'left',\n+ [css.centerTooltipAlign]: alignment === 'center',\n+ [css.rightTooltipAlign]: alignment === 'right',\n+ }),\n+ [alignment],\n);\n- }\n- invariant(className, `${tooltipPosition} is not valid for message tooltip`);\n- return { className };\n+ return (\n+ <div className={containerClassNames} style={messageTooltipContainerStyle}>\n+ <div style={messageTooltipTopLabelStyle}>{tooltipLabel}</div>\n+ {tooltipButtons}\n+ {tooltipTimestamp}\n+ </div>\n+ );\n}\nexport default MessageTooltip;\n" }, { "change_type": "MODIFY", "old_path": "web/chat/robotext-message.react.js", "new_path": "web/chat/robotext-message.react.js", "diff": "@@ -24,6 +24,7 @@ import type {\nimport css from './robotext-message.css';\nimport { tooltipPositions } from './tooltip-utils';\n+// eslint-disable-next-line no-unused-vars\nconst availableTooltipPositionsForRobotext = [\ntooltipPositions.TOP_RIGHT,\ntooltipPositions.RIGHT,\n@@ -57,7 +58,7 @@ class RobotextMessage extends React.PureComponent<Props> {\n);\n}\n- const { item, threadInfo, sidebarExistsOrCanBeCreated } = this.props;\n+ const { item, sidebarExistsOrCanBeCreated } = this.props;\nconst { id } = item.messageInfo;\nlet messageTooltip;\nif (\n@@ -65,15 +66,7 @@ class RobotextMessage extends React.PureComponent<Props> {\nthis.props.mouseOverMessagePosition.item.messageInfo.id === id &&\nsidebarExistsOrCanBeCreated\n) {\n- messageTooltip = (\n- <MessageTooltip\n- threadInfo={threadInfo}\n- item={item}\n- mouseOverMessagePosition={this.props.mouseOverMessagePosition}\n- availableTooltipPositions={availableTooltipPositionsForRobotext}\n- canReply={false}\n- />\n- );\n+ messageTooltip = <MessageTooltip messageTimestamp=\"\" actions={[]} />;\n}\nlet messageTooltipLinks;\n" }, { "change_type": "MODIFY", "old_path": "web/chat/tooltip-utils.js", "new_path": "web/chat/tooltip-utils.js", "diff": "// @flow\nimport invariant from 'invariant';\n+import * as React from 'react';\nimport { calculateMaxTextWidth } from '../utils/text-utils';\nimport type { ItemAndContainerPositionInfo } from './position-types';\n@@ -24,6 +25,12 @@ export type TooltipPositionStyle = {\nexport type TooltipPosition = $Values<typeof tooltipPositions>;\n+export type MessageTooltipAction = {\n+ +label: string,\n+ +onClick: (SyntheticEvent<HTMLDivElement>) => mixed,\n+ +actionButtonContent: React.Node,\n+};\n+\nconst sizeOfTooltipArrow = 10; // 7px arrow + 3px extra\nconst tooltipMenuItemHeight = 22; // 17px line-height + 5px padding bottom\nconst tooltipInnerTopPadding = 5; // 5px bottom is included in last item\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Refactor `MessageTooltip` component Summary: Major refactor of MessageTooltip that simplifies the component leaving only necessary properties and removing positioning logic out of the component The new component: {F146979} Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Reviewed By: tomek, abosh Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4912
129,185
05.09.2022 09:48:34
-7,200
7b34eea1a23176cf7dd1bda722b9f03b09aee088
[web] Introduce `calculateTooltipSize` util function Summary: Introduce calculation of tooltip size basing on labels size and number of actions inside. Some parts of this logic was in `findTooltipPosition` before Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/chat/tooltip-utils.js", "new_path": "web/chat/tooltip-utils.js", "diff": "import * as React from 'react';\n+import { calculateMaxTextWidth } from '../utils/text-utils';\n+import {\n+ tooltipButtonStyle,\n+ tooltipLabelStyle,\n+ tooltipStyle,\n+} from './chat-constants';\nimport type { PositionInfo } from './position-types';\nexport const tooltipPositions = Object.freeze({\n@@ -39,9 +45,8 @@ export type MessageTooltipAction = {\nconst sizeOfTooltipArrow = 10; // 7px arrow + 3px extra\nconst appTopBarHeight = 65;\n-// eslint-disable-next-line no-unused-vars\nconst font =\n- '14px -apple-system, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", ' +\n+ '14px \"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", ' +\n'\"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", ui-sans-serif';\ntype FindTooltipPositionArgs = {\n@@ -173,5 +178,38 @@ function findTooltipPosition({\n}\nreturn defaultPosition;\n}\n+type CalculateTooltipSizeArgs = {\n+ +tooltipLabels: $ReadOnlyArray<string>,\n+ +timestamp: string,\n+};\n+\n+function calculateTooltipSize({\n+ tooltipLabels,\n+ timestamp,\n+}: CalculateTooltipSizeArgs): {\n+ +width: number,\n+ +height: number,\n+} {\n+ const textWidth =\n+ calculateMaxTextWidth([...tooltipLabels, timestamp], font) +\n+ 2 * tooltipLabelStyle.padding;\n+ const buttonsWidth =\n+ tooltipLabels.length *\n+ (tooltipButtonStyle.width +\n+ tooltipButtonStyle.paddingLeft +\n+ tooltipButtonStyle.paddingRight);\n+ const width =\n+ Math.max(textWidth, buttonsWidth) +\n+ tooltipStyle.paddingLeft +\n+ tooltipStyle.paddingRight;\n+ const height =\n+ (tooltipLabelStyle.height + 2 * tooltipLabelStyle.padding) * 2 +\n+ tooltipStyle.rowGap * 2 +\n+ tooltipButtonStyle.height;\n+ return {\n+ width,\n+ height,\n+ };\n+}\n-export { findTooltipPosition, sizeOfTooltipArrow };\n+export { findTooltipPosition, calculateTooltipSize, sizeOfTooltipArrow };\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Introduce `calculateTooltipSize` util function Summary: Introduce calculation of tooltip size basing on labels size and number of actions inside. Some parts of this logic was in `findTooltipPosition` before Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4914
129,185
05.09.2022 09:48:34
-7,200
be81697106d2b995f04943c545d83a1909312ce5
[web] Introduce `getMessageActionTooltipStyle` util function Summary: Introduce `getMessageActionTooltipStyle` to calculate style object for tooltip Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/chat/tooltip-utils.js", "new_path": "web/chat/tooltip-utils.js", "diff": "// @flow\n+import invariant from 'invariant';\nimport * as React from 'react';\nimport { calculateMaxTextWidth } from '../utils/text-utils';\n@@ -178,6 +179,98 @@ function findTooltipPosition({\n}\nreturn defaultPosition;\n}\n+\n+type GetMessageActionTooltipStyleParams = {\n+ +sourcePositionInfo: PositionInfo,\n+ +tooltipSize: TooltipSize,\n+ +tooltipPosition: TooltipPosition,\n+};\n+\n+function getMessageActionTooltipStyle({\n+ sourcePositionInfo,\n+ tooltipSize,\n+ tooltipPosition,\n+}: GetMessageActionTooltipStyleParams): TooltipPositionStyle {\n+ if (tooltipPosition === tooltipPositions.RIGHT_TOP) {\n+ return {\n+ xCoord: sourcePositionInfo.right,\n+ yCoord: sourcePositionInfo.top,\n+ horizontalPosition: 'right',\n+ verticalPosition: 'bottom',\n+ alignment: 'left',\n+ };\n+ } else if (tooltipPosition === tooltipPositions.LEFT_TOP) {\n+ return {\n+ xCoord: sourcePositionInfo.left,\n+ yCoord: sourcePositionInfo.top,\n+ horizontalPosition: 'left',\n+ verticalPosition: 'bottom',\n+ alignment: 'right',\n+ };\n+ } else if (tooltipPosition === tooltipPositions.RIGHT_BOTTOM) {\n+ return {\n+ xCoord: sourcePositionInfo.right,\n+ yCoord: sourcePositionInfo.bottom,\n+ horizontalPosition: 'right',\n+ verticalPosition: 'top',\n+ alignment: 'left',\n+ };\n+ } else if (tooltipPosition === tooltipPositions.LEFT_BOTTOM) {\n+ return {\n+ xCoord: sourcePositionInfo.left,\n+ yCoord: sourcePositionInfo.bottom,\n+ horizontalPosition: 'left',\n+ verticalPosition: 'top',\n+ alignment: 'right',\n+ };\n+ } else if (tooltipPosition === tooltipPositions.LEFT) {\n+ return {\n+ xCoord: sourcePositionInfo.left,\n+ yCoord:\n+ sourcePositionInfo.top +\n+ sourcePositionInfo.height / 2 -\n+ tooltipSize.height / 2,\n+ horizontalPosition: 'left',\n+ verticalPosition: 'bottom',\n+ alignment: 'right',\n+ };\n+ } else if (tooltipPosition === tooltipPositions.RIGHT) {\n+ return {\n+ xCoord: sourcePositionInfo.right,\n+ yCoord:\n+ sourcePositionInfo.top +\n+ sourcePositionInfo.height / 2 -\n+ tooltipSize.height / 2,\n+ horizontalPosition: 'right',\n+ verticalPosition: 'bottom',\n+ alignment: 'left',\n+ };\n+ } else if (tooltipPosition === tooltipPositions.TOP) {\n+ return {\n+ xCoord:\n+ sourcePositionInfo.left +\n+ sourcePositionInfo.width / 2 -\n+ tooltipSize.width / 2,\n+ yCoord: sourcePositionInfo.top,\n+ horizontalPosition: 'right',\n+ verticalPosition: 'top',\n+ alignment: 'center',\n+ };\n+ } else if (tooltipPosition === tooltipPositions.BOTTOM) {\n+ return {\n+ xCoord:\n+ sourcePositionInfo.left +\n+ sourcePositionInfo.width / 2 -\n+ tooltipSize.width / 2,\n+ yCoord: sourcePositionInfo.bottom,\n+ horizontalPosition: 'right',\n+ verticalPosition: 'bottom',\n+ alignment: 'center',\n+ };\n+ }\n+ invariant(false, `Unexpected tooltip position value: ${tooltipPosition}`);\n+}\n+\ntype CalculateTooltipSizeArgs = {\n+tooltipLabels: $ReadOnlyArray<string>,\n+timestamp: string,\n@@ -212,4 +305,9 @@ function calculateTooltipSize({\n};\n}\n-export { findTooltipPosition, calculateTooltipSize, sizeOfTooltipArrow };\n+export {\n+ findTooltipPosition,\n+ calculateTooltipSize,\n+ getMessageActionTooltipStyle,\n+ sizeOfTooltipArrow,\n+};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Introduce `getMessageActionTooltipStyle` util function Summary: Introduce `getMessageActionTooltipStyle` to calculate style object for tooltip Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4915
129,185
05.09.2022 09:48:34
-7,200
928a05031726662a0ed630f61b34fe316cf3a308
[web] Introduce `useMessageTooltipSidebarAction` hook Summary: Introduce tooltip action for "go to thread"/"create thread". Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/chat/tooltip-utils.js", "new_path": "web/chat/tooltip-utils.js", "diff": "import invariant from 'invariant';\nimport * as React from 'react';\n+import type { ChatMessageInfoItem } from 'lib/selectors/chat-selectors';\n+import { useSidebarExistsOrCanBeCreated } from 'lib/shared/thread-utils';\n+import type { ThreadInfo } from 'lib/types/thread-types';\n+\n+import CommIcon from '../CommIcon.react';\n+import {\n+ useOnClickPendingSidebar,\n+ useOnClickThread,\n+} from '../selectors/nav-selectors';\nimport { calculateMaxTextWidth } from '../utils/text-utils';\nimport {\ntooltipButtonStyle,\n@@ -305,9 +314,47 @@ function calculateTooltipSize({\n};\n}\n+function useMessageTooltipSidebarAction(\n+ item: ChatMessageInfoItem,\n+ threadInfo: ThreadInfo,\n+): ?MessageTooltipAction {\n+ const { threadCreatedFromMessage, messageInfo } = item;\n+ const sidebarExists = !!threadCreatedFromMessage;\n+ const sidebarExistsOrCanBeCreated = useSidebarExistsOrCanBeCreated(\n+ threadInfo,\n+ item,\n+ );\n+ const openThread = useOnClickThread(threadCreatedFromMessage);\n+ const openPendingSidebar = useOnClickPendingSidebar(messageInfo, threadInfo);\n+ return React.useMemo(() => {\n+ if (!sidebarExistsOrCanBeCreated) {\n+ return null;\n+ }\n+ const buttonContent = <CommIcon icon=\"sidebar-filled\" size={16} />;\n+ const onClick = (event: SyntheticEvent<HTMLElement>) => {\n+ if (threadCreatedFromMessage) {\n+ openThread(event);\n+ } else {\n+ openPendingSidebar(event);\n+ }\n+ };\n+ return {\n+ actionButtonContent: buttonContent,\n+ onClick,\n+ label: sidebarExists ? 'Go to thread' : 'Create thread',\n+ };\n+ }, [\n+ openPendingSidebar,\n+ openThread,\n+ sidebarExists,\n+ sidebarExistsOrCanBeCreated,\n+ threadCreatedFromMessage,\n+ ]);\n+}\nexport {\nfindTooltipPosition,\ncalculateTooltipSize,\ngetMessageActionTooltipStyle,\n+ useMessageTooltipSidebarAction,\nsizeOfTooltipArrow,\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Introduce `useMessageTooltipSidebarAction` hook Summary: Introduce tooltip action for "go to thread"/"create thread". Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4916
129,185
05.09.2022 09:48:34
-7,200
d1eb10a1786702189cd70d04900d5f47a2fd0f4a
[web] Introduce `useMessageTooltipReplyAction` hook Summary: Introduce tooltip action for "reply". Parts of logic has been moved from `message-reply-button` Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/chat/tooltip-utils.js", "new_path": "web/chat/tooltip-utils.js", "diff": "@@ -4,10 +4,17 @@ import invariant from 'invariant';\nimport * as React from 'react';\nimport type { ChatMessageInfoItem } from 'lib/selectors/chat-selectors';\n-import { useSidebarExistsOrCanBeCreated } from 'lib/shared/thread-utils';\n+import { createMessageReply } from 'lib/shared/message-utils';\n+import {\n+ threadHasPermission,\n+ useSidebarExistsOrCanBeCreated,\n+} from 'lib/shared/thread-utils';\n+import { isComposableMessageType } from 'lib/types/message-types';\nimport type { ThreadInfo } from 'lib/types/thread-types';\n+import { threadPermissions } from 'lib/types/thread-types';\nimport CommIcon from '../CommIcon.react';\n+import { InputStateContext } from '../input/input-state';\nimport {\nuseOnClickPendingSidebar,\nuseOnClickThread,\n@@ -351,10 +358,41 @@ function useMessageTooltipSidebarAction(\nthreadCreatedFromMessage,\n]);\n}\n+\n+function useMessageTooltipReplyAction(\n+ item: ChatMessageInfoItem,\n+ threadInfo: ThreadInfo,\n+): ?MessageTooltipAction {\n+ const { messageInfo } = item;\n+ const inputState = React.useContext(InputStateContext);\n+ invariant(inputState, 'inputState is required');\n+ const { addReply } = inputState;\n+ return React.useMemo(() => {\n+ if (\n+ !isComposableMessageType(item.messageInfo.type) ||\n+ !threadHasPermission(threadInfo, threadPermissions.VOICED)\n+ ) {\n+ return null;\n+ }\n+ const buttonContent = <CommIcon icon=\"reply-filled\" size={18} />;\n+ const onClick = () => {\n+ if (!messageInfo.text) {\n+ return;\n+ }\n+ addReply(createMessageReply(messageInfo.text));\n+ };\n+ return {\n+ actionButtonContent: buttonContent,\n+ onClick,\n+ label: 'Reply',\n+ };\n+ }, [addReply, item.messageInfo.type, messageInfo, threadInfo]);\n+}\nexport {\nfindTooltipPosition,\ncalculateTooltipSize,\ngetMessageActionTooltipStyle,\nuseMessageTooltipSidebarAction,\n+ useMessageTooltipReplyAction,\nsizeOfTooltipArrow,\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Introduce `useMessageTooltipReplyAction` hook Summary: Introduce tooltip action for "reply". Parts of logic has been moved from `message-reply-button` Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4917
129,185
05.09.2022 09:48:34
-7,200
44d4262ea03ea9d6a28995f80ebfd8cbdc4424e6
[web] Introduce `useMessageTooltipActions` hooks Summary: Introduce hooks return tooltip actions for robotext and composed message. Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/chat/tooltip-utils.js", "new_path": "web/chat/tooltip-utils.js", "diff": "@@ -388,11 +388,25 @@ function useMessageTooltipReplyAction(\n};\n}, [addReply, item.messageInfo.type, messageInfo, threadInfo]);\n}\n+\n+function useMessageTooltipActions(\n+ item: ChatMessageInfoItem,\n+ threadInfo: ThreadInfo,\n+): $ReadOnlyArray<MessageTooltipAction> {\n+ const sidebarAction = useMessageTooltipSidebarAction(item, threadInfo);\n+ const replyAction = useMessageTooltipReplyAction(item, threadInfo);\n+ return React.useMemo(() => [replyAction, sidebarAction].filter(Boolean), [\n+ replyAction,\n+ sidebarAction,\n+ ]);\n+}\n+\nexport {\nfindTooltipPosition,\ncalculateTooltipSize,\ngetMessageActionTooltipStyle,\nuseMessageTooltipSidebarAction,\nuseMessageTooltipReplyAction,\n+ useMessageTooltipActions,\nsizeOfTooltipArrow,\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Introduce `useMessageTooltipActions` hooks Summary: Introduce hooks return tooltip actions for robotext and composed message. Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4918
129,185
05.09.2022 09:48:34
-7,200
c12778cdcedd62a314db83b15c880fdd9c89b4c1
[web] Wrap app content with `TooltipProvider` Summary: Use `TooltipProvider` in main app component. Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/app.react.js", "new_path": "web/app.react.js", "diff": "@@ -26,6 +26,7 @@ import { registerConfig } from 'lib/utils/config';\nimport AppsDirectory from './apps/apps-directory.react';\nimport Calendar from './calendar/calendar.react';\nimport Chat from './chat/chat.react';\n+import { TooltipProvider } from './chat/tooltip-provider';\nimport NavigationArrows from './components/navigation-arrows.react';\nimport InputStateContainer from './input/input-state-container.react';\nimport LoadingIndicator from './loading-indicator.react';\n@@ -141,6 +142,7 @@ class App extends React.PureComponent<Props> {\n}\nreturn (\n<DndProvider backend={HTML5Backend}>\n+ <TooltipProvider>\n<MenuProvider>\n<FocusHandler />\n<VisibilityHandler />\n@@ -148,6 +150,7 @@ class App extends React.PureComponent<Props> {\n{content}\n{this.props.modals}\n</MenuProvider>\n+ </TooltipProvider>\n</DndProvider>\n);\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Wrap app content with `TooltipProvider` Summary: Use `TooltipProvider` in main app component. Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Reviewed By: tomek, atul Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4919
129,185
05.09.2022 09:48:34
-7,200
a7c1314455db294ddb4dbcfe723428ae19f56d04
[web] Use new tooltip in composed message Summary: Use new tooltip API in composed message. Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/chat/composed-message.react.js", "new_path": "web/chat/composed-message.react.js", "diff": "@@ -9,7 +9,6 @@ import {\n} from 'react-feather';\nimport { type ChatMessageInfoItem } from 'lib/selectors/chat-selectors';\n-import { useSidebarExistsOrCanBeCreated } from 'lib/shared/thread-utils';\nimport { stringForUser } from 'lib/shared/user-utils';\nimport { assertComposableMessageType } from 'lib/types/message-types';\nimport { type ThreadInfo } from 'lib/types/thread-types';\n@@ -18,31 +17,33 @@ import { type InputState, InputStateContext } from '../input/input-state';\nimport css from './chat-message-list.css';\nimport FailedSend from './failed-send.react';\nimport { InlineSidebar } from './inline-sidebar.react';\n-import MessageTooltip from './message-tooltip.react';\n-import {\n- type OnMessagePositionWithContainerInfo,\n- type MessagePositionInfo,\n-} from './position-types';\n-import { tooltipPositions } from './tooltip-utils';\n+import { tooltipPositions, useMessageTooltip } from './tooltip-utils';\nconst availableTooltipPositionsForViewerMessage = [\n- tooltipPositions.RIGHT_TOP,\ntooltipPositions.LEFT,\n+ tooltipPositions.LEFT_BOTTOM,\n+ tooltipPositions.LEFT_TOP,\n+ tooltipPositions.RIGHT,\n+ tooltipPositions.RIGHT_BOTTOM,\n+ tooltipPositions.RIGHT_TOP,\n+ tooltipPositions.BOTTOM,\n+ tooltipPositions.TOP,\n];\nconst availableTooltipPositionsForNonViewerMessage = [\n- tooltipPositions.LEFT_TOP,\ntooltipPositions.RIGHT,\n+ tooltipPositions.RIGHT_BOTTOM,\n+ tooltipPositions.RIGHT_TOP,\n+ tooltipPositions.LEFT,\n+ tooltipPositions.LEFT_BOTTOM,\n+ tooltipPositions.LEFT_TOP,\n+ tooltipPositions.BOTTOM,\n+ tooltipPositions.TOP,\n];\ntype BaseProps = {\n+item: ChatMessageInfoItem,\n+threadInfo: ThreadInfo,\n+sendFailed: boolean,\n- +setMouseOverMessagePosition: (\n- messagePositionInfo: MessagePositionInfo,\n- ) => void,\n- +mouseOverMessagePosition?: ?OnMessagePositionWithContainerInfo,\n- +canReply: boolean,\n+children: React.Node,\n+fixedWidth?: boolean,\n+borderRadius: number,\n@@ -50,10 +51,11 @@ type BaseProps = {\ntype BaseConfig = React.Config<BaseProps, typeof ComposedMessage.defaultProps>;\ntype Props = {\n...BaseProps,\n- // Redux state\n- +sidebarExistsOrCanBeCreated: boolean,\n// withInputState\n+inputState: ?InputState,\n+ +onMouseLeave: ?() => mixed,\n+ +onMouseEnter: (event: SyntheticEvent<HTMLDivElement>) => mixed,\n+ +containsInlineSidebar: boolean,\n};\nclass ComposedMessage extends React.PureComponent<Props> {\nstatic defaultProps: { +borderRadius: number } = {\n@@ -118,38 +120,8 @@ class ComposedMessage extends React.PureComponent<Props> {\n);\n}\n- let messageTooltip;\n- if (\n- this.props.mouseOverMessagePosition &&\n- this.props.mouseOverMessagePosition.item.messageInfo.id === id &&\n- (this.props.sidebarExistsOrCanBeCreated || this.props.canReply)\n- ) {\n- // eslint-disable-next-line no-unused-vars\n- const availableTooltipPositions = isViewer\n- ? availableTooltipPositionsForViewerMessage\n- : availableTooltipPositionsForNonViewerMessage;\n-\n- messageTooltip = <MessageTooltip messageTimestamp=\"\" actions={[]} />;\n- }\n-\n- let messageTooltipLinks;\n- if (messageTooltip) {\n- const tooltipLinksClassName = classNames({\n- [css.messageTooltipActiveArea]: true,\n- [css.viewerMessageTooltipActiveArea]: isViewer,\n- [css.nonViewerMessageActiveArea]: !isViewer,\n- });\n-\n- messageTooltipLinks = (\n- <div className={tooltipLinksClassName}>{messageTooltip}</div>\n- );\n- }\n-\n- const viewerTooltipLinks = isViewer ? messageTooltipLinks : null;\n- const nonViewerTooltipLinks = !isViewer ? messageTooltipLinks : null;\n-\nlet inlineSidebar = null;\n- if (item.threadCreatedFromMessage) {\n+ if (this.props.containsInlineSidebar && item.threadCreatedFromMessage) {\nconst positioning = isViewer ? 'right' : 'left';\ninlineSidebar = (\n<div className={css.sidebarMarginBottom}>\n@@ -167,14 +139,12 @@ class ComposedMessage extends React.PureComponent<Props> {\n<div className={contentClassName}>\n<div\nclassName={messageBoxContainerClassName}\n- onMouseEnter={this.onMouseEnter}\n- onMouseLeave={this.onMouseLeave}\n+ onMouseEnter={this.props.onMouseEnter}\n+ onMouseLeave={this.props.onMouseLeave}\n>\n- {viewerTooltipLinks}\n<div className={messageBoxClassName} style={messageBoxStyle}>\n{this.props.children}\n</div>\n- {nonViewerTooltipLinks}\n</div>\n{deliveryIcon}\n</div>\n@@ -183,23 +153,6 @@ class ComposedMessage extends React.PureComponent<Props> {\n</React.Fragment>\n);\n}\n-\n- onMouseEnter: (event: SyntheticEvent<HTMLDivElement>) => void = event => {\n- const { item } = this.props;\n- const rect = event.currentTarget.getBoundingClientRect();\n- const { top, bottom, left, right, height, width } = rect;\n- const messagePosition = { top, bottom, left, right, height, width };\n- this.props.setMouseOverMessagePosition({\n- type: 'on',\n- item,\n- messagePosition,\n- });\n- };\n-\n- onMouseLeave: () => void = () => {\n- const { item } = this.props;\n- this.props.setMouseOverMessagePosition({ type: 'off', item });\n- };\n}\ntype ConnectedConfig = React.Config<\n@@ -208,16 +161,27 @@ type ConnectedConfig = React.Config<\n>;\nconst ConnectedComposedMessage: React.ComponentType<ConnectedConfig> = React.memo<BaseConfig>(\nfunction ConnectedComposedMessage(props) {\n- const sidebarExistsOrCanBeCreated = useSidebarExistsOrCanBeCreated(\n- props.threadInfo,\n- props.item,\n- );\n+ const { item, threadInfo } = props;\nconst inputState = React.useContext(InputStateContext);\n+ const isViewer = props.item.messageInfo.creator.isViewer;\n+ const availablePositions = isViewer\n+ ? availableTooltipPositionsForViewerMessage\n+ : availableTooltipPositionsForNonViewerMessage;\n+ const containsInlineSidebar = !!item.threadCreatedFromMessage;\n+\n+ const { onMouseLeave, onMouseEnter } = useMessageTooltip({\n+ item,\n+ threadInfo,\n+ availablePositions,\n+ });\n+\nreturn (\n<ComposedMessage\n{...props}\n- sidebarExistsOrCanBeCreated={sidebarExistsOrCanBeCreated}\ninputState={inputState}\n+ onMouseLeave={onMouseLeave}\n+ onMouseEnter={onMouseEnter}\n+ containsInlineSidebar={containsInlineSidebar}\n/>\n);\n},\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message.react.js", "new_path": "web/chat/message.react.js", "diff": "@@ -39,26 +39,12 @@ function Message(props: Props): React.Node {\n}\nlet message;\nif (item.messageInfo.type === messageTypes.TEXT) {\n- message = (\n- <TextMessage\n- item={item}\n- threadInfo={props.threadInfo}\n- setMouseOverMessagePosition={props.setMouseOverMessagePosition}\n- mouseOverMessagePosition={props.mouseOverMessagePosition}\n- />\n- );\n+ message = <TextMessage item={item} threadInfo={props.threadInfo} />;\n} else if (\nitem.messageInfo.type === messageTypes.IMAGES ||\nitem.messageInfo.type === messageTypes.MULTIMEDIA\n) {\n- message = (\n- <MultimediaMessage\n- item={item}\n- threadInfo={props.threadInfo}\n- setMouseOverMessagePosition={props.setMouseOverMessagePosition}\n- mouseOverMessagePosition={props.mouseOverMessagePosition}\n- />\n- );\n+ message = <MultimediaMessage item={item} threadInfo={props.threadInfo} />;\n} else {\ninvariant(item.robotext, \"Flow can't handle our fancy types :(\");\nmessage = (\n" }, { "change_type": "MODIFY", "old_path": "web/chat/multimedia-message.react.js", "new_path": "web/chat/multimedia-message.react.js", "diff": "@@ -12,18 +12,9 @@ import Multimedia from '../media/multimedia.react';\nimport css from './chat-message-list.css';\nimport ComposedMessage from './composed-message.react';\nimport sendFailed from './multimedia-message-send-failed';\n-import type {\n- MessagePositionInfo,\n- OnMessagePositionWithContainerInfo,\n-} from './position-types';\n-\ntype BaseProps = {\n+item: ChatMessageInfoItem,\n+threadInfo: ThreadInfo,\n- +setMouseOverMessagePosition: (\n- messagePositionInfo: MessagePositionInfo,\n- ) => void,\n- +mouseOverMessagePosition: ?OnMessagePositionWithContainerInfo,\n};\ntype Props = {\n...BaseProps,\n@@ -71,9 +62,6 @@ class MultimediaMessage extends React.PureComponent<Props> {\nitem={item}\nthreadInfo={this.props.threadInfo}\nsendFailed={sendFailed(item, inputState)}\n- setMouseOverMessagePosition={this.props.setMouseOverMessagePosition}\n- mouseOverMessagePosition={this.props.mouseOverMessagePosition}\n- canReply={false}\nfixedWidth={multimedia.length > 1}\nborderRadius={16}\n>\n" }, { "change_type": "MODIFY", "old_path": "web/chat/text-message.react.js", "new_path": "web/chat/text-message.react.js", "diff": "@@ -6,27 +6,19 @@ import * as React from 'react';\nimport type { ChatMessageInfoItem } from 'lib/selectors/chat-selectors';\nimport { onlyEmojiRegex } from 'lib/shared/emojis';\n-import { colorIsDark, threadHasPermission } from 'lib/shared/thread-utils';\n+import { colorIsDark } from 'lib/shared/thread-utils';\nimport { messageTypes } from 'lib/types/message-types';\n-import { type ThreadInfo, threadPermissions } from 'lib/types/thread-types';\n+import { type ThreadInfo } from 'lib/types/thread-types';\nimport Markdown from '../markdown/markdown.react';\nimport css from './chat-message-list.css';\nimport ComposedMessage from './composed-message.react';\nimport { MessageListContext } from './message-list-types';\n-import type {\n- MessagePositionInfo,\n- OnMessagePositionWithContainerInfo,\n-} from './position-types';\nimport textMessageSendFailed from './text-message-send-failed';\ntype Props = {\n+item: ChatMessageInfoItem,\n+threadInfo: ThreadInfo,\n- +setMouseOverMessagePosition: (\n- messagePositionInfo: MessagePositionInfo,\n- ) => void,\n- +mouseOverMessagePosition: ?OnMessagePositionWithContainerInfo,\n};\nfunction TextMessage(props: Props): React.Node {\ninvariant(\n@@ -59,18 +51,11 @@ function TextMessage(props: Props): React.Node {\nconst messageListContext = React.useContext(MessageListContext);\ninvariant(messageListContext, 'DummyTextNode should have MessageListContext');\nconst rules = messageListContext.getTextMessageMarkdownRules(darkColor);\n- const canReply = threadHasPermission(\n- props.threadInfo,\n- threadPermissions.VOICED,\n- );\nreturn (\n<ComposedMessage\nitem={props.item}\nthreadInfo={props.threadInfo}\nsendFailed={textMessageSendFailed(props.item)}\n- setMouseOverMessagePosition={props.setMouseOverMessagePosition}\n- mouseOverMessagePosition={props.mouseOverMessagePosition}\n- canReply={canReply}\n>\n<div className={messageClassName} style={messageStyle}>\n<Markdown rules={rules}>{text}</Markdown>\n" }, { "change_type": "MODIFY", "old_path": "web/chat/tooltip-utils.js", "new_path": "web/chat/tooltip-utils.js", "diff": "@@ -12,9 +12,11 @@ import {\nimport { isComposableMessageType } from 'lib/types/message-types';\nimport type { ThreadInfo } from 'lib/types/thread-types';\nimport { threadPermissions } from 'lib/types/thread-types';\n+import { longAbsoluteDate } from 'lib/utils/date-utils';\nimport CommIcon from '../CommIcon.react';\nimport { InputStateContext } from '../input/input-state';\n+import { useSelector } from '../redux/redux-utils';\nimport {\nuseOnClickPendingSidebar,\nuseOnClickThread,\n@@ -25,7 +27,9 @@ import {\ntooltipLabelStyle,\ntooltipStyle,\n} from './chat-constants';\n+import MessageTooltip from './message-tooltip.react';\nimport type { PositionInfo } from './position-types';\n+import { useTooltipContext } from './tooltip-provider';\nexport const tooltipPositions = Object.freeze({\nLEFT: 'left',\n@@ -401,6 +405,111 @@ function useMessageTooltipActions(\n]);\n}\n+type UseMessageTooltipArgs = {\n+ +availablePositions: $ReadOnlyArray<TooltipPosition>,\n+ +item: ChatMessageInfoItem,\n+ +threadInfo: ThreadInfo,\n+};\n+\n+type UseMessageTooltipResult = {\n+ onMouseEnter: (event: SyntheticEvent<HTMLElement>) => void,\n+ onMouseLeave: ?() => mixed,\n+};\n+\n+function useMessageTooltip({\n+ availablePositions,\n+ item,\n+ threadInfo,\n+}: UseMessageTooltipArgs): UseMessageTooltipResult {\n+ const [onMouseLeave, setOnMouseLeave] = React.useState<?() => mixed>(null);\n+\n+ const { renderTooltip } = useTooltipContext();\n+ const tooltipActions = useMessageTooltipActions(item, threadInfo);\n+\n+ const containsInlineSidebar = !!item.threadCreatedFromMessage;\n+\n+ const timeZone = useSelector(state => state.timeZone);\n+\n+ const messageTimestamp = React.useMemo(() => {\n+ const time = item.messageInfo.time;\n+ return longAbsoluteDate(time, timeZone);\n+ }, [item.messageInfo.time, timeZone]);\n+\n+ const tooltipSize = React.useMemo(() => {\n+ if (typeof document === 'undefined') {\n+ return {\n+ width: 0,\n+ height: 0,\n+ };\n+ }\n+ const tooltipLabels = tooltipActions.map(action => action.label);\n+ return calculateTooltipSize({\n+ tooltipLabels,\n+ timestamp: messageTimestamp,\n+ });\n+ }, [messageTimestamp, tooltipActions]);\n+\n+ const onMouseEnter = React.useCallback(\n+ (event: SyntheticEvent<HTMLElement>) => {\n+ if (!renderTooltip) {\n+ return;\n+ }\n+ const rect = event.currentTarget.getBoundingClientRect();\n+ const { top, bottom, left, right, height, width } = rect;\n+ const messagePosition = { top, bottom, left, right, height, width };\n+\n+ const tooltipPosition = findTooltipPosition({\n+ sourcePositionInfo: messagePosition,\n+ tooltipSize,\n+ availablePositions,\n+ defaultPosition: availablePositions[0],\n+ preventDisplayingBelowSource: containsInlineSidebar,\n+ });\n+ if (!tooltipPosition) {\n+ return;\n+ }\n+\n+ const tooltipPositionStyle = getMessageActionTooltipStyle({\n+ tooltipPosition,\n+ sourcePositionInfo: messagePosition,\n+ tooltipSize: tooltipSize,\n+ });\n+\n+ const { alignment } = tooltipPositionStyle;\n+\n+ const tooltip = (\n+ <MessageTooltip\n+ actions={tooltipActions}\n+ messageTimestamp={messageTimestamp}\n+ alignment={alignment}\n+ />\n+ );\n+\n+ const renderTooltipResult = renderTooltip({\n+ newNode: tooltip,\n+ tooltipPositionStyle,\n+ });\n+ if (renderTooltipResult) {\n+ const { onMouseLeaveCallback: callback } = renderTooltipResult;\n+ setOnMouseLeave((() => callback: () => () => mixed));\n+ }\n+ },\n+ [\n+ availablePositions,\n+ containsInlineSidebar,\n+ messageTimestamp,\n+ renderTooltip,\n+ tooltipActions,\n+ tooltipSize,\n+ ],\n+ );\n+\n+ return {\n+ onMouseEnter,\n+ onMouseLeave,\n+ };\n+}\n+\nexport {\nfindTooltipPosition,\ncalculateTooltipSize,\n@@ -408,5 +517,6 @@ export {\nuseMessageTooltipSidebarAction,\nuseMessageTooltipReplyAction,\nuseMessageTooltipActions,\n+ useMessageTooltip,\nsizeOfTooltipArrow,\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Use new tooltip in composed message Summary: Use new tooltip API in composed message. Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4920
129,185
05.09.2022 09:48:34
-7,200
6f5610db9d1c415309b5c5d0b87b8f3fc44c4421
[web] Use new tooltip in robotext message Summary: Use new tooltip API in robotext message Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/chat/message.react.js", "new_path": "web/chat/message.react.js", "diff": "@@ -47,14 +47,7 @@ function Message(props: Props): React.Node {\nmessage = <MultimediaMessage item={item} threadInfo={props.threadInfo} />;\n} else {\ninvariant(item.robotext, \"Flow can't handle our fancy types :(\");\n- message = (\n- <RobotextMessage\n- item={item}\n- threadInfo={props.threadInfo}\n- setMouseOverMessagePosition={props.setMouseOverMessagePosition}\n- mouseOverMessagePosition={props.mouseOverMessagePosition}\n- />\n- );\n+ message = <RobotextMessage item={item} threadInfo={props.threadInfo} />;\n}\nreturn (\n<div className={css.message}>\n" }, { "change_type": "MODIFY", "old_path": "web/chat/robotext-message.react.js", "new_path": "web/chat/robotext-message.react.js", "diff": "// @flow\n-import classNames from 'classnames';\nimport * as React from 'react';\nimport { useDispatch } from 'react-redux';\nimport { type RobotextChatMessageInfoItem } from 'lib/selectors/chat-selectors';\nimport { threadInfoSelector } from 'lib/selectors/thread-selectors';\nimport { splitRobotext, parseRobotextEntity } from 'lib/shared/message-utils';\n-import { useSidebarExistsOrCanBeCreated } from 'lib/shared/thread-utils';\nimport type { Dispatch } from 'lib/types/redux-types';\nimport { type ThreadInfo } from 'lib/types/thread-types';\n@@ -16,33 +14,26 @@ import { linkRules } from '../markdown/rules.react';\nimport { updateNavInfoActionType } from '../redux/action-types';\nimport { useSelector } from '../redux/redux-utils';\nimport { InlineSidebar } from './inline-sidebar.react';\n-import MessageTooltip from './message-tooltip.react';\n-import type {\n- MessagePositionInfo,\n- OnMessagePositionWithContainerInfo,\n-} from './position-types';\nimport css from './robotext-message.css';\n-import { tooltipPositions } from './tooltip-utils';\n+import { tooltipPositions, useMessageTooltip } from './tooltip-utils';\n-// eslint-disable-next-line no-unused-vars\nconst availableTooltipPositionsForRobotext = [\n- tooltipPositions.RIGHT_TOP,\n- tooltipPositions.RIGHT,\ntooltipPositions.LEFT,\n+ tooltipPositions.LEFT_TOP,\n+ tooltipPositions.LEFT_BOTTOM,\n+ tooltipPositions.RIGHT,\n+ tooltipPositions.RIGHT_TOP,\n+ tooltipPositions.RIGHT_BOTTOM,\n];\ntype BaseProps = {\n+item: RobotextChatMessageInfoItem,\n+threadInfo: ThreadInfo,\n- +setMouseOverMessagePosition: (\n- messagePositionInfo: MessagePositionInfo,\n- ) => void,\n- +mouseOverMessagePosition: ?OnMessagePositionWithContainerInfo,\n};\ntype Props = {\n...BaseProps,\n- // Redux state\n- +sidebarExistsOrCanBeCreated: boolean,\n+ +onMouseLeave: ?() => mixed,\n+ +onMouseEnter: (event: SyntheticEvent<HTMLDivElement>) => mixed,\n};\nclass RobotextMessage extends React.PureComponent<Props> {\nrender() {\n@@ -58,40 +49,14 @@ class RobotextMessage extends React.PureComponent<Props> {\n);\n}\n- const { item, sidebarExistsOrCanBeCreated } = this.props;\n- const { id } = item.messageInfo;\n- let messageTooltip;\n- if (\n- this.props.mouseOverMessagePosition &&\n- this.props.mouseOverMessagePosition.item.messageInfo.id === id &&\n- sidebarExistsOrCanBeCreated\n- ) {\n- messageTooltip = <MessageTooltip messageTimestamp=\"\" actions={[]} />;\n- }\n-\n- let messageTooltipLinks;\n- if (messageTooltip) {\n- messageTooltipLinks = (\n- <div\n- className={classNames(\n- css.messageTooltipLinks,\n- css.nonViewerMessageTooltipLinks,\n- )}\n- >\n- {messageTooltip}\n- </div>\n- );\n- }\n-\nreturn (\n<div className={css.robotextContainer}>\n<div\nclassName={css.innerRobotextContainer}\n- onMouseEnter={this.onMouseEnter}\n- onMouseLeave={this.onMouseLeave}\n+ onMouseEnter={this.props.onMouseEnter}\n+ onMouseLeave={this.props.onMouseLeave}\n>\n<span>{this.linkedRobotext()}</span>\n- {messageTooltipLinks}\n</div>\n{inlineSidebar}\n</div>\n@@ -131,25 +96,7 @@ class RobotextMessage extends React.PureComponent<Props> {\nreturn textParts;\n}\n-\n- onMouseEnter = (event: SyntheticEvent<HTMLDivElement>) => {\n- const { item } = this.props;\n- const rect = event.currentTarget.getBoundingClientRect();\n- const { top, bottom, left, right, height, width } = rect;\n- const messagePosition = { top, bottom, left, right, height, width };\n- this.props.setMouseOverMessagePosition({\n- type: 'on',\n- item,\n- messagePosition,\n- });\n- };\n-\n- onMouseLeave = () => {\n- const { item } = this.props;\n- this.props.setMouseOverMessagePosition({ type: 'off', item });\n- };\n}\n-\ntype BaseInnerThreadEntityProps = {\n+id: string,\n+name: string,\n@@ -198,14 +145,19 @@ function ColorEntity(props: { color: string }) {\nconst ConnectedRobotextMessage: React.ComponentType<BaseProps> = React.memo<BaseProps>(\nfunction ConnectedRobotextMessage(props) {\n- const sidebarExistsOrCanBeCreated = useSidebarExistsOrCanBeCreated(\n- props.threadInfo,\n- props.item,\n- );\n+ const { item, threadInfo } = props;\n+\n+ const { onMouseLeave, onMouseEnter } = useMessageTooltip({\n+ item,\n+ threadInfo,\n+ availablePositions: availableTooltipPositionsForRobotext,\n+ });\n+\nreturn (\n<RobotextMessage\n{...props}\n- sidebarExistsOrCanBeCreated={sidebarExistsOrCanBeCreated}\n+ onMouseLeave={onMouseLeave}\n+ onMouseEnter={onMouseEnter}\n/>\n);\n},\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Use new tooltip in robotext message Summary: Use new tooltip API in robotext message Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4921
129,185
05.09.2022 09:48:34
-7,200
c8b753e4f9b76ef4a6ed67bf07b9bfadd2c5cee5
[web] Remove timestamp tooltip from `ChatMessageList` Summary: Remove tooltip related logic from `chat-message-list` as it's no longer needed Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-message-list.react.js", "new_path": "web/chat/chat-message-list.react.js", "diff": "@@ -32,13 +32,9 @@ import { useTextMessageRulesFunc } from '../markdown/rules.react';\nimport { useSelector } from '../redux/redux-utils';\nimport css from './chat-message-list.css';\nimport { MessageListContext } from './message-list-types';\n-import MessageTimestampTooltip from './message-timestamp-tooltip.react';\nimport Message from './message.react';\n-import type {\n- OnMessagePositionWithContainerInfo,\n- MessagePositionInfo,\n-} from './position-types';\nimport RelationshipPrompt from './relationship-prompt/relationship-prompt';\n+import { useTooltipContext } from './tooltip-provider';\ntype BaseProps = {\n+threadInfo: ThreadInfo,\n@@ -64,18 +60,13 @@ type Props = {\n) => Promise<FetchMessageInfosPayload>,\n// withInputState\n+inputState: ?InputState,\n-};\n-type State = {\n- +mouseOverMessagePosition: ?OnMessagePositionWithContainerInfo,\n+ +clearTooltip: () => mixed,\n};\ntype Snapshot = {\n+scrollTop: number,\n+scrollHeight: number,\n};\n-class ChatMessageList extends React.PureComponent<Props, State> {\n- state: State = {\n- mouseOverMessagePosition: null,\n- };\n+class ChatMessageList extends React.PureComponent<Props> {\ncontainer: ?HTMLDivElement;\nmessageContainer: ?HTMLDivElement;\nloadingFromScroll = false;\n@@ -110,7 +101,7 @@ class ChatMessageList extends React.PureComponent<Props, State> {\n);\n}\n- componentDidUpdate(prevProps: Props, prevState: State, snapshot: ?Snapshot) {\n+ componentDidUpdate(prevProps: Props, prevState, snapshot: ?Snapshot) {\nconst { messageListData } = this.props;\nconst prevMessageListData = prevProps.messageListData;\n@@ -185,51 +176,12 @@ class ChatMessageList extends React.PureComponent<Props, State> {\n<Message\nitem={item}\nthreadInfo={threadInfo}\n- setMouseOverMessagePosition={this.setMouseOverMessagePosition}\n- mouseOverMessagePosition={this.state.mouseOverMessagePosition}\ntimeZone={this.props.timeZone}\nkey={ChatMessageList.keyExtractor(item)}\n/>\n);\n};\n- setMouseOverMessagePosition = (messagePositionInfo: MessagePositionInfo) => {\n- if (!this.messageContainer) {\n- return;\n- }\n- if (messagePositionInfo.type === 'off') {\n- this.setState({ mouseOverMessagePosition: null });\n- return;\n- }\n- const {\n- top: containerTop,\n- bottom: containerBottom,\n- left: containerLeft,\n- right: containerRight,\n- height: containerHeight,\n- width: containerWidth,\n- } = this.messageContainer.getBoundingClientRect();\n- const mouseOverMessagePosition = {\n- ...messagePositionInfo,\n- messagePosition: {\n- ...messagePositionInfo.messagePosition,\n- top: messagePositionInfo.messagePosition.top - containerTop,\n- bottom: messagePositionInfo.messagePosition.bottom - containerTop,\n- left: messagePositionInfo.messagePosition.left - containerLeft,\n- right: messagePositionInfo.messagePosition.right - containerLeft,\n- },\n- containerPosition: {\n- top: containerTop,\n- bottom: containerBottom,\n- left: containerLeft,\n- right: containerRight,\n- height: containerHeight,\n- width: containerWidth,\n- },\n- };\n- this.setState({ mouseOverMessagePosition });\n- };\n-\nrender() {\nconst { messageListData, threadInfo, inputState } = this.props;\nif (!messageListData) {\n@@ -238,17 +190,6 @@ class ChatMessageList extends React.PureComponent<Props, State> {\ninvariant(inputState, 'InputState should be set');\nconst messages = messageListData.map(this.renderItem);\n- let tooltip;\n- if (this.state.mouseOverMessagePosition) {\n- const messagePositionInfo = this.state.mouseOverMessagePosition;\n- tooltip = (\n- <MessageTimestampTooltip\n- messagePositionInfo={messagePositionInfo}\n- timeZone={this.props.timeZone}\n- />\n- );\n- }\n-\nlet relationshipPrompt;\nif (threadInfo) {\nrelationshipPrompt = <RelationshipPrompt threadInfo={threadInfo} />;\n@@ -264,7 +205,6 @@ class ChatMessageList extends React.PureComponent<Props, State> {\n<div className={messageContainerStyle} ref={this.messageContainerRef}>\n{messages}\n</div>\n- {tooltip}\n</div>\n);\n}\n@@ -283,9 +223,7 @@ class ChatMessageList extends React.PureComponent<Props, State> {\nif (!this.messageContainer) {\nreturn;\n}\n- if (this.state.mouseOverMessagePosition) {\n- this.setState({ mouseOverMessagePosition: null });\n- }\n+ this.props.clearTooltip();\nthis.possiblyLoadMoreMessages();\n};\n@@ -384,6 +322,8 @@ const ConnectedChatMessageList: React.ComponentType<BaseProps> = React.memo<Base\nconst inputState = React.useContext(InputStateContext);\n+ const { clearTooltip } = useTooltipContext();\n+\nconst getTextMessageMarkdownRules = useTextMessageRulesFunc(threadInfo.id);\nconst messageListContext = React.useMemo(() => {\nif (!getTextMessageMarkdownRules) {\n@@ -405,6 +345,7 @@ const ConnectedChatMessageList: React.ComponentType<BaseProps> = React.memo<Base\ndispatchActionPromise={dispatchActionPromise}\nfetchMessagesBeforeCursor={callFetchMessagesBeforeCursor}\nfetchMostRecentMessages={callFetchMostRecentMessages}\n+ clearTooltip={clearTooltip}\n/>\n</MessageListContext.Provider>\n);\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message.react.js", "new_path": "web/chat/message.react.js", "diff": "@@ -10,20 +10,12 @@ import { longAbsoluteDate } from 'lib/utils/date-utils';\nimport css from './chat-message-list.css';\nimport MultimediaMessage from './multimedia-message.react';\n-import {\n- type OnMessagePositionWithContainerInfo,\n- type MessagePositionInfo,\n-} from './position-types';\nimport RobotextMessage from './robotext-message.react';\nimport TextMessage from './text-message.react';\ntype Props = {\n+item: ChatMessageInfoItem,\n+threadInfo: ThreadInfo,\n- +setMouseOverMessagePosition: (\n- messagePositionInfo: MessagePositionInfo,\n- ) => void,\n- +mouseOverMessagePosition: ?OnMessagePositionWithContainerInfo,\n+timeZone: ?string,\n};\nfunction Message(props: Props): React.Node {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Remove timestamp tooltip from `ChatMessageList` Summary: Remove tooltip related logic from `chat-message-list` as it's no longer needed Test Plan: Flow; Tested with the rest of diffs stack. Reviewers: tomek, atul, abosh Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D4922
129,185
05.09.2022 09:48:34
-7,200
f59b2df0c809b979930e28cdee22680d7eb7b8a6
[web] Move `tooltip-utils` into `web/utils` Summary: The diff moved `tooltip-utils` into `utils` folder on web. The test already has been in that folder. Test Plan: Flow, checked manually if everything related to tooltip still works on web. Reviewers: tomek, atul Subscribers: ashoat, abosh
[ { "change_type": "MODIFY", "old_path": "web/chat/composed-message.react.js", "new_path": "web/chat/composed-message.react.js", "diff": "@@ -14,10 +14,10 @@ import { assertComposableMessageType } from 'lib/types/message-types';\nimport { type ThreadInfo } from 'lib/types/thread-types';\nimport { type InputState, InputStateContext } from '../input/input-state';\n+import { tooltipPositions, useMessageTooltip } from '../utils/tooltip-utils';\nimport css from './chat-message-list.css';\nimport FailedSend from './failed-send.react';\nimport InlineSidebar from './inline-sidebar.react';\n-import { tooltipPositions, useMessageTooltip } from './tooltip-utils';\nconst availableTooltipPositionsForViewerMessage = [\ntooltipPositions.LEFT,\n" }, { "change_type": "MODIFY", "old_path": "web/chat/message-tooltip.react.js", "new_path": "web/chat/message-tooltip.react.js", "diff": "import classNames from 'classnames';\nimport * as React from 'react';\n+import { type MessageTooltipAction } from '../utils/tooltip-utils';\nimport {\ntooltipButtonStyle,\ntooltipLabelStyle,\ntooltipStyle,\n} from './chat-constants';\nimport css from './message-tooltip.css';\n-import { type MessageTooltipAction } from './tooltip-utils';\ntype MessageTooltipProps = {\n+actions: $ReadOnlyArray<MessageTooltipAction>,\n" }, { "change_type": "MODIFY", "old_path": "web/chat/robotext-message.react.js", "new_path": "web/chat/robotext-message.react.js", "diff": "@@ -13,9 +13,9 @@ import Markdown from '../markdown/markdown.react';\nimport { linkRules } from '../markdown/rules.react';\nimport { updateNavInfoActionType } from '../redux/action-types';\nimport { useSelector } from '../redux/redux-utils';\n+import { tooltipPositions, useMessageTooltip } from '../utils/tooltip-utils';\nimport InlineSidebar from './inline-sidebar.react';\nimport css from './robotext-message.css';\n-import { tooltipPositions, useMessageTooltip } from './tooltip-utils';\nconst availableTooltipPositionsForRobotext = [\ntooltipPositions.LEFT,\n" }, { "change_type": "MODIFY", "old_path": "web/chat/tooltip-provider.js", "new_path": "web/chat/tooltip-provider.js", "diff": "@@ -4,7 +4,7 @@ import classNames from 'classnames';\nimport invariant from 'invariant';\nimport * as React from 'react';\n-import type { TooltipPositionStyle } from './tooltip-utils';\n+import type { TooltipPositionStyle } from '../utils/tooltip-utils';\nimport css from './tooltip.css';\nconst onMouseLeaveSourceDisappearTimeoutMs = 200;\n" }, { "change_type": "RENAME", "old_path": "web/chat/tooltip-utils.js", "new_path": "web/utils/tooltip-utils.js", "diff": "@@ -14,6 +14,14 @@ import type { ThreadInfo } from 'lib/types/thread-types';\nimport { threadPermissions } from 'lib/types/thread-types';\nimport { longAbsoluteDate } from 'lib/utils/date-utils';\n+import {\n+ tooltipButtonStyle,\n+ tooltipLabelStyle,\n+ tooltipStyle,\n+} from '../chat/chat-constants';\n+import MessageTooltip from '../chat/message-tooltip.react';\n+import type { PositionInfo } from '../chat/position-types';\n+import { useTooltipContext } from '../chat/tooltip-provider';\nimport CommIcon from '../CommIcon.react';\nimport { InputStateContext } from '../input/input-state';\nimport { useSelector } from '../redux/redux-utils';\n@@ -22,14 +30,6 @@ import {\nuseOnClickThread,\n} from '../selectors/nav-selectors';\nimport { calculateMaxTextWidth } from '../utils/text-utils';\n-import {\n- tooltipButtonStyle,\n- tooltipLabelStyle,\n- tooltipStyle,\n-} from './chat-constants';\n-import MessageTooltip from './message-tooltip.react';\n-import type { PositionInfo } from './position-types';\n-import { useTooltipContext } from './tooltip-provider';\nexport const tooltipPositions = Object.freeze({\nLEFT: 'left',\n" }, { "change_type": "MODIFY", "old_path": "web/utils/tooltip-utils.test.js", "new_path": "web/utils/tooltip-utils.test.js", "diff": "// @flow\nimport type { PositionInfo } from '../chat/position-types';\n-import { findTooltipPosition, tooltipPositions } from '../chat/tooltip-utils';\n+import { findTooltipPosition, tooltipPositions } from './tooltip-utils';\nconst QHDWindow = {\nwidth: 2560,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Move `tooltip-utils` into `web/utils` Summary: The diff moved `tooltip-utils` into `utils` folder on web. The test already has been in that folder. Test Plan: Flow, checked manually if everything related to tooltip still works on web. Reviewers: tomek, atul Reviewed By: tomek, atul Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5021
129,185
05.09.2022 09:48:34
-7,200
d89c8f499c0c50aa9725aabbcee9553027c8f767
[web] Rename `x/yCoord` to `AnchorPoint` in `TooltipPositionStyle` Summary: Follow up: Test Plan: Run web app, confirm that the rename doesn't break tooltip behavior Reviewers: tomek, atul Subscribers: ashoat, abosh
[ { "change_type": "MODIFY", "old_path": "web/chat/tooltip-provider.js", "new_path": "web/chat/tooltip-provider.js", "diff": "@@ -120,8 +120,8 @@ function TooltipProvider(props: Props): React.Node {\n}\nconst tooltipContainerStyle = {\nposition: 'absolute',\n- top: tooltipPosition.yCoord,\n- left: tooltipPosition.xCoord,\n+ top: tooltipPosition.anchorPoint.y,\n+ left: tooltipPosition.anchorPoint.x,\n};\nconst { verticalPosition, horizontalPosition } = tooltipPosition;\n" }, { "change_type": "MODIFY", "old_path": "web/utils/tooltip-utils.js", "new_path": "web/utils/tooltip-utils.js", "diff": "@@ -48,8 +48,10 @@ type TooltipSize = {\n};\nexport type TooltipPositionStyle = {\n- +xCoord: number,\n- +yCoord: number,\n+ +anchorPoint: {\n+ +x: number,\n+ +y: number,\n+ },\n+verticalPosition: 'top' | 'bottom',\n+horizontalPosition: 'left' | 'right',\n+alignment: 'left' | 'center' | 'right',\n@@ -212,76 +214,92 @@ function getMessageActionTooltipStyle({\n}: GetMessageActionTooltipStyleParams): TooltipPositionStyle {\nif (tooltipPosition === tooltipPositions.RIGHT_TOP) {\nreturn {\n- xCoord: sourcePositionInfo.right,\n- yCoord: sourcePositionInfo.top,\n+ anchorPoint: {\n+ x: sourcePositionInfo.right,\n+ y: sourcePositionInfo.top,\n+ },\nhorizontalPosition: 'right',\nverticalPosition: 'bottom',\nalignment: 'left',\n};\n} else if (tooltipPosition === tooltipPositions.LEFT_TOP) {\nreturn {\n- xCoord: sourcePositionInfo.left,\n- yCoord: sourcePositionInfo.top,\n+ anchorPoint: {\n+ x: sourcePositionInfo.left,\n+ y: sourcePositionInfo.top,\n+ },\nhorizontalPosition: 'left',\nverticalPosition: 'bottom',\nalignment: 'right',\n};\n} else if (tooltipPosition === tooltipPositions.RIGHT_BOTTOM) {\nreturn {\n- xCoord: sourcePositionInfo.right,\n- yCoord: sourcePositionInfo.bottom,\n+ anchorPoint: {\n+ x: sourcePositionInfo.right,\n+ y: sourcePositionInfo.bottom,\n+ },\nhorizontalPosition: 'right',\nverticalPosition: 'top',\nalignment: 'left',\n};\n} else if (tooltipPosition === tooltipPositions.LEFT_BOTTOM) {\nreturn {\n- xCoord: sourcePositionInfo.left,\n- yCoord: sourcePositionInfo.bottom,\n+ anchorPoint: {\n+ x: sourcePositionInfo.left,\n+ y: sourcePositionInfo.bottom,\n+ },\nhorizontalPosition: 'left',\nverticalPosition: 'top',\nalignment: 'right',\n};\n} else if (tooltipPosition === tooltipPositions.LEFT) {\nreturn {\n- xCoord: sourcePositionInfo.left,\n- yCoord:\n+ anchorPoint: {\n+ x: sourcePositionInfo.left,\n+ y:\nsourcePositionInfo.top +\nsourcePositionInfo.height / 2 -\ntooltipSize.height / 2,\n+ },\nhorizontalPosition: 'left',\nverticalPosition: 'bottom',\nalignment: 'right',\n};\n} else if (tooltipPosition === tooltipPositions.RIGHT) {\nreturn {\n- xCoord: sourcePositionInfo.right,\n- yCoord:\n+ anchorPoint: {\n+ x: sourcePositionInfo.right,\n+ y:\nsourcePositionInfo.top +\nsourcePositionInfo.height / 2 -\ntooltipSize.height / 2,\n+ },\nhorizontalPosition: 'right',\nverticalPosition: 'bottom',\nalignment: 'left',\n};\n} else if (tooltipPosition === tooltipPositions.TOP) {\nreturn {\n- xCoord:\n+ anchorPoint: {\n+ x:\nsourcePositionInfo.left +\nsourcePositionInfo.width / 2 -\ntooltipSize.width / 2,\n- yCoord: sourcePositionInfo.top,\n+ y: sourcePositionInfo.top,\n+ },\nhorizontalPosition: 'right',\nverticalPosition: 'top',\nalignment: 'center',\n};\n} else if (tooltipPosition === tooltipPositions.BOTTOM) {\nreturn {\n- xCoord:\n+ anchorPoint: {\n+ x:\nsourcePositionInfo.left +\nsourcePositionInfo.width / 2 -\ntooltipSize.width / 2,\n- yCoord: sourcePositionInfo.bottom,\n+ y: sourcePositionInfo.bottom,\n+ },\nhorizontalPosition: 'right',\nverticalPosition: 'bottom',\nalignment: 'center',\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Rename `x/yCoord` to `AnchorPoint` in `TooltipPositionStyle` Summary: Follow up: https://phab.comm.dev/D4915#inline-32530 Test Plan: Run web app, confirm that the rename doesn't break tooltip behavior Reviewers: tomek, atul Reviewed By: tomek Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5039
129,190
01.09.2022 12:38:11
-7,200
d7a9a55923a448e99d0fab671add55853f4118e4
[services] Backup - Tests - Pull Backup - Improve logging Summary: Making logs clearer in the pull backup test utility Test Plan: ``` cd services yarn run-integration-tests backup ``` Reviewers: jon, tomek, varun, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/commtest/tests/backup/pull_backup.rs", "new_path": "services/commtest/tests/backup/pull_backup.rs", "diff": "@@ -113,18 +113,18 @@ pub async fn run(\nif holder.len() == 0 {\ncontinue;\n}\n- println!(\"attachments for the backup: {}\", holders);\n+ println!(\"attachments for the backup: {}\", holder);\nresult\n.backup_item\n.attachments_holders\n.push(holder.to_string());\n}\n} else if state == State::Log {\n+ println!(\"attachments for the log {:?}: {}\", current_id, holders);\nfor holder in holders_split {\nif holder.len() == 0 {\ncontinue;\n}\n- println!(\"attachments for the log: {}\", holders);\nlet log_items_size = result.log_items.len() - 1;\nresult.log_items[log_items_size]\n.attachments_holders\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Tests - Pull Backup - Improve logging Summary: Making logs clearer in the pull backup test utility Test Plan: ``` cd services yarn run-integration-tests backup ``` Reviewers: jon, tomek, varun, max Reviewed By: jon, tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5002
129,190
01.09.2022 12:44:42
-7,200
5e99a40b03797ab371d498611a27f47545f95517
[services] Backup - Add tools for blob client Summary: Depends on D5002 These tools will be helpful for communication between rust and c++ Test Plan: backup builds Reviewers: jon, tomek, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/src/Tools.cpp", "new_path": "services/backup/src/Tools.cpp", "diff": "@@ -52,6 +52,20 @@ std::string validateAttachmentHolders(const std::string &holders) {\nreturn result;\n}\n+int charPtrToInt(const char *str) {\n+ unsigned int intValue;\n+ std::stringstream strValue;\n+\n+ strValue << str;\n+ strValue >> intValue;\n+\n+ return intValue;\n+}\n+\n+size_t getBlobPutField(blob::PutRequest::DataCase field) {\n+ return static_cast<size_t>(field);\n+}\n+\n} // namespace tools\n} // namespace network\n} // namespace comm\n" }, { "change_type": "MODIFY", "old_path": "services/backup/src/Tools.h", "new_path": "services/backup/src/Tools.h", "diff": "#pragma once\n+#include <blob.pb.h>\n+\n#include <string>\nnamespace comm {\n@@ -15,6 +17,10 @@ std::string generateHolder(\nstd::string validateAttachmentHolders(const std::string &holders);\n+int charPtrToInt(const char *str);\n+\n+size_t getBlobPutField(blob::PutRequest::DataCase field);\n+\n} // namespace tools\n} // namespace network\n} // namespace comm\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Add tools for blob client Summary: Depends on D5002 These tools will be helpful for communication between rust and c++ Test Plan: backup builds Reviewers: jon, tomek, max Reviewed By: tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5003
129,190
01.09.2022 12:48:33
-7,200
0e63f2b49414bf5782d4ef607548e5c051c44ef6
[services] Backup - Blob Put Client - Update put API Summary: Depends on D5003 We want to use rust's `Result`s so we can catch errors in c++. Test Plan: backup builds Reviewers: jon, tomek, varun, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/lib.rs", "new_path": "services/backup/blob_client/src/lib.rs", "diff": "@@ -10,9 +10,12 @@ use put_client::{\n#[cxx::bridge]\nmod ffi {\nextern \"Rust\" {\n- fn put_client_initialize_cxx() -> ();\n- fn put_client_blocking_read_cxx() -> ();\n- unsafe fn put_client_write_cxx(data: *const c_char) -> ();\n- fn put_client_terminate_cxx() -> ();\n+ fn put_client_initialize_cxx() -> Result<()>;\n+ unsafe fn put_client_write_cxx(\n+ field_index: usize,\n+ data: *const c_char,\n+ ) -> Result<()>;\n+ fn put_client_blocking_read_cxx() -> Result<String>;\n+ fn put_client_terminate_cxx() -> Result<()>;\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/put_client.rs", "new_path": "services/backup/blob_client/src/put_client.rs", "diff": "use libc::c_char;\n-pub fn put_client_initialize_cxx() -> () {\n+pub fn put_client_initialize_cxx() -> Result<(), String> {\nunimplemented!();\n}\n-pub fn put_client_blocking_read_cxx() -> () {\n+pub fn put_client_blocking_read_cxx() -> Result<String, String> {\nunimplemented!();\n}\n-pub fn put_client_write_cxx(data: *const c_char) -> () {\n+/**\n+ * field index:\n+ * 1 - holder (utf8 string)\n+ * 2 - blob hash (utf8 string)\n+ * 3 - data chunk (bytes)\n+ */\n+pub fn put_client_write_cxx(\n+ field_index: usize,\n+ data: *const c_char,\n+) -> Result<(), String> {\nunimplemented!();\n}\n-pub fn put_client_terminate_cxx() -> () {\n+pub fn put_client_terminate_cxx() -> Result<(), String> {\nunimplemented!();\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Blob Put Client - Update put API Summary: Depends on D5003 We want to use rust's `Result`s so we can catch errors in c++. Test Plan: backup builds Reviewers: jon, tomek, varun, max Reviewed By: tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5004
129,190
01.09.2022 12:51:45
-7,200
fe23b01565548e6ead29b142c8c336896c5409c7
[services] Backup - Blob Put Client - Add essential objects Summary: Depends on D5004 Adding necessary imports and objects that we're going to use in the put client. Test Plan: backup builds Reviewers: jon, tomek, varun, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/put_client.rs", "new_path": "services/backup/blob_client/src/put_client.rs", "diff": "+mod proto {\n+ tonic::include_proto!(\"blob\");\n+}\n+\n+use lazy_static::lazy_static;\n+use libc;\nuse libc::c_char;\n+use std::sync::{Arc, Mutex};\n+use tokio::runtime::Runtime;\n+use tokio::sync::mpsc;\n+use tokio::task::JoinHandle;\n+use tracing::error;\n+\n+#[derive(Debug)]\n+struct PutRequestData {\n+ field_index: usize,\n+ data: Vec<u8>,\n+}\n+\n+struct BidiClient {\n+ tx: mpsc::Sender<PutRequestData>,\n+\n+ rx: mpsc::Receiver<String>,\n+ rx_handle: JoinHandle<()>,\n+}\n+\n+lazy_static! {\n+ static ref CLIENT: Arc<Mutex<Option<BidiClient>>> =\n+ Arc::new(Mutex::new(None));\n+ static ref RUNTIME: Runtime = Runtime::new().unwrap();\n+ static ref ERROR_MESSAGES: Arc<Mutex<Vec<String>>> =\n+ Arc::new(Mutex::new(Vec::new()));\n+}\npub fn put_client_initialize_cxx() -> Result<(), String> {\nunimplemented!();\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Blob Put Client - Add essential objects Summary: Depends on D5004 Adding necessary imports and objects that we're going to use in the put client. Test Plan: backup builds Reviewers: jon, tomek, varun, max Reviewed By: jon Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5005
129,190
01.09.2022 12:51:59
-7,200
a20c5f2821306d91d194edc4db0573c562a7e73a
[services] Backup - Blob Put Client - Add helper functions Summary: Depends on D5005 Adding some helper function that will be used by the put client Test Plan: backup builds Reviewers: jon, tomek, varun, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/put_client.rs", "new_path": "services/backup/blob_client/src/put_client.rs", "diff": "@@ -32,6 +32,35 @@ lazy_static! {\nArc::new(Mutex::new(Vec::new()));\n}\n+fn is_initialized() -> bool {\n+ match CLIENT.lock() {\n+ Ok(client) => client.is_some(),\n+ _ => {\n+ report_error(\"couldn't access client\".to_string());\n+ false\n+ }\n+ }\n+}\n+\n+fn report_error(message: String) {\n+ println!(\"[RUST] [put] Error: {}\", message);\n+ if let Ok(mut error_messages) = ERROR_MESSAGES.lock() {\n+ error_messages.push(message);\n+ return;\n+ }\n+ error!(\"could not access error messages\");\n+}\n+\n+fn check_error() -> Result<(), String> {\n+ if let Ok(errors) = ERROR_MESSAGES.lock() {\n+ return match errors.is_empty() {\n+ true => Ok(()),\n+ false => Err(errors.join(\"\\n\")),\n+ };\n+ }\n+ Err(\"could not access error messages\".to_string())\n+}\n+\npub fn put_client_initialize_cxx() -> Result<(), String> {\nunimplemented!();\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Blob Put Client - Add helper functions Summary: Depends on D5005 Adding some helper function that will be used by the put client Test Plan: backup builds Reviewers: jon, tomek, varun, max Reviewed By: jon, tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5006
129,190
01.09.2022 12:59:03
-7,200
4a1b95c4374fc97c6bd29a5926ec9507f8d8fedd
[services] Backup - Blob Put Client - Install async stream Summary: Depends on D5006 Installing async stream to handle grpc properly. Test Plan: backup builds Reviewers: jon, ashoat, tomek, varun, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/Cargo.lock", "new_path": "services/backup/blob_client/Cargo.lock", "diff": "@@ -114,6 +114,7 @@ checksum = \"bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a\"\nname = \"blob_client\"\nversion = \"0.1.0\"\ndependencies = [\n+ \"async-stream\",\n\"cxx\",\n\"cxx-build\",\n\"lazy_static\",\n" }, { "change_type": "MODIFY", "old_path": "services/backup/blob_client/Cargo.toml", "new_path": "services/backup/blob_client/Cargo.toml", "diff": "@@ -12,6 +12,7 @@ libc = \"0.2\"\ntonic = \"0.8\"\nprost = \"0.11\"\ntracing = \"0.1\"\n+async-stream = \"0.3\"\n[build-dependencies]\ncxx-build = \"1.0\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Blob Put Client - Install async stream Summary: Depends on D5006 Installing async stream to handle grpc properly. Test Plan: backup builds Reviewers: jon, ashoat, tomek, varun, max Reviewed By: tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5007
129,190
01.09.2022 12:53:04
-7,200
4b6b03909f82af5ea1f9705744a6e745710ff64f
[services] Backup - Blob Put Client - Add initialize Summary: Depends on D5008 Adding initialize function to the blob put client. Test Plan: backup builds Reviewers: jon, max, varun, tomek Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/put_client.rs", "new_path": "services/backup/blob_client/src/put_client.rs", "diff": "@@ -2,9 +2,16 @@ mod proto {\ntonic::include_proto!(\"blob\");\n}\n+use proto::blob_service_client::BlobServiceClient;\n+use proto::put_request;\n+use proto::put_request::Data::*;\n+use proto::PutRequest;\n+\n+use crate::constants::{BLOB_ADDRESS, MPSC_CHANNEL_BUFFER_CAPACITY};\nuse lazy_static::lazy_static;\nuse libc;\nuse libc::c_char;\n+use std::ffi::CStr;\nuse std::sync::{Arc, Mutex};\nuse tokio::runtime::Runtime;\nuse tokio::sync::mpsc;\n@@ -62,7 +69,110 @@ fn check_error() -> Result<(), String> {\n}\npub fn put_client_initialize_cxx() -> Result<(), String> {\n- unimplemented!();\n+ if is_initialized() {\n+ put_client_terminate_cxx()?;\n+ }\n+ assert!(!is_initialized(), \"client cannot be initialized twice\");\n+ // grpc\n+ if let Ok(mut grpc_client) =\n+ RUNTIME.block_on(async { BlobServiceClient::connect(BLOB_ADDRESS).await })\n+ {\n+ let (request_thread_tx, mut request_thread_rx) =\n+ mpsc::channel::<PutRequestData>(MPSC_CHANNEL_BUFFER_CAPACITY);\n+\n+ let outbound = async_stream::stream! {\n+ while let Some(data) = request_thread_rx.recv().await {\n+ let request_data: Option<put_request::Data> = match data.field_index {\n+ 1 => {\n+ match String::from_utf8(data.data) {\n+ Ok(utf8_data) => Some(Holder(utf8_data)),\n+ _ => {\n+ report_error(\"invalid utf-8\".to_string());\n+ None\n+ },\n+ }\n+ }\n+ 2 => {\n+ match String::from_utf8(data.data).ok() {\n+ Some(utf8_data) => Some(BlobHash(utf8_data)),\n+ None => {\n+ report_error(\"invalid utf-8\".to_string());\n+ None\n+ },\n+ }\n+ }\n+ 3 => {\n+ Some(DataChunk(data.data))\n+ }\n+ _ => {\n+ report_error(format!(\"invalid field index value {}\", data.field_index));\n+ None\n+ }\n+ };\n+ if let Some (unpacked_data) = request_data {\n+ let request = PutRequest {\n+ data: Some(unpacked_data),\n+ };\n+ yield request;\n+ } else {\n+ report_error(\"an error occured, aborting connection\".to_string());\n+ break;\n+ }\n+ }\n+ };\n+\n+ // spawn receiver thread\n+ let (response_thread_tx, response_thread_rx) =\n+ mpsc::channel::<String>(MPSC_CHANNEL_BUFFER_CAPACITY);\n+ let rx_handle = RUNTIME.spawn(async move {\n+ match grpc_client.put(tonic::Request::new(outbound)).await {\n+ Ok(response) => {\n+ let mut inner_response = response.into_inner();\n+ loop {\n+ match inner_response.message().await {\n+ Ok(maybe_response_message) => {\n+ let mut result = false;\n+ if let Some(response_message) = maybe_response_message {\n+ // warning: this will produce an error if there's more unread responses than\n+ // MPSC_CHANNEL_BUFFER_CAPACITY\n+ // you should then use put_client_blocking_read_cxx in order to dequeue\n+ // the responses in c++ and make room for more\n+ if let Ok(_) = response_thread_tx\n+ .try_send((response_message.data_exists as i32).to_string())\n+ {\n+ result = true;\n+ } else {\n+ report_error(\"response queue full\".to_string());\n+ }\n+ }\n+ if !result {\n+ break;\n+ }\n+ }\n+ Err(err) => {\n+ report_error(err.to_string());\n+ break;\n+ }\n+ };\n+ }\n+ }\n+ Err(err) => {\n+ report_error(err.to_string());\n+ }\n+ };\n+ });\n+\n+ if let Ok(mut client) = CLIENT.lock() {\n+ *client = Some(BidiClient {\n+ tx: request_thread_tx,\n+ rx: response_thread_rx,\n+ rx_handle,\n+ });\n+ return Ok(());\n+ }\n+ return Err(\"could not access client\".to_string());\n+ }\n+ Err(\"could not successfully connect to the blob server\".to_string())\n}\npub fn put_client_blocking_read_cxx() -> Result<String, String> {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Blob Put Client - Add initialize Summary: Depends on D5008 Adding initialize function to the blob put client. Test Plan: backup builds Reviewers: jon, max, varun, tomek Reviewed By: tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5009
129,190
01.09.2022 12:53:34
-7,200
c915b14cca4a96c1cf485b7d08a8115027d710d4
[services] Backup - Blob Put Client - Add blocking read Summary: Depends on D5009 Adding blocking read function to the blob put client. Test Plan: backup builds Reviewers: jon, tomek, varun, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/put_client.rs", "new_path": "services/backup/blob_client/src/put_client.rs", "diff": "@@ -176,7 +176,28 @@ pub fn put_client_initialize_cxx() -> Result<(), String> {\n}\npub fn put_client_blocking_read_cxx() -> Result<String, String> {\n- unimplemented!();\n+ check_error()?;\n+ let response: Option<String> = RUNTIME.block_on(async {\n+ if let Ok(mut maybe_client) = CLIENT.lock() {\n+ if let Some(mut client) = (*maybe_client).take() {\n+ if let Some(data) = client.rx.recv().await {\n+ return Some(data);\n+ } else {\n+ report_error(\n+ \"couldn't receive data via client's receiver\".to_string(),\n+ );\n+ }\n+ *maybe_client = Some(client);\n+ } else {\n+ report_error(\"no client detected\".to_string());\n+ }\n+ } else {\n+ report_error(\"couldn't access client\".to_string());\n+ }\n+ None\n+ });\n+ check_error()?;\n+ response.ok_or(\"response not received properly\".to_string())\n}\n/**\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Blob Put Client - Add blocking read Summary: Depends on D5009 Adding blocking read function to the blob put client. Test Plan: backup builds Reviewers: jon, tomek, varun, max Reviewed By: tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5010
129,190
01.09.2022 12:53:49
-7,200
6689f947442ff822a434a61e745e48e1dfb85a42
[services] Backup - Blob Put Client - Add write Summary: Depends on D5010 Adding write function to the blob put client. Test Plan: backup builds Reviewers: jon, tomek, max, varun Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/put_client.rs", "new_path": "services/backup/blob_client/src/put_client.rs", "diff": "@@ -210,7 +210,36 @@ pub fn put_client_write_cxx(\nfield_index: usize,\ndata: *const c_char,\n) -> Result<(), String> {\n- unimplemented!();\n+ check_error()?;\n+ let data_c_str: &CStr = unsafe { CStr::from_ptr(data) };\n+ let data_bytes: Vec<u8> = data_c_str.to_bytes().to_vec();\n+\n+ RUNTIME.block_on(async {\n+ if let Ok(mut maybe_client) = CLIENT.lock() {\n+ if let Some(client) = (*maybe_client).take() {\n+ match client\n+ .tx\n+ .send(PutRequestData {\n+ field_index,\n+ data: data_bytes,\n+ })\n+ .await\n+ {\n+ Ok(_) => (),\n+ Err(err) => {\n+ report_error(format!(\"send data to receiver failed: {}\", err))\n+ }\n+ }\n+ *maybe_client = Some(client);\n+ } else {\n+ report_error(\"no client detected\".to_string());\n+ }\n+ } else {\n+ report_error(\"couldn't access client\".to_string());\n+ }\n+ });\n+ check_error()?;\n+ Ok(())\n}\npub fn put_client_terminate_cxx() -> Result<(), String> {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Blob Put Client - Add write Summary: Depends on D5010 Adding write function to the blob put client. Test Plan: backup builds Reviewers: jon, tomek, max, varun Reviewed By: jon, tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5011
129,190
01.09.2022 12:54:05
-7,200
6cbd2d4384fa23440166de031781e9e2e257c3a2
[services] Backup - Blob Put Client - Add terminate Summary: Depends on D5011 Adding terminate function to the blob put client. Test Plan: backup builds Reviewers: jon, max, varun, tomek Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/put_client.rs", "new_path": "services/backup/blob_client/src/put_client.rs", "diff": "@@ -243,5 +243,31 @@ pub fn put_client_write_cxx(\n}\npub fn put_client_terminate_cxx() -> Result<(), String> {\n- unimplemented!();\n+ check_error()?;\n+ if !is_initialized() {\n+ check_error()?;\n+ return Ok(());\n+ }\n+\n+ if let Ok(mut maybe_client) = CLIENT.lock() {\n+ if let Some(client) = (*maybe_client).take() {\n+ drop(client.tx);\n+ RUNTIME.block_on(async {\n+ if client.rx_handle.await.is_err() {\n+ report_error(\"wait for receiver handle failed\".to_string());\n+ }\n+ });\n+ } else {\n+ return Err(\"no client detected\".to_string());\n+ }\n+ } else {\n+ return Err(\"couldn't access client\".to_string());\n+ }\n+\n+ assert!(\n+ !is_initialized(),\n+ \"client transmitter handler released properly\"\n+ );\n+ check_error()?;\n+ Ok(())\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Blob Put Client - Add terminate Summary: Depends on D5011 Adding terminate function to the blob put client. Test Plan: backup builds Reviewers: jon, max, varun, tomek Reviewed By: jon Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5012
129,190
01.09.2022 12:55:52
-7,200
77d843164f0be77cb16c9f39ab300b225da95371
[services] Backup - Blob Get Client - Add base structure Summary: Depends on D5012 Adding base structure to the blob get client. Test Plan: backup builds Reviewers: jon, tomek, varun, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/get_client.rs", "new_path": "services/backup/blob_client/src/get_client.rs", "diff": "+mod proto {\n+ tonic::include_proto!(\"blob\");\n+}\n+use proto::blob_service_client::BlobServiceClient;\n+use proto::GetRequest;\n+\n+use crate::constants::{BLOB_ADDRESS, MPSC_CHANNEL_BUFFER_CAPACITY};\n+use lazy_static::lazy_static;\n+use libc;\n+use libc::c_char;\n+use std::ffi::CStr;\n+use std::sync::{Arc, Mutex};\n+use tokio::runtime::Runtime;\n+use tokio::sync::mpsc;\n+use tokio::task::JoinHandle;\n+use tracing::error;\n+\n+struct ReadClient {\n+ rx: mpsc::Receiver<Vec<u8>>,\n+ rx_handle: JoinHandle<()>,\n+}\n+\n+lazy_static! {\n+ static ref CLIENT: Arc<Mutex<Option<ReadClient>>> =\n+ Arc::new(Mutex::new(None));\n+ static ref RUNTIME: Runtime = Runtime::new().unwrap();\n+ static ref ERROR_MESSAGES: Arc<Mutex<Vec<String>>> =\n+ Arc::new(Mutex::new(Vec::new()));\n+}\n+\n+fn is_initialized() -> bool {\n+ if let Ok(client) = CLIENT.lock() {\n+ if client.is_some() {\n+ return true;\n+ }\n+ } else {\n+ report_error(\"couldn't access client\".to_string());\n+ }\n+ false\n+}\n+\n+fn report_error(message: String) {\n+ println!(\"[RUST] [get] Error: {}\", message);\n+ if let Ok(mut error_messages) = ERROR_MESSAGES.lock() {\n+ error_messages.push(message);\n+ }\n+ error!(\"could not access error messages\");\n+}\n+\n+fn check_error() -> Result<(), String> {\n+ if let Ok(errors) = ERROR_MESSAGES.lock() {\n+ return match errors.is_empty() {\n+ true => Ok(()),\n+ false => Err(errors.join(\"\\n\")),\n+ };\n+ }\n+ Err(\"could not access error messages\".to_string())\n+}\n+\n+pub fn get_client_initialize_cxx(\n+ holder_char: *const c_char,\n+) -> Result<(), String> {\n+ unimplemented!();\n+}\n+\n+pub fn get_client_blocking_read_cxx() -> Result<Vec<u8>, String> {\n+ unimplemented!();\n+}\n+\n+pub fn get_client_terminate_cxx() -> Result<(), String> {\n+ unimplemented!();\n+}\n" }, { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/lib.rs", "new_path": "services/backup/blob_client/src/lib.rs", "diff": "@@ -7,6 +7,10 @@ use put_client::{\nput_client_terminate_cxx, put_client_write_cxx,\n};\n+use get_client::{\n+ get_client_blocking_read_cxx, get_client_initialize_cxx,\n+ get_client_terminate_cxx,\n+};\n#[cxx::bridge]\nmod ffi {\nextern \"Rust\" {\n@@ -17,5 +21,10 @@ mod ffi {\n) -> Result<()>;\nfn put_client_blocking_read_cxx() -> Result<String>;\nfn put_client_terminate_cxx() -> Result<()>;\n+ unsafe fn get_client_initialize_cxx(\n+ holder_char: *const c_char,\n+ ) -> Result<()>;\n+ fn get_client_blocking_read_cxx() -> Result<Vec<u8>>;\n+ fn get_client_terminate_cxx() -> Result<()>;\n}\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Blob Get Client - Add base structure Summary: Depends on D5012 Adding base structure to the blob get client. Test Plan: backup builds Reviewers: jon, tomek, varun, max Reviewed By: tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5013
129,190
01.09.2022 12:56:19
-7,200
8949d823fda97d9f05c97bd1fada142f5ab9e51d
[services] Backup - Blob Get Client - Add initialize Summary: Depends on D5013 Adding initialize function to the blob get client. Test Plan: backup builds Reviewers: jon, tomek, varun, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/get_client.rs", "new_path": "services/backup/blob_client/src/get_client.rs", "diff": "@@ -61,7 +61,64 @@ fn check_error() -> Result<(), String> {\npub fn get_client_initialize_cxx(\nholder_char: *const c_char,\n) -> Result<(), String> {\n- unimplemented!();\n+ if is_initialized() {\n+ get_client_terminate_cxx()?;\n+ }\n+\n+ assert!(!is_initialized(), \"client cannot be initialized twice\");\n+\n+ let holder_cstr: &CStr = unsafe { CStr::from_ptr(holder_char) };\n+ let holder: String = holder_cstr.to_str().unwrap().to_owned();\n+\n+ // grpc\n+ if let Ok(mut grpc_client) =\n+ RUNTIME.block_on(async { BlobServiceClient::connect(BLOB_ADDRESS).await })\n+ {\n+ // spawn receiver thread\n+ let (response_thread_tx, response_thread_rx) =\n+ mpsc::channel::<Vec<u8>>(MPSC_CHANNEL_BUFFER_CAPACITY);\n+ let rx_handle = RUNTIME.spawn(async move {\n+ if let Ok(response) = grpc_client.get(GetRequest { holder }).await {\n+ let mut inner_response = response.into_inner();\n+ loop {\n+ match inner_response.message().await {\n+ Ok(maybe_data) => {\n+ let mut result = false;\n+ if let Some(data) = maybe_data {\n+ let data: Vec<u8> = data.data_chunk;\n+ result = match response_thread_tx.send(data).await {\n+ Ok(_) => true,\n+ Err(err) => {\n+ report_error(err.to_string());\n+ false\n+ }\n+ }\n+ }\n+ if !result {\n+ break;\n+ }\n+ }\n+ Err(err) => {\n+ report_error(err.to_string());\n+ break;\n+ }\n+ };\n+ }\n+ } else {\n+ report_error(\"couldn't perform grpc get operation\".to_string());\n+ }\n+ });\n+\n+ if let Ok(mut client) = CLIENT.lock() {\n+ *client = Some(ReadClient {\n+ rx_handle,\n+ rx: response_thread_rx,\n+ });\n+ return Ok(());\n+ }\n+ return Err(\"could not access client\".to_string());\n+ }\n+ Err(\"could not successfully connect to the blob server\".to_string())\n}\npub fn get_client_blocking_read_cxx() -> Result<Vec<u8>, String> {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Blob Get Client - Add initialize Summary: Depends on D5013 Adding initialize function to the blob get client. Test Plan: backup builds Reviewers: jon, tomek, varun, max Reviewed By: tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5014
129,190
01.09.2022 12:56:35
-7,200
0edcf73c41afc697f8d08407db7c0b56ca6786b3
[services] Backup - Blob Get Client - Add blocking read Summary: Depends on D5014 Adding blocking read function to the blob get client. Test Plan: backup builds Reviewers: jon, tomek, varun, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/get_client.rs", "new_path": "services/backup/blob_client/src/get_client.rs", "diff": "@@ -122,7 +122,24 @@ pub fn get_client_initialize_cxx(\n}\npub fn get_client_blocking_read_cxx() -> Result<Vec<u8>, String> {\n- unimplemented!();\n+ check_error()?;\n+ let response: Option<Vec<u8>> = RUNTIME.block_on(async {\n+ if let Ok(mut maybe_client) = CLIENT.lock() {\n+ if let Some(mut client) = (*maybe_client).take() {\n+ let maybe_data = client.rx.recv().await;\n+ let response = Some(maybe_data.unwrap_or_else(|| vec![]));\n+ *maybe_client = Some(client);\n+ return response;\n+ } else {\n+ report_error(\"no client present\".to_string());\n+ }\n+ } else {\n+ report_error(\"couldn't access client\".to_string());\n+ }\n+ None\n+ });\n+ check_error()?;\n+ response.ok_or(\"response could not be obtained\".to_string())\n}\npub fn get_client_terminate_cxx() -> Result<(), String> {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Blob Get Client - Add blocking read Summary: Depends on D5014 Adding blocking read function to the blob get client. Test Plan: backup builds Reviewers: jon, tomek, varun, max Reviewed By: jon, tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5015
129,190
01.09.2022 12:56:49
-7,200
440114cd315c9fbcef82c5d1a75cf827dd3d7b05
[services] Backup - Blob Get Client - Add terminate Summary: Depends on D5015 Adding terminate function to the blob get client. Test Plan: backup builds Reviewers: jon, tomek, varun, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/get_client.rs", "new_path": "services/backup/blob_client/src/get_client.rs", "diff": "@@ -143,5 +143,29 @@ pub fn get_client_blocking_read_cxx() -> Result<Vec<u8>, String> {\n}\npub fn get_client_terminate_cxx() -> Result<(), String> {\n- unimplemented!();\n+ check_error()?;\n+ if !is_initialized() {\n+ check_error()?;\n+ return Ok(());\n+ }\n+ if let Ok(mut maybe_client) = CLIENT.lock() {\n+ if let Some(client) = (*maybe_client).take() {\n+ RUNTIME.block_on(async {\n+ if client.rx_handle.await.is_err() {\n+ report_error(\"wait for receiver handle failed\".to_string());\n+ }\n+ });\n+ } else {\n+ return Err(\"no client detected\".to_string());\n+ }\n+ } else {\n+ return Err(\"couldn't access client\".to_string());\n+ }\n+\n+ assert!(\n+ !is_initialized(),\n+ \"client transmitter handler released properly\"\n+ );\n+ check_error()?;\n+ Ok(())\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Blob Get Client - Add terminate Summary: Depends on D5015 Adding terminate function to the blob get client. Test Plan: backup builds Reviewers: jon, tomek, varun, max Reviewed By: tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5016
129,190
01.09.2022 13:03:08
-7,200
0b822963c7ec7c5ab5d16469a455a190860c33c0
[services] Backup - Use Blob client in c++ - Implement add attachment Summary: Depends on D5017 Adding c++ implementation for using the blob client in the backup reactor for adding attachments. Test Plan: backup builds Reviewers: jon, tomek, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/src/Reactors/server/AddAttachmentsUtility.cpp", "new_path": "services/backup/src/Reactors/server/AddAttachmentsUtility.cpp", "diff": "#include \"AddAttachmentsUtility.h\"\n+#include \"blob_client/src/lib.rs.h\"\n+\n#include <glog/logging.h>\n#include \"BackupItem.h\"\n@@ -49,7 +51,7 @@ grpc::Status AddAttachmentsUtility::processRequest(\n}\ndatabase::DatabaseManager::getInstance().putLogItem(*logItem);\n}\n- } catch (std::runtime_error &e) {\n+ } catch (std::exception &e) {\nLOG(ERROR) << e.what();\nstatus = grpc::Status(grpc::StatusCode::INTERNAL, e.what());\n}\n@@ -72,10 +74,23 @@ AddAttachmentsUtility::moveToS3(std::shared_ptr<database::LogItem> logItem) {\n// put into S3\nstd::condition_variable blobPutDoneCV;\nstd::mutex blobPutDoneCVMutex;\n- // todo:blob perform put\n- // todo:blob perform put:add chunk (std::move(data))\n- // todo:blob perform put:add chunk (\"\")\n- // todo:blob perform put:wait for completion\n+ put_client_initialize_cxx();\n+ put_client_write_cxx(\n+ tools::getBlobPutField(blob::PutRequest::DataCase::kHolder),\n+ holder.c_str());\n+ put_client_blocking_read_cxx();\n+ put_client_write_cxx(\n+ tools::getBlobPutField(blob::PutRequest::DataCase::kBlobHash),\n+ newLogItem->getDataHash().c_str());\n+ rust::String responseStr = put_client_blocking_read_cxx();\n+ // data exists?\n+ if (!(bool)tools::charPtrToInt(responseStr.c_str())) {\n+ put_client_write_cxx(\n+ tools::getBlobPutField(blob::PutRequest::DataCase::kDataChunk),\n+ std::move(data).c_str());\n+ put_client_blocking_read_cxx();\n+ }\n+ put_client_terminate_cxx();\nreturn newLogItem;\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Use Blob client in c++ - Implement add attachment Summary: Depends on D5017 Adding c++ implementation for using the blob client in the backup reactor for adding attachments. Test Plan: backup builds Reviewers: jon, tomek, max Reviewed By: tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5018
129,190
01.09.2022 13:03:24
-7,200
d92ff5a3dcfd616ab312d0592c8c5bdb09d13c1e
[services] Backup - Use Blob client in c++ - Implement send log Summary: Depends on D5018 Adding c++ implementation for using the blob client in the backup reactor for sending logs. Test Plan: backup builds Reviewers: jon, tomek, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/src/Reactors/server/SendLogReactor.cpp", "new_path": "services/backup/src/Reactors/server/SendLogReactor.cpp", "diff": "#include \"SendLogReactor.h\"\n+#include \"blob_client/src/lib.rs.h\"\n+\n#include \"Constants.h\"\n#include \"DatabaseManager.h\"\n#include \"GlobalTools.h\"\n@@ -33,7 +35,7 @@ std::string SendLogReactor::generateLogID(const std::string &backupID) {\nstd::to_string(tools::getCurrentTimestamp());\n}\n-void SendLogReactor::initializePutReactor() {\n+void SendLogReactor::initializePutClient() {\nif (this->blobHolder.empty()) {\nthrow std::runtime_error(\n\"put reactor cannot be initialized with empty blob holder\");\n@@ -42,7 +44,7 @@ void SendLogReactor::initializePutReactor() {\nthrow std::runtime_error(\n\"put reactor cannot be initialized with empty hash\");\n}\n- // todo:blob perform put:initialize\n+ put_client_initialize_cxx();\n}\nstd::unique_ptr<grpc::Status>\n@@ -86,9 +88,7 @@ SendLogReactor::readRequest(backup::SendLogRequest request) {\nif (!request.has_logdata()) {\nthrow std::runtime_error(\"log data expected but not received\");\n}\n- std::unique_ptr<std::string> chunk =\n- std::make_unique<std::string>(std::move(*request.mutable_logdata()));\n- if (chunk->size() == 0) {\n+ if (request.mutable_logdata()->size() == 0) {\nreturn std::make_unique<grpc::Status>(grpc::Status::OK);\n}\nif (this->persistenceMethod == PersistenceMethod::DB) {\n@@ -98,10 +98,18 @@ SendLogReactor::readRequest(backup::SendLogRequest request) {\n\"), merge them into bigger parts instead\");\n}\nif (this->persistenceMethod == PersistenceMethod::BLOB) {\n- // todo:blob perform put:add chunk (std::move(chunk))\n+ put_client_write_cxx(\n+ tools::getBlobPutField(blob::PutRequest::DataCase::kDataChunk),\n+ request.mutable_logdata()->c_str());\n+ put_client_blocking_read_cxx(); // todo this should be avoided\n+ // (blocking); we should be able to\n+ // ignore responses; we probably want to\n+ // delegate performing ops to separate\n+ // threads in the base reactors\n+\nreturn nullptr;\n}\n- this->value += std::move(*chunk);\n+ this->value += std::move(*request.mutable_logdata());\ndatabase::LogItem logItem = database::LogItem(\nthis->backupID, this->logID, true, this->value, \"\", this->hash);\nif (database::LogItem::getItemSize(&logItem) >\n@@ -109,8 +117,37 @@ SendLogReactor::readRequest(backup::SendLogRequest request) {\nthis->persistenceMethod = PersistenceMethod::BLOB;\nthis->blobHolder =\ntools::generateHolder(this->hash, this->backupID, this->logID);\n- this->initializePutReactor();\n- // todo:blob perform put:add chunk (this->value)\n+ this->initializePutClient();\n+ put_client_write_cxx(\n+ tools::getBlobPutField(blob::PutRequest::DataCase::kHolder),\n+ this->blobHolder.c_str());\n+ put_client_blocking_read_cxx(); // todo this should be avoided\n+ // (blocking); we should be able to\n+ // ignore responses; we probably want to\n+ // delegate performing ops to separate\n+ // threads in the base reactors\n+ put_client_write_cxx(\n+ tools::getBlobPutField(blob::PutRequest::DataCase::kBlobHash),\n+ this->hash.c_str());\n+ rust::String responseStr =\n+ put_client_blocking_read_cxx(); // todo this should be avoided\n+ // (blocking); we should be able to\n+ // ignore responses; we probably\n+ // want to delegate performing ops\n+ // to separate threads in the base\n+ // reactors\n+ // data exists?\n+ if ((bool)tools::charPtrToInt(responseStr.c_str())) {\n+ return std::make_unique<grpc::Status>(grpc::Status::OK);\n+ }\n+ put_client_write_cxx(\n+ tools::getBlobPutField(blob::PutRequest::DataCase::kDataChunk),\n+ std::move(this->value).c_str());\n+ put_client_blocking_read_cxx(); // todo this should be avoided\n+ // (blocking); we should be able to\n+ // ignore responses; we probably want to\n+ // delegate performing ops to separate\n+ // threads in the base reactors\nthis->value = \"\";\n} else {\nthis->persistenceMethod = PersistenceMethod::DB;\n@@ -123,6 +160,13 @@ SendLogReactor::readRequest(backup::SendLogRequest request) {\nvoid SendLogReactor::terminateCallback() {\nconst std::lock_guard<std::mutex> lock(this->reactorStateMutex);\n+ try {\n+ put_client_terminate_cxx();\n+ } catch (std::exception &e) {\n+ throw std::runtime_error(\n+ e.what()); // todo in base reactors we can just handle std exception\n+ // instead of keep rethrowing here\n+ }\nif (!this->getStatusHolder()->getStatus().ok()) {\nthrow std::runtime_error(\n@@ -138,8 +182,6 @@ void SendLogReactor::terminateCallback() {\nthis->storeInDatabase();\nreturn;\n}\n- // todo:blob perform put:add chunk (\"\")\n- // todo:blob perform put:wait for completion\n// store in db only when we successfully upload chunks\nthis->storeInDatabase();\n}\n" }, { "change_type": "MODIFY", "old_path": "services/backup/src/Reactors/server/SendLogReactor.h", "new_path": "services/backup/src/Reactors/server/SendLogReactor.h", "diff": "@@ -44,7 +44,7 @@ class SendLogReactor : public ServerReadReactorBase<\nvoid storeInDatabase();\nstd::string generateLogID(const std::string &backupID);\n- void initializePutReactor();\n+ void initializePutClient();\npublic:\nusing ServerReadReactorBase<backup::SendLogRequest, backup::SendLogResponse>::\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Use Blob client in c++ - Implement send log Summary: Depends on D5018 Adding c++ implementation for using the blob client in the backup reactor for sending logs. Test Plan: backup builds Reviewers: jon, tomek, max Reviewed By: tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5019
129,190
01.09.2022 13:03:39
-7,200
965866378b2f343f3f512758841e82bc6a9d5804
[services] Backup - Use Blob client in c++ - Implement pull backup Summary: Depends on D5019 Adding c++ implementation for using the blob client in the backup reactor for pulling backups. Test Plan: backup builds Reviewers: jon, tomek, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/src/Reactors/server/PullBackupReactor.cpp", "new_path": "services/backup/src/Reactors/server/PullBackupReactor.cpp", "diff": "#include \"PullBackupReactor.h\"\n+#include \"blob_client/src/lib.rs.h\"\n+\n#include \"DatabaseManager.h\"\nnamespace comm {\n@@ -17,7 +19,7 @@ void PullBackupReactor::initializeGetReactor(const std::string &holder) {\nthrow std::runtime_error(\n\"get reactor cannot be initialized when backup item is missing\");\n}\n- // todo:blob perform get initialize\n+ get_client_initialize_cxx(holder.c_str());\nthis->clientInitialized = true;\n}\n@@ -64,7 +66,11 @@ PullBackupReactor::writeResponse(backup::PullBackupResponse *response) {\n}\nstd::string dataChunk;\nif (this->internalBuffer.size() < this->chunkLimit) {\n- // todo:blob perform blocking read\n+ rust::Vec<unsigned char> responseVec = get_client_blocking_read_cxx();\n+ dataChunk = (responseVec.empty())\n+ ? \"\"\n+ : std::string(reinterpret_cast<char *>(responseVec.data()));\n+ dataChunk.resize(responseVec.size());\n}\nif (!dataChunk.empty() ||\nthis->internalBuffer.size() + extraBytesNeeded >= this->chunkLimit) {\n@@ -134,7 +140,11 @@ PullBackupReactor::writeResponse(backup::PullBackupResponse *response) {\n// we get an empty chunk - a sign of \"end of chunks\"\nstd::string dataChunk;\nif (this->internalBuffer.size() < this->chunkLimit && !this->endOfQueue) {\n- // todo:blob perform blocking read\n+ rust::Vec<unsigned char> responseVec = get_client_blocking_read_cxx();\n+ dataChunk = (responseVec.empty())\n+ ? \"\"\n+ : std::string(reinterpret_cast<char *>(responseVec.data()));\n+ dataChunk.resize(responseVec.size());\n}\nthis->endOfQueue = this->endOfQueue || (dataChunk.size() == 0);\ndataChunk = this->prepareDataChunkWithPadding(dataChunk, extraBytesNeeded);\n@@ -163,7 +173,10 @@ std::string PullBackupReactor::prepareDataChunkWithPadding(\nconst std::string &dataChunk,\nsize_t padding) {\nif (dataChunk.size() > this->chunkLimit) {\n- throw std::runtime_error(\"received data chunk bigger than the chunk limit\");\n+ throw std::runtime_error(std::string(\n+ \"received data chunk bigger than the chunk limit: \" +\n+ std::to_string(dataChunk.size()) + \"/\" +\n+ std::to_string(this->chunkLimit)));\n}\nstd::string chunk = std::move(this->internalBuffer) + dataChunk;\n@@ -183,8 +196,7 @@ std::string PullBackupReactor::prepareDataChunkWithPadding(\nvoid PullBackupReactor::terminateCallback() {\nconst std::lock_guard<std::mutex> lock(this->reactorStateMutex);\n- // todo:blob perform put:add chunk (\"\")\n- // todo:blob perform put:wait for completion\n+ get_client_terminate_cxx();\nif (!this->getStatusHolder()->getStatus().ok()) {\nthrow std::runtime_error(\nthis->getStatusHolder()->getStatus().error_message());\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Backup - Use Blob client in c++ - Implement pull backup Summary: Depends on D5019 Adding c++ implementation for using the blob client in the backup reactor for pulling backups. Test Plan: backup builds Reviewers: jon, tomek, max Reviewed By: jon, tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5020
129,190
02.09.2022 12:49:42
-7,200
396b990da3e4762b736761785d16772311a92d96
[services] Rust Integration - Backup - Rust - Add converting functions Summary: Depends on D5031 Adding helper functions to convert between rust's `String` and c++'s `char*` both ways. Test Plan: backup builds successfully Reviewers: jon, tomek, varun, max Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/backup/blob_client/src/tools.rs", "new_path": "services/backup/blob_client/src/tools.rs", "diff": "+use libc::c_char;\n+use std::ffi::{CStr, CString};\nuse std::sync::{Arc, Mutex};\nuse tracing::error;\n@@ -17,7 +19,9 @@ pub fn report_error(\nerror!(\"could not access error messages\");\n}\n-pub fn check_error(error_messages: &Arc<Mutex<Vec<String>>>) -> Result<(), String> {\n+pub fn check_error(\n+ error_messages: &Arc<Mutex<Vec<String>>>,\n+) -> Result<(), String> {\nif let Ok(errors) = error_messages.lock() {\nreturn match errors.is_empty() {\ntrue => Ok(()),\n@@ -26,3 +30,23 @@ pub fn check_error(error_messages: &Arc<Mutex<Vec<String>>>) -> Result<(), Strin\n}\nErr(\"could not access error messages\".to_string())\n}\n+\n+pub fn c_char_pointer_to_string(\n+ c_char_pointer: *const c_char,\n+) -> Result<String, String> {\n+ let holder_cstr: &CStr = unsafe { CStr::from_ptr(c_char_pointer) };\n+ match holder_cstr.to_str() {\n+ Ok(result) => Ok(result.to_owned()),\n+ Err(err) => Err(err.to_string()),\n+ }\n+}\n+\n+pub fn string_to_c_char_pointer(\n+ signs: &String,\n+) -> Result<*const c_char, String> {\n+ let cstr = CString::new((&signs).as_bytes());\n+ match cstr {\n+ Ok(result) => Ok(result.as_ptr()),\n+ Err(err) => Err(err.to_string()),\n+ }\n+}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Rust Integration - Backup - Rust - Add converting functions Summary: Depends on D5031 Adding helper functions to convert between rust's `String` and c++'s `char*` both ways. Test Plan: backup builds successfully Reviewers: jon, tomek, varun, max Reviewed By: tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5034
129,184
08.09.2022 16:55:59
14,400
7ed99628ce2f1f3b28671d672ac019b796fbbe82
[native] Update `thumbnailID` upon successful thumbnail upload Summary: Need to include the `thumbnailID` in addition to the `thumbnailURL` in the `updateMediaPayload`. Depends on D5059 Test Plan: `sendMultimediaMessage` in subsequent diff gets correctly constructed `mediaMessageContents` with expected values. {F160047} Reviewers: abosh, tomek, marcin Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "native/input/input-state-container.react.js", "new_path": "native/input/input-state-container.react.js", "diff": "@@ -734,12 +734,13 @@ class InputStateContainer extends React.PureComponent<Props, State> {\nif (processedMedia.mediaType === 'video') {\ninvariant(uploadThumbnailResult, 'uploadThumbnailResult exists');\n- const { uri: thumbnailURI } = uploadThumbnailResult;\n+ const { uri: thumbnailURI, id: thumbnailID } = uploadThumbnailResult;\nupdateMediaPayload = {\n...updateMediaPayload,\nmediaUpdate: {\n...updateMediaPayload.mediaUpdate,\nthumbnailURI,\n+ thumbnailID,\n},\n};\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Update `thumbnailID` upon successful thumbnail upload Summary: Need to include the `thumbnailID` in addition to the `thumbnailURL` in the `updateMediaPayload`. Depends on D5059 Test Plan: `sendMultimediaMessage` in subsequent diff gets correctly constructed `mediaMessageContents` with expected values. {F160047} Reviewers: abosh, tomek, marcin Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5060
129,184
08.09.2022 16:59:28
14,400
dbb173686a65914bb788ff6f4d9fd40d7d59c6d1
[lib] Update `SendMultimediaMessageRequest` type Summary: Update `SendMultimediaMessageRequest` to handle "new" payload option which takes list of `MediaMessageServerDBContent` instead of a list of `string`s. Depends on D5060 Test Plan: NA, no functional changes but addresses a flow issue in subsequent diff Reviewers: abosh, tomek, marcin Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "keyserver/src/responders/message-responders.js", "new_path": "keyserver/src/responders/message-responders.js", "diff": "@@ -118,6 +118,7 @@ async function legacyMultimediaMessageCreationResponder(\nviewer: Viewer,\nrequest: SendMultimediaMessageRequest,\n): Promise<SendMessageResponse> {\n+ invariant(request.mediaIDs);\nconst { threadID, localID, mediaIDs } = request;\nif (mediaIDs.length === 0) {\nthrow new ServerError('invalid_parameters');\n" }, { "change_type": "MODIFY", "old_path": "lib/types/message-types.js", "new_path": "lib/types/message-types.js", "diff": "@@ -67,6 +67,7 @@ import type {\nimport type {\nMediaMessageData,\nMediaMessageInfo,\n+ MediaMessageServerDBContent,\nRawMediaMessageInfo,\n} from './messages/media';\nimport type {\n@@ -499,10 +500,16 @@ export type SendTextMessageRequest = {\n+localID?: string,\n+text: string,\n};\n-export type SendMultimediaMessageRequest = {\n+export type SendMultimediaMessageRequest =\n+ | {\n+threadID: string,\n+localID: string,\n+mediaIDs: $ReadOnlyArray<string>,\n+ }\n+ | {\n+ +threadID: string,\n+ +localID: string,\n+ +mediaMessageContents: $ReadOnlyArray<MediaMessageServerDBContent>,\n};\n// Used for the message info included in log-in type actions\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Update `SendMultimediaMessageRequest` type Summary: Update `SendMultimediaMessageRequest` to handle "new" payload option which takes list of `MediaMessageServerDBContent` instead of a list of `string`s. Depends on D5060 Test Plan: NA, no functional changes but addresses a flow issue in subsequent diff Reviewers: abosh, tomek, marcin Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5061
129,184
09.09.2022 05:31:11
14,400
f5be8adfb1172ae2e5d4a73b4b01d03dbc0045c2
[lib] Update `SendMultimediaMessageRequest` type Summary: Update `SendMultimediaMessageRequest` to handle "new" payload option which takes list of `MediaMessageServerDBContent` instead of a list of `string`s. Depends on D5060 Test Plan: NA, no functional changes but addresses a flow issue in subsequent diff Reviewers: abosh, tomek, marcin Subscribers: inka, ashoat
[ { "change_type": "MODIFY", "old_path": "keyserver/src/responders/message-responders.js", "new_path": "keyserver/src/responders/message-responders.js", "diff": "@@ -118,6 +118,7 @@ async function legacyMultimediaMessageCreationResponder(\nviewer: Viewer,\nrequest: SendMultimediaMessageRequest,\n): Promise<SendMessageResponse> {\n+ invariant(request.mediaIDs, 'request.mediaIDs should be set');\nconst { threadID, localID, mediaIDs } = request;\nif (mediaIDs.length === 0) {\nthrow new ServerError('invalid_parameters');\n" }, { "change_type": "MODIFY", "old_path": "lib/types/message-types.js", "new_path": "lib/types/message-types.js", "diff": "@@ -67,6 +67,7 @@ import type {\nimport type {\nMediaMessageData,\nMediaMessageInfo,\n+ MediaMessageServerDBContent,\nRawMediaMessageInfo,\n} from './messages/media';\nimport type {\n@@ -499,10 +500,16 @@ export type SendTextMessageRequest = {\n+localID?: string,\n+text: string,\n};\n-export type SendMultimediaMessageRequest = {\n+export type SendMultimediaMessageRequest =\n+ | {\n+threadID: string,\n+localID: string,\n+mediaIDs: $ReadOnlyArray<string>,\n+ }\n+ | {\n+ +threadID: string,\n+ +localID: string,\n+ +mediaMessageContents: $ReadOnlyArray<MediaMessageServerDBContent>,\n};\n// Used for the message info included in log-in type actions\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[lib] Update `SendMultimediaMessageRequest` type Summary: Update `SendMultimediaMessageRequest` to handle "new" payload option which takes list of `MediaMessageServerDBContent` instead of a list of `string`s. Depends on D5060 Test Plan: NA, no functional changes but addresses a flow issue in subsequent diff Reviewers: abosh, tomek, marcin Reviewed By: tomek Subscribers: inka, ashoat Differential Revision: https://phab.comm.dev/D5061
129,196
12.09.2022 18:11:09
-7,200
e46d3e9b0f80a0f82ac5a1b2d6cc71217ec76b59
[native] codeVersion -> 144
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -434,8 +434,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 143\n- versionName '1.0.143'\n+ versionCode 144\n+ versionName '1.0.144'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{143};\n+ const int codeVersion{144};\nstd::shared_ptr<WorkerThread> databaseThread;\nstd::unique_ptr<WorkerThread> cryptoThread;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.143</string>\n+ <string>1.0.144</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>143</string>\n+ <string>144</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.143</string>\n+ <string>1.0.144</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>143</string>\n+ <string>144</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] codeVersion -> 144
129,196
12.09.2022 18:32:49
-7,200
7d391a02ffff854072407b8e0b9899ebf88b99c4
[native] codeVersion -> 145
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -434,8 +434,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 144\n- versionName '1.0.144'\n+ versionCode 145\n+ versionName '1.0.145'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{144};\n+ const int codeVersion{145};\nstd::shared_ptr<WorkerThread> databaseThread;\nstd::unique_ptr<WorkerThread> cryptoThread;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.144</string>\n+ <string>1.0.145</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>144</string>\n+ <string>145</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.144</string>\n+ <string>1.0.145</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>144</string>\n+ <string>145</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] codeVersion -> 145
129,184
13.09.2022 11:17:28
14,400
5e11f71e498b6a6d069d61653699a17e56fc270e
[native] `codeVersion` -> 146
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -434,8 +434,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 145\n- versionName '1.0.145'\n+ versionCode 146\n+ versionName '1.0.146'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{145};\n+ const int codeVersion{146};\nstd::unique_ptr<WorkerThread> databaseThread;\nstd::unique_ptr<WorkerThread> cryptoThread;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.145</string>\n+ <string>1.0.146</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>145</string>\n+ <string>146</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.145</string>\n+ <string>1.0.146</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>145</string>\n+ <string>146</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 146
129,184
15.09.2022 15:26:09
14,400
7780003a3872bec9c1f57d08eb3cc12ca5ad8167
[native] Bump `codeVersion` to 147
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -434,8 +434,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 146\n- versionName '1.0.146'\n+ versionCode 147\n+ versionName '1.0.147'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{146};\n+ const int codeVersion{147};\nstd::unique_ptr<WorkerThread> databaseThread;\nstd::unique_ptr<WorkerThread> cryptoThread;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 146;\n+ CURRENT_PROJECT_VERSION = 147;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.146;\n+ MARKETING_VERSION = 1.0.147;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 146;\n+ CURRENT_PROJECT_VERSION = 147;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.146;\n+ MARKETING_VERSION = 1.0.147;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.146</string>\n+ <string>1.0.147</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>146</string>\n+ <string>147</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.146</string>\n+ <string>1.0.147</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>146</string>\n+ <string>147</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Bump `codeVersion` to 147
129,189
16.09.2022 11:25:46
14,400
afc567e66d62c67694679b988cc5da03956a7612
[landing] updated which wagmi parameter is the actual address Summary: wagmi's latest useAccount() has a more sane api surface for exposing the address Test Plan: run `landing`, console.log the address and find that it exists Reviewers: atul, varun, abosh, ashoat Subscribers: tomek, varun, abosh, atul, ashoat
[ { "change_type": "MODIFY", "old_path": "landing/siwe.react.js", "new_path": "landing/siwe.react.js", "diff": "@@ -60,8 +60,7 @@ async function signInWithEthereum(address, signer) {\n}\nfunction SIWE(): React.Node {\n- const { data } = useAccount();\n- const { address } = data || {};\n+ const { address } = useAccount();\nconst { data: signer } = useSigner();\nconst onClick = React.useCallback(() => signInWithEthereum(address, signer), [\naddress,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] updated which wagmi parameter is the actual address Summary: wagmi's latest useAccount() has a more sane api surface for exposing the address Test Plan: run `landing`, console.log the address and find that it exists Reviewers: atul, varun, abosh, ashoat Reviewed By: ashoat Subscribers: tomek, varun, abosh, atul, ashoat Differential Revision: https://phab.comm.dev/D5161
129,178
12.09.2022 00:36:59
-32,400
2d6e43c7739e60964acb9f0f63e73bdcff1ac95a
[web] Added `react-icons` dependency to `web` Summary: add `react-icons` dependency so we can use `Ionicons` icon pack Test Plan: N/A Reviewers: atul, ashoat Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "web/package.json", "new_path": "web/package.json", "diff": "\"react-feather\": \"^2.0.3\",\n\"react-hot-loader\": \"^4.12.14\",\n\"react-icomoon\": \"^2.4.1\",\n+ \"react-icons\": \"^4.4.0\",\n\"react-redux\": \"^7.1.1\",\n\"react-router\": \"^5.2.0\",\n\"react-router-dom\": \"^5.2.0\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -15872,6 +15872,11 @@ react-icons@^4.3.1:\nresolved \"https://registry.yarnpkg.com/react-icons/-/react-icons-4.3.1.tgz#2fa92aebbbc71f43d2db2ed1aed07361124e91ca\"\nintegrity sha512-cB10MXLTs3gVuXimblAdI71jrJx8njrJZmNMEMC+sQu5B/BIOmlsAjskdqpn81y8UBVEGuHODd7/ci5DvoSzTQ==\n+react-icons@^4.4.0:\n+ version \"4.4.0\"\n+ resolved \"https://registry.yarnpkg.com/react-icons/-/react-icons-4.4.0.tgz#a13a8a20c254854e1ec9aecef28a95cdf24ef703\"\n+ integrity sha512-fSbvHeVYo/B5/L4VhB7sBA1i2tS8MkT0Hb9t2H1AVPkwGfVHLJCqyr2Py9dKMxsyM63Eng1GkdZfbWj+Fmv8Rg==\n+\n\"react-is@^16.12.0 || ^17.0.0\", react-is@^17.0.1, react-is@^17.0.2:\nversion \"17.0.2\"\nresolved \"https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Added `react-icons` dependency to `web` Summary: add `react-icons` dependency so we can use `Ionicons` icon pack Test Plan: N/A Reviewers: atul, ashoat Reviewed By: atul, ashoat Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5108
129,200
22.09.2022 15:17:05
14,400
d6285ed30cad730c059df94589f8f4d2c9775d4f
[services][identity] address some nits Summary: changed `into()`s to `to_string()`s for clarity Test Plan: `cargo build` Reviewers: jon, tomek Subscribers: ashoat, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/identity/src/database.rs", "new_path": "services/identity/src/database.rs", "diff": "@@ -91,20 +91,22 @@ impl DatabaseClient {\nif let Some(reg) = registration {\nupdate_expression_parts\n.push(format!(\"{} = :r\", USERS_TABLE_REGISTRATION_ATTRIBUTE));\n- expression_attribute_values\n- .insert(\":r\".into(), AttributeValue::B(Blob::new(reg.serialize())));\n+ expression_attribute_values.insert(\n+ \":r\".to_string(),\n+ AttributeValue::B(Blob::new(reg.serialize())),\n+ );\n};\nif let Some(username) = username {\nupdate_expression_parts\n.push(format!(\"{} = :u\", USERS_TABLE_USERNAME_ATTRIBUTE));\nexpression_attribute_values\n- .insert(\":u\".into(), AttributeValue::S(username));\n+ .insert(\":u\".to_string(), AttributeValue::S(username));\n};\nif let Some(public_key) = user_public_key {\nupdate_expression_parts\n.push(format!(\"{} = :k\", USERS_TABLE_USER_PUBLIC_KEY_ATTRIBUTE));\nexpression_attribute_values\n- .insert(\":k\".into(), AttributeValue::S(public_key));\n+ .insert(\":k\".to_string(), AttributeValue::S(public_key));\n};\nself\n@@ -188,30 +190,30 @@ impl DatabaseClient {\n) -> Result<PutItemOutput, Error> {\nlet item = HashMap::from([\n(\n- ACCESS_TOKEN_TABLE_PARTITION_KEY.into(),\n+ ACCESS_TOKEN_TABLE_PARTITION_KEY.to_string(),\nAttributeValue::S(access_token_data.user_id),\n),\n(\n- ACCESS_TOKEN_SORT_KEY.into(),\n+ ACCESS_TOKEN_SORT_KEY.to_string(),\nAttributeValue::S(access_token_data.device_id),\n),\n(\n- ACCESS_TOKEN_TABLE_TOKEN_ATTRIBUTE.into(),\n+ ACCESS_TOKEN_TABLE_TOKEN_ATTRIBUTE.to_string(),\nAttributeValue::S(access_token_data.access_token),\n),\n(\n- ACCESS_TOKEN_TABLE_CREATED_ATTRIBUTE.into(),\n+ ACCESS_TOKEN_TABLE_CREATED_ATTRIBUTE.to_string(),\nAttributeValue::S(access_token_data.created.to_rfc3339()),\n),\n(\n- ACCESS_TOKEN_TABLE_AUTH_TYPE_ATTRIBUTE.into(),\n+ ACCESS_TOKEN_TABLE_AUTH_TYPE_ATTRIBUTE.to_string(),\nAttributeValue::S(match access_token_data.auth_type {\nAuthType::Password => \"password\".to_string(),\nAuthType::Wallet => \"wallet\".to_string(),\n}),\n),\n(\n- ACCESS_TOKEN_TABLE_VALID_ATTRIBUTE.into(),\n+ ACCESS_TOKEN_TABLE_VALID_ATTRIBUTE.to_string(),\nAttributeValue::Bool(access_token_data.valid),\n),\n]);\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services][identity] address some nits Summary: changed `into()`s to `to_string()`s for clarity Test Plan: `cargo build` Reviewers: jon, tomek Reviewed By: jon, tomek Subscribers: ashoat, atul, abosh Differential Revision: https://phab.comm.dev/D5217
129,181
29.09.2022 14:06:46
-7,200
a8a7d9c7e94f8ab4c5cdd53deaf5d88f90983f7a
[services] Move constants to a separate file in commtest Summary: [ENG-1322](https://linear.app/comm/issue/ENG-1322/move-constants-to-a-separate-file) Moves constants from `tools.rs` to `constants.rs`. Test Plan: Check if it builds ``` cd services/commtest cargo test --no-run ``` Reviewers: varun, jon, marcin, tomek Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "services/commtest/src/backup/add_attachments.rs", "new_path": "services/commtest/src/backup/add_attachments.rs", "diff": "use crate::backup::backup_utils::{\nproto::AddAttachmentsRequest, BackupData, BackupServiceClient,\n};\n-use crate::tools::{Error, ATTACHMENT_DELIMITER};\n+use crate::constants::ATTACHMENT_DELIMITER;\n+use crate::tools::Error;\nuse tonic::Request;\n// log_index = None means that we add attachments to the backup\n" }, { "change_type": "MODIFY", "old_path": "services/commtest/src/backup/pull_backup.rs", "new_path": "services/commtest/src/backup/pull_backup.rs", "diff": "@@ -3,7 +3,8 @@ use crate::backup::backup_utils::{\nproto::pull_backup_response::Id, proto::pull_backup_response::Id::*,\nproto::PullBackupRequest, BackupData, BackupServiceClient, Item,\n};\n-use crate::tools::{Error, ATTACHMENT_DELIMITER};\n+use crate::constants::ATTACHMENT_DELIMITER;\n+use crate::tools::Error;\nuse std::io::{Error as IOError, ErrorKind};\nuse tonic::Request;\n" }, { "change_type": "ADD", "old_path": null, "new_path": "services/commtest/src/constants.rs", "diff": "+use bytesize::ByteSize;\n+use lazy_static::lazy_static;\n+\n+pub const ATTACHMENT_DELIMITER: &str = \";\";\n+\n+pub const GRPC_METADATA_SIZE_BYTES: usize = 5;\n+\n+lazy_static! {\n+ pub static ref DYNAMO_DB_ITEM_SIZE_LIMIT: usize =\n+ ByteSize::kib(400).as_u64() as usize;\n+ pub static ref GRPC_CHUNK_SIZE_LIMIT: usize =\n+ (ByteSize::mib(4).as_u64() as usize) - GRPC_METADATA_SIZE_BYTES;\n+}\n" }, { "change_type": "MODIFY", "old_path": "services/commtest/src/lib.rs", "new_path": "services/commtest/src/lib.rs", "diff": "pub mod backup;\npub mod blob;\n+pub mod constants;\npub mod tools;\n" }, { "change_type": "MODIFY", "old_path": "services/commtest/src/tools.rs", "new_path": "services/commtest/src/tools.rs", "diff": "-use bytesize::ByteSize;\nuse hex::ToHex;\n-use lazy_static::lazy_static;\nuse num_cpus;\nuse sha2::{Digest, Sha512};\nuse std::env;\n@@ -25,17 +23,6 @@ pub enum Error {\nTonicStatus(tonic::Status),\n}\n-pub const GRPC_METADATA_SIZE_BYTES: usize = 5;\n-\n-lazy_static! {\n- pub static ref DYNAMO_DB_ITEM_SIZE_LIMIT: usize =\n- ByteSize::kib(400).as_u64() as usize;\n- pub static ref GRPC_CHUNK_SIZE_LIMIT: usize =\n- (ByteSize::mib(4).as_u64() as usize) - GRPC_METADATA_SIZE_BYTES;\n-}\n-\n-pub const ATTACHMENT_DELIMITER: &str = \";\";\n-\npub fn obtain_number_of_threads() -> usize {\nlet number_of_threads_str: String =\nenv::var(\"COMM_NUMBER_OF_THREADS\").unwrap();\n" }, { "change_type": "MODIFY", "old_path": "services/commtest/tests/backup_integration_test.rs", "new_path": "services/commtest/tests/backup_integration_test.rs", "diff": "@@ -4,7 +4,8 @@ use commtest::backup::{\nbackup_utils::{self, BackupData, BackupServiceClient, Item},\ncreate_new_backup, pull_backup, send_log,\n};\n-use commtest::tools::{self, Error};\n+use commtest::constants;\n+use commtest::tools::Error;\nuse std::collections::HashMap;\nuse std::env;\n@@ -36,7 +37,7 @@ async fn backup_integration_test() -> Result<(), Error> {\nItem::new(\nString::new(),\nvec![\n- *tools::DYNAMO_DB_ITEM_SIZE_LIMIT\n+ *constants::DYNAMO_DB_ITEM_SIZE_LIMIT\n- ByteSize::b(attachments_fill_size / 2).as_u64() as usize,\n],\nvec![\"holder0\".to_string(), \"holder1\".to_string()],\n@@ -50,7 +51,10 @@ async fn backup_integration_test() -> Result<(), Error> {\n// a big item that should be placed in the S3 right away\nItem::new(\nString::new(),\n- vec![*tools::GRPC_CHUNK_SIZE_LIMIT, *tools::GRPC_CHUNK_SIZE_LIMIT],\n+ vec![\n+ *constants::GRPC_CHUNK_SIZE_LIMIT,\n+ *constants::GRPC_CHUNK_SIZE_LIMIT,\n+ ],\nvec![\n\"holder0\".to_string(),\n\"holder1\".to_string(),\n" }, { "change_type": "MODIFY", "old_path": "services/commtest/tests/blob_integration_test.rs", "new_path": "services/commtest/tests/blob_integration_test.rs", "diff": "@@ -3,7 +3,8 @@ use commtest::blob::{\nblob_utils::{BlobData, BlobServiceClient},\nget, put, remove,\n};\n-use commtest::tools::{self, Error};\n+use commtest::constants;\n+use commtest::tools::Error;\nuse std::env;\n#[tokio::test]\n@@ -27,8 +28,8 @@ async fn blob_integration_test() -> Result<(), Error> {\nholder: \"test_holder002\".to_string(),\nhash: \"test_hash002\".to_string(),\nchunks_sizes: vec![\n- *tools::GRPC_CHUNK_SIZE_LIMIT,\n- *tools::GRPC_CHUNK_SIZE_LIMIT,\n+ *constants::GRPC_CHUNK_SIZE_LIMIT,\n+ *constants::GRPC_CHUNK_SIZE_LIMIT,\nByteSize::b(10).as_u64() as usize,\n],\n},\n@@ -36,9 +37,9 @@ async fn blob_integration_test() -> Result<(), Error> {\nholder: \"test_holder003\".to_string(),\nhash: \"test_hash003\".to_string(),\nchunks_sizes: vec![\n- *tools::GRPC_CHUNK_SIZE_LIMIT,\n+ *constants::GRPC_CHUNK_SIZE_LIMIT,\nByteSize::b(100).as_u64() as usize,\n- *tools::GRPC_CHUNK_SIZE_LIMIT,\n+ *constants::GRPC_CHUNK_SIZE_LIMIT,\n],\n},\n];\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services] Move constants to a separate file in commtest Summary: [ENG-1322](https://linear.app/comm/issue/ENG-1322/move-constants-to-a-separate-file) Moves constants from `tools.rs` to `constants.rs`. Test Plan: Check if it builds ``` cd services/commtest cargo test --no-run ``` Reviewers: varun, jon, marcin, tomek Reviewed By: jon, marcin, tomek Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5203
129,178
28.09.2022 15:06:46
14,400
013cf5a51ca823409699ad22dc7e9b8914d59dab
[native] memoized textStyle and styles.text Summary: memoized `textStyle` and `styles.text` into `markdownStyles` for improved performance Test Plan: Open a chat with any markdown components (blockquote, codeblock, etc) and everything should be the same Reviewers: atul, abosh, rohan, kamil Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "native/chat/inner-text-message.react.js", "new_path": "native/chat/inner-text-message.react.js", "diff": "@@ -70,7 +70,6 @@ function InnerTextMessage(props: Props): React.Node {\nconst boundColors = useColors();\nconst messageStyle = {};\n- const textStyle = {};\nlet darkColor;\nif (isViewer) {\nconst threadColor = item.threadInfo.color;\n@@ -81,9 +80,6 @@ function InnerTextMessage(props: Props): React.Node {\nmessageStyle.backgroundColor = boundColors.listChatBubble;\ndarkColor = activeTheme === 'dark';\n}\n- textStyle.color = darkColor\n- ? colors.dark.listForegroundLabel\n- : colors.light.listForegroundLabel;\nconst cornerStyle = getRoundedContainerStyle(filterCorners(allCorners, item));\n@@ -95,6 +91,16 @@ function InnerTextMessage(props: Props): React.Node {\nconst rules = useTextMessageMarkdownRules(darkColor);\n+ const markdownStyles = React.useMemo(() => {\n+ const textStyle = {\n+ color: darkColor\n+ ? colors.dark.listForegroundLabel\n+ : colors.light.listForegroundLabel,\n+ };\n+\n+ return [styles.text, textStyle];\n+ }, [darkColor]);\n+\nconst message = (\n<TouchableWithoutFeedback>\n<View>\n@@ -105,7 +111,7 @@ function InnerTextMessage(props: Props): React.Node {\nstyle={[styles.message, cornerStyle]}\nanimatedStyle={messageStyle}\n>\n- <Markdown style={[styles.text, textStyle]} rules={rules}>\n+ <Markdown style={markdownStyles} rules={rules}>\n{text}\n</Markdown>\n</GestureTouchableOpacity>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] memoized textStyle and styles.text Summary: memoized `textStyle` and `styles.text` into `markdownStyles` for improved performance Test Plan: Open a chat with any markdown components (blockquote, codeblock, etc) and everything should be the same Reviewers: atul, abosh, rohan, kamil Reviewed By: atul, rohan Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5251
129,187
01.10.2022 15:32:14
14,400
67c26f2cfad6006e6a52770708aaed1c2046ddcb
[native] Bump SDWebImage on iOS Summary: iOS part of `react-native-fast-image`. Noticed it was out of date, might as well bump. Test Plan: Haven't tested, minor version bump seems fine Reviewers: atul Subscribers: tomek, abosh
[ { "change_type": "MODIFY", "old_path": "native/ios/Podfile.lock", "new_path": "native/ios/Podfile.lock", "diff": "@@ -901,9 +901,9 @@ PODS:\n- React-Core\n- RNVectorIcons (6.6.0):\n- React\n- - SDWebImage (5.12.3):\n- - SDWebImage/Core (= 5.12.3)\n- - SDWebImage/Core (5.12.3)\n+ - SDWebImage (5.12.5):\n+ - SDWebImage/Core (= 5.12.5)\n+ - SDWebImage/Core (5.12.5)\n- SDWebImageWebPCoder (0.6.1):\n- libwebp (~> 1.0)\n- SDWebImage/Core (~> 5.7)\n@@ -1307,7 +1307,7 @@ SPEC CHECKSUMS:\nRNScreens: 6e1ea5787989f92b0671049b808aef64fa1ef98c\nRNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8\nRNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4\n- SDWebImage: 53179a2dba77246efa8a9b85f5c5b21f8f43e38f\n+ SDWebImage: 0905f1b7760fc8ac4198cae0036600d67478751e\nSDWebImageWebPCoder: d0dac55073088d24b2ac1b191a71a8f8d0adac21\nSPTPersistentCache: df36ea46762d7cf026502bbb86a8b79d0080dff4\nSQLCipher-Amalgamation: cbd36045fe7b458b8a442958a01aefdbc44c20f8\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Bump SDWebImage on iOS Summary: iOS part of `react-native-fast-image`. Noticed it was out of date, might as well bump. Test Plan: Haven't tested, minor version bump seems fine Reviewers: atul Reviewed By: atul Subscribers: tomek, abosh Differential Revision: https://phab.comm.dev/D5278
129,181
30.09.2022 16:24:40
-7,200
4fda171b4a664634e214144377a959ba59df01c7
[web] Notifications dialog - change name Summary: [ENG-1729](https://linear.app/comm/issue/ENG-1729/update-notifications-dialog-to-handle-threads-correctly) Changes notifications dialog title for sidebars from "Channel notifications" to "Thread notifications". Test Plan: Test if the title is correct for sidebars and non-sidebars. Reviewers: tomek, atul, abosh, ashoat Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/modals/threads/notifications/notifications-modal.react.js", "new_path": "web/modals/threads/notifications/notifications-modal.react.js", "diff": "@@ -7,6 +7,7 @@ import {\nupdateSubscriptionActionTypes,\n} from 'lib/actions/user-actions';\nimport { threadInfoSelector } from 'lib/selectors/thread-selectors';\n+import { threadIsSidebar } from 'lib/shared/thread-utils';\nimport {\nuseServerCall,\nuseDispatchActionPromise,\n@@ -90,6 +91,7 @@ function NotificationsModal(props: Props): React.Node {\nconst { onClose, threadID } = props;\nconst threadInfo = useSelector(state => threadInfoSelector(state)[threadID]);\nconst { subscription } = threadInfo.currentUser;\n+ const isSidebar = threadIsSidebar(threadInfo);\nconst initialThreadSetting = React.useMemo<NotificationSettings>(() => {\nif (!subscription.home) {\n@@ -185,8 +187,12 @@ function NotificationsModal(props: Props): React.Node {\nthreadID,\n]);\n+ const modalName = isSidebar\n+ ? 'Thread notifications'\n+ : 'Channel notifications';\n+\nreturn (\n- <Modal name=\"Channel notifications\" size=\"fit-content\" onClose={onClose}>\n+ <Modal name={modalName} size=\"fit-content\" onClose={onClose}>\n<div className={css.container}>\n<div className={css.optionsContainer}>\n{focusedItem}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Notifications dialog - change name Summary: [ENG-1729](https://linear.app/comm/issue/ENG-1729/update-notifications-dialog-to-handle-threads-correctly) Changes notifications dialog title for sidebars from "Channel notifications" to "Thread notifications". Test Plan: Test if the title is correct for sidebars and non-sidebars. Reviewers: tomek, atul, abosh, ashoat Reviewed By: ashoat Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5279
129,184
05.10.2022 10:43:53
14,400
2e9ead6b523e8ff86c787a4097c3c3a986c3c4a0
[CommCoreModule] Cut extraneous `include`s Summary: Noticed these while working on the "C++ side" of `native`. Test Plan: CI Reviewers: tomek, marcin, abosh, rohan, ginsu, jon Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp", "new_path": "native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp", "diff": "#include \"Logger.h\"\n#include \"sqlite_orm.h\"\n-#include \"entities/Media.h\"\n#include \"entities/Metadata.h\"\n-#include <sqlite3.h>\n-#include <cerrno>\n-#include <cstdio>\n-#include <cstring>\n#include <fstream>\n#include <iostream>\n-#include <memory>\n-#include <sstream>\n-#include <string>\n-#include <system_error>\n#include <thread>\n#ifdef __ANDROID__\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp", "diff": "#include \"DatabaseManager.h\"\n#include \"GRPCStreamHostObject.h\"\n#include \"InternalModules/GlobalNetworkSingleton.h\"\n-#include \"InternalModules/NetworkModule.h\"\n-#include \"Logger.h\"\n#include \"MessageStoreOperations.h\"\n#include \"ThreadStoreOperations.h\"\n-#include <folly/Optional.h>\n-\n-#include \"../DatabaseManagers/entities/Media.h\"\n-\n#include <ReactCommon/TurboModuleUtils.h>\n#include <future>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[CommCoreModule] Cut extraneous `include`s Summary: Noticed these while working on the "C++ side" of `native`. Test Plan: CI Reviewers: tomek, marcin, abosh, rohan, ginsu, jon Reviewed By: tomek, marcin, rohan Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5297
129,196
05.10.2022 11:38:25
-7,200
c53645b2695019a3788c4e4e9efc35b548f28e63
Use GlobalDBSingleton when touching database from the native iOS code. Summary: This differential replaces any direct database access in iOS native code with GlobalDBSingleton API Test Plan: Creating test release with those changes would remove iOS 137 crash Reviewers: tomek, atul, jon Subscribers: ashoat, abosh
[ { "change_type": "MODIFY", "old_path": "native/ios/Comm/AppDelegate.mm", "new_path": "native/ios/Comm/AppDelegate.mm", "diff": "#import <reacthermes/HermesExecutorFactory.h>\n#import \"CommCoreModule.h\"\n+#import \"GlobalDBSingleton.h\"\n#import \"GlobalNetworkSingleton.h\"\n#import \"Logger.h\"\n#import \"MessageOperationsUtilities.h\"\n@@ -168,7 +169,9 @@ NSString *const setUnreadStatusKey = @\"setUnreadStatus\";\n// this callback may be called from inactive state so we need\n// to initialize the database\n[self attemptDatabaseInitialization];\n+ comm::GlobalDBSingleton::instance.scheduleOrRun([threadID]() mutable {\ncomm::ThreadOperations::updateSQLiteUnreadStatus(threadID, false);\n+ });\n}\n[[UNUserNotificationCenter currentNotificationCenter]\ngetDeliveredNotificationsWithCompletionHandler:^(\n@@ -271,7 +274,9 @@ using Runtime = facebook::jsi::Runtime;\nNSArray<NSString *> *messages = [temporaryStorage readAndClearMessages];\nfor (NSString *message in messages) {\nstd::string messageInfos = std::string([message UTF8String]);\n+ comm::GlobalDBSingleton::instance.scheduleOrRun([messageInfos]() mutable {\ncomm::MessageOperationsUtilities::storeMessageInfos(messageInfos);\n+ });\n}\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Use GlobalDBSingleton when touching database from the native iOS code. Summary: This differential replaces any direct database access in iOS native code with GlobalDBSingleton API Test Plan: Creating test release with those changes would remove iOS 137 crash Reviewers: tomek, atul, jon Reviewed By: tomek, jon Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5234
129,184
12.10.2022 16:46:04
14,400
a8cd33e220756bc0a4c00fa4c6bbf8abe6cd8de6
[native] `codeVersion` -> 148
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -434,8 +434,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 147\n- versionName '1.0.147'\n+ versionCode 148\n+ versionName '1.0.148'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{147};\n+ const int codeVersion{148};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 147;\n+ CURRENT_PROJECT_VERSION = 148;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.147;\n+ MARKETING_VERSION = 1.0.148;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 147;\n+ CURRENT_PROJECT_VERSION = 148;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.147;\n+ MARKETING_VERSION = 1.0.148;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.147</string>\n+ <string>1.0.148</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>147</string>\n+ <string>148</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.147</string>\n+ <string>1.0.148</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>147</string>\n+ <string>148</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 148
129,184
14.10.2022 11:08:46
14,400
8942adfb59f71f27b7ffb835b69d2874a086a5fc
[native] `codeVersion` -> 149
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -434,8 +434,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 148\n- versionName '1.0.148'\n+ versionCode 149\n+ versionName '1.0.149'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{148};\n+ const int codeVersion{149};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 148;\n+ CURRENT_PROJECT_VERSION = 149;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.148;\n+ MARKETING_VERSION = 1.0.149;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 148;\n+ CURRENT_PROJECT_VERSION = 149;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.148;\n+ MARKETING_VERSION = 1.0.149;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.148</string>\n+ <string>1.0.149</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>148</string>\n+ <string>149</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.148</string>\n+ <string>1.0.149</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>148</string>\n+ <string>149</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 149
129,178
14.10.2022 17:35:06
14,400
d5c68d0516645aee0bcc2bf4dc8f9bfc9f244182
[landing] added classnames dependency Summary: added `classnames` dependency. This is so that we can use add conditional logic to Investor Profile Card Modal classes. We use this in the `web` codebase Test Plan: N/A Reviewers: ashoat, atul Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "landing/package.json", "new_path": "landing/package.json", "diff": "\"@lottiefiles/lottie-interactivity\": \"^0.1.4\",\n\"@lottiefiles/lottie-player\": \"^1.0.3\",\n\"@rainbow-me/rainbowkit\": \"^0.5.0\",\n+ \"classnames\": \"^2.2.5\",\n\"core-js\": \"^3.6.5\",\n\"ethers\": \"^5.7.0\",\n\"invariant\": \"^2.2.4\",\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] added classnames dependency Summary: added `classnames` dependency. This is so that we can use add conditional logic to Investor Profile Card Modal classes. We use this in the `web` codebase Test Plan: N/A Reviewers: ashoat, atul Reviewed By: ashoat, atul Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5337
129,181
04.10.2022 14:49:34
-7,200
9b70699e472d331cb13f348a15d14a6acf51cc8e
[web] Use Button in join chat button Summary: [[ | Part of ]] Uses `Button` in join chat button instead of a plain `<button>`. Test Plan: Check if the button looks the same and works correctly. Reviewers: tomek, atul, abosh, ginsu Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/chat/chat-input-bar.css", "new_path": "web/chat/chat-input-bar.css", "diff": "@@ -37,28 +37,8 @@ div.joinButtonContainer {\nwidth: 100%;\njustify-content: center;\n}\n-button.joinButton {\n- display: flex;\n- align-items: center;\n- border: none;\n- padding: 12px 24px;\n- border-radius: 4px;\n- color: var(--fg);\n- font-size: var(--m-font-16);\n- font-weight: var(--semi-bold);\n- cursor: pointer;\n-}\n-\n-button.joinButton {\n- display: flex;\n- border-radius: 4px;\n- justify-content: center;\n- cursor: pointer;\n-}\np.joinButtonText {\n- font-size: var(--m-font-16);\nfont-weight: var(--semi-bold);\n- color: var(--fg);\npadding-left: 8px;\n}\nspan.explanation {\n" }, { "change_type": "MODIFY", "old_path": "web/chat/chat-input-bar.react.js", "new_path": "web/chat/chat-input-bar.react.js", "diff": "@@ -34,6 +34,7 @@ import {\nuseDispatchActionPromise,\n} from 'lib/utils/action-utils';\n+import Button from '../components/button.react';\nimport {\ntype InputState,\ntype PendingMultimediaUpload,\n@@ -185,13 +186,13 @@ class ChatInputBar extends React.PureComponent<Props> {\n}\njoinButton = (\n<div className={css.joinButtonContainer}>\n- <button\n+ <Button\n+ variant=\"filled\"\n+ buttonColor={{ backgroundColor: `#${this.props.threadInfo.color}` }}\nonClick={this.onClickJoin}\n- className={css.joinButton}\n- style={{ backgroundColor: `#${this.props.threadInfo.color}` }}\n>\n{buttonContent}\n- </button>\n+ </Button>\n</div>\n);\n}\n@@ -414,8 +415,7 @@ class ChatInputBar extends React.PureComponent<Props> {\n}\n};\n- onClickJoin = (event: SyntheticEvent<HTMLAnchorElement>) => {\n- event.preventDefault();\n+ onClickJoin = () => {\nthis.props.dispatchActionPromise(joinThreadActionTypes, this.joinAction());\n};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Use Button in join chat button Summary: [[ https://linear.app/comm/issue/ENG-843 | Part of ENG-843 ]] Uses `Button` in join chat button instead of a plain `<button>`. Test Plan: Check if the button looks the same and works correctly. Reviewers: tomek, atul, abosh, ginsu Reviewed By: tomek, atul, ginsu Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5323
129,181
05.10.2022 19:44:30
-7,200
890a351a31e720145b8bac1f58d8dc71da9115ba
[web] Use Button for relationship buttons Summary: [Part of ENG-843](https://linear.app/comm/issue/ENG-843) Uses `Button` for the relationship buttons instead of plain `<button>` Test Plan: Test if the buttons look the same. Reviewers: tomek, atul, abosh, ginsu Subscribers: ashoat
[ { "change_type": "MODIFY", "old_path": "web/chat/relationship-prompt/relationship-prompt-button.js", "new_path": "web/chat/relationship-prompt/relationship-prompt-button.js", "diff": "@@ -4,30 +4,28 @@ import { type IconDefinition } from '@fortawesome/fontawesome-common-types';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport * as React from 'react';\n+import Button, { type ButtonColor } from '../../components/button.react';\nimport css from './relationship-prompt.css';\ntype Props = {\n+text: string,\n+icon: IconDefinition,\n- +color?: string,\n- +textColor?: string,\n+ +buttonColor: ButtonColor,\n+onClick: () => void,\n};\nfunction RelationshipPromptButton(props: Props): React.Node {\n- const { text, icon, color, textColor, onClick } = props;\n- const buttonStyle = React.useMemo(\n- () => ({\n- backgroundColor: `var(${color ?? '--relationship-button-green'})`,\n- color: `var(${textColor ?? '--relationship-button-text'})`,\n- }),\n- [color, textColor],\n- );\n+ const { text, icon, buttonColor, onClick } = props;\nreturn (\n- <button className={css.promptButton} onClick={onClick} style={buttonStyle}>\n+ <Button\n+ variant=\"filled\"\n+ buttonColor={buttonColor}\n+ onClick={onClick}\n+ className={css.promptButton}\n+ >\n<FontAwesomeIcon icon={icon} className={css.promptIcon} />\n- {text}\n- </button>\n+ <p className={css.promptText}>{text}</p>\n+ </Button>\n);\n}\n" }, { "change_type": "MODIFY", "old_path": "web/chat/relationship-prompt/relationship-prompt.css", "new_path": "web/chat/relationship-prompt/relationship-prompt.css", "diff": "div.promptButtonContainer {\ndisplay: flex;\n}\n+\nbutton.promptButton {\n- font-size: var(--m-font-16);\n- font-weight: var(--semi-bold);\n- cursor: pointer;\n- margin: 0.5rem;\n- padding: 1.2rem;\n- display: flex;\n- flex-direction: row;\n- align-items: center;\n- justify-content: center;\nflex: 1;\n- border-radius: 0.4rem;\n- border: none;\n+ margin: 0.5rem;\n+}\n+\n+p.promptText {\n+ font-weight: var(--semi-bold);\n}\nsvg.promptIcon {\n" }, { "change_type": "MODIFY", "old_path": "web/chat/relationship-prompt/relationship-prompt.js", "new_path": "web/chat/relationship-prompt/relationship-prompt.js", "diff": "@@ -12,6 +12,7 @@ import { useRelationshipPrompt } from 'lib/hooks/relationship-prompt';\nimport { userRelationshipStatus } from 'lib/types/relationship-types';\nimport type { ThreadInfo } from 'lib/types/thread-types';\n+import { buttonThemes } from '../../components/button.react';\nimport RelationshipPromptButton from './relationship-prompt-button';\nimport RelationshipPromptButtonContainer from './relationship-prompt-button-container';\n@@ -36,7 +37,7 @@ function RelationshipPrompt(props: Props) {\n<RelationshipPromptButton\ntext=\"Block User\"\nicon={faUserShield}\n- color=\"--relationship-button-red\"\n+ buttonColor={buttonThemes.danger}\nonClick={blockUser}\n/>\n</RelationshipPromptButtonContainer>\n@@ -50,7 +51,7 @@ function RelationshipPrompt(props: Props) {\n<RelationshipPromptButton\ntext=\"Unblock User\"\nicon={faUserShield}\n- color=\"--relationship-button-green\"\n+ buttonColor={buttonThemes.success}\nonClick={unblockUser}\n/>\n</RelationshipPromptButtonContainer>\n@@ -61,13 +62,13 @@ function RelationshipPrompt(props: Props) {\n<RelationshipPromptButton\ntext=\"Accept Friend Request\"\nicon={faUserPlus}\n- color=\"--relationship-button-green\"\n+ buttonColor={buttonThemes.success}\nonClick={friendUser}\n/>\n<RelationshipPromptButton\ntext=\"Reject Friend Request\"\nicon={faUserSlash}\n- color=\"--relationship-button-red\"\n+ buttonColor={buttonThemes.danger}\nonClick={unfriendUser}\n/>\n</RelationshipPromptButtonContainer>\n@@ -78,7 +79,7 @@ function RelationshipPrompt(props: Props) {\n<RelationshipPromptButton\ntext=\"Withdraw Friend Request\"\nicon={faUserMinus}\n- color=\"--relationship-button-red\"\n+ buttonColor={buttonThemes.danger}\nonClick={unfriendUser}\n/>\n</RelationshipPromptButtonContainer>\n@@ -89,13 +90,13 @@ function RelationshipPrompt(props: Props) {\n<RelationshipPromptButton\ntext=\"Add Friend\"\nicon={faUserPlus}\n- color=\"--relationship-button-green\"\n+ buttonColor={buttonThemes.success}\nonClick={friendUser}\n/>\n<RelationshipPromptButton\ntext=\"Block User\"\nicon={faUserShield}\n- color=\"--relationship-button-red\"\n+ buttonColor={buttonThemes.danger}\nonClick={blockUser}\n/>\n</RelationshipPromptButtonContainer>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[web] Use Button for relationship buttons Summary: [Part of ENG-843](https://linear.app/comm/issue/ENG-843) Uses `Button` for the relationship buttons instead of plain `<button>` Test Plan: Test if the buttons look the same. Reviewers: tomek, atul, abosh, ginsu Reviewed By: atul, ginsu Subscribers: ashoat Differential Revision: https://phab.comm.dev/D5324
129,178
20.10.2022 11:18:09
14,400
f7fdc72ea2969a2e49e40608ca7d795b48cbeb5d
[landing] added derek to the team page Summary: added derek's profile to the team page Test Plan: please review the screenshots to see the before and after Before: {F204631} After: {F204632} Reviewers: atul, rohan Subscribers: ashoat, tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "landing/team.react.js", "new_path": "landing/team.react.js", "diff": "@@ -56,6 +56,13 @@ function Team(): React.Node {\ntwitterHandle=\"GeekMaks\"\nimageURL={`${assetsCacheURLPrefix}/max.jpeg`}\n/>\n+ <TeamProfile\n+ name=\"Derek Nelson\"\n+ role=\"Software Engineer\"\n+ githubHandle=\"dereknelson\"\n+ twitterHandle=\"prodigynelson\"\n+ imageURL={`${assetsCacheURLPrefix}/derek.jpeg`}\n+ />\n<TeamProfile\nname=\"Jon Ringer\"\nrole=\"Software Engineer\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] added derek to the team page Summary: added derek's profile to the team page Test Plan: please review the screenshots to see the before and after Before: {F204631} After: {F204632} Reviewers: atul, rohan Reviewed By: atul, rohan Subscribers: ashoat, tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5439
129,200
10.10.2022 13:24:45
14,400
1913390844bca461d77497ec41b34ea7812c4420
CMakeLists.txt changes to compile native rust library on android Summary: This differential introduces changes necessary to compile native rust library on Android Test Plan: Build android app Reviewers: marcin, jon Subscribers: ashoat, atul, abosh
[ { "change_type": "MODIFY", "old_path": "native/android/app/CMakeLists.txt", "new_path": "native/android/app/CMakeLists.txt", "diff": "@@ -40,6 +40,19 @@ set(gRPC_SSL_PROVIDER \"package\" CACHE STRING \"SSL library provider\")\n# gRPC client\ninclude(FetchContent)\n+if(CMAKE_ANDROID_ARCH_ABI STREQUAL arm64-v8a)\n+ set(Rust_CARGO_TARGET aarch64-linux-android)\n+elseif(CMAKE_ANDROID_ARCH_ABI STREQUAL x86)\n+ set(Rust_CARGO_TARGET i686-linux-android)\n+elseif(CMAKE_ANDROID_ARCH_ABI STREQUAL x86_64)\n+ set(Rust_CARGO_TARGET x86_64-linux-android)\n+elseif(CMAKE_ANDROID_ARCH_ABI STREQUAL armeabi-v7a)\n+ set(Rust_CARGO_TARGET arm-linux-androideabi)\n+endif()\n+\n+string(TOLOWER ${CMAKE_HOST_SYSTEM_NAME} CMAKE_HOST_SYSTEM_NAME_LOWER)\n+set(AR $ENV{ANDROID_HOME}/ndk/${NDK_VERSION}/toolchains/llvm/prebuilt/${CMAKE_HOST_SYSTEM_NAME_LOWER}-x86_64/bin/${Rust_CARGO_TARGET}-ar)\n+\nFetchContent_Declare(\nCorrosion\nGIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git\n@@ -48,6 +61,21 @@ FetchContent_Declare(\nFetchContent_MakeAvailable(Corrosion)\n+include(../../../shared/cmake/corrosion-cxx.cmake)\n+\n+add_custom_target(install_rust_target_platforms ALL\n+ COMMAND\n+ rustup target add aarch64-linux-android armv7-linux-androideabi\n+ i686-linux-android arm-linux-androideabi\n+ WORKING_DIRECTORY\n+ ${CMAKE_CURRENT_SOURCE_DIR}\n+ COMMENT\n+ \"Installing rust platform targets dependencies\"\n+)\n+\n+add_library_rust(PATH ../../native_rust_library NAMESPACE comm)\n+add_dependencies(native_rust_library-total install_rust_target_platforms)\n+\n# Disable unused plugins\nset(gRPC_BUILD_GRPC_PHP_PLUGIN OFF)\nset(gRPC_BUILD_GRPC_RUBY_PLUGIN OFF)\n@@ -110,6 +138,9 @@ include_directories(\n../../cpp/CommonCpp/Tools\n../../../shared/protos/_generated\n../../cpp/CommonCpp/grpc\n+\n+ # native rust library\n+ ../../native_rust_library\n)\n# search for all cpp files in this directory\n@@ -229,6 +260,7 @@ target_link_libraries(\nopenssl-ssl\ngrpc++\nlibprotobuf\n+ comm::native_rust_library\n)\n# add a dummy library which is required by CallInvokerHolderImpl.java\n" }, { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -499,7 +499,8 @@ android {\narguments \"-DANDROID_STL=c++_shared\",\n\"-DGLOG_VERSION=\" + GLOG_VERSION,\n\"-DOPENSSL_VERSION=\" + OPENSSL_VERSION,\n- \"-DGRPC_VERSION=\" + GRPC_VERSION\n+ \"-DGRPC_VERSION=\" + GRPC_VERSION,\n+ \"-DNDK_VERSION=\" + rootProject.ext.ndkVersion\ntargets \"comm_jni_module\", \"turbomodulejsijni\"\n}\n}\n" }, { "change_type": "MODIFY", "old_path": "shared/cmake/corrosion-cxx.cmake", "new_path": "shared/cmake/corrosion-cxx.cmake", "diff": "@@ -46,9 +46,15 @@ function(add_library_rust)\ncorrosion_import_crate(MANIFEST_PATH \"${lib_path}/Cargo.toml\")\n- # Set cxxbridge values\nget_filename_component(_LIB_PATH_STEM ${lib_path} NAME)\nmessage(STATUS \"Library stem path: ${_LIB_PATH_STEM}\")\n+\n+ # Set AR env var if it's present (Android-specific)\n+ if(AR)\n+ corrosion_set_env_vars(${_LIB_PATH_STEM} \"AR=${AR}\")\n+ endif()\n+\n+ # Set cxxbridge values\nset(\ncxx_bridge_binary_folder\n${CMAKE_BINARY_DIR}/cargo/build/${Rust_CARGO_TARGET}/cxxbridge)\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
CMakeLists.txt changes to compile native rust library on android Summary: This differential introduces changes necessary to compile native rust library on Android Test Plan: Build android app Reviewers: marcin, jon Reviewed By: marcin, jon Subscribers: ashoat, atul, abosh Differential Revision: https://phab.comm.dev/D5188
129,187
04.10.2022 16:24:11
14,400
572a4a4d0290fbefc106d447b3fbdc236040106d
[native] [1/34] ReactNav6: Drop "dangerously" from getParent and getState Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#dropped-dangerously-from-dangerouslygetparent-and-dangerouslygetstate). Depends on D5393 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/chat/chat-list.react.js", "new_path": "native/chat/chat-list.react.js", "diff": "@@ -75,7 +75,7 @@ class ChatList extends React.PureComponent<Props, State> {\ncomponentDidMount() {\nconst tabNavigation: ?TabNavigationProp<\n'Chat',\n- > = this.props.navigation.dangerouslyGetParent();\n+ > = this.props.navigation.getParent();\ninvariant(tabNavigation, 'ChatNavigator should be within TabNavigator');\ntabNavigation.addListener('tabPress', this.onTabPress);\n}\n@@ -83,7 +83,7 @@ class ChatList extends React.PureComponent<Props, State> {\ncomponentWillUnmount() {\nconst tabNavigation: ?TabNavigationProp<\n'Chat',\n- > = this.props.navigation.dangerouslyGetParent();\n+ > = this.props.navigation.getParent();\ninvariant(tabNavigation, 'ChatNavigator should be within TabNavigator');\ntabNavigation.removeListener('tabPress', this.onTabPress);\n}\n" }, { "change_type": "MODIFY", "old_path": "native/chat/chat-thread-list.react.js", "new_path": "native/chat/chat-thread-list.react.js", "diff": "@@ -157,11 +157,11 @@ class ChatThreadList extends React.PureComponent<Props, State> {\nconst chatNavigation: ?ChatNavigationProp<\n'ChatThreadList',\n- > = this.props.navigation.dangerouslyGetParent();\n+ > = this.props.navigation.getParent();\ninvariant(chatNavigation, 'ChatNavigator should be within TabNavigator');\nconst tabNavigation: ?TabNavigationProp<\n'Chat',\n- > = chatNavigation.dangerouslyGetParent();\n+ > = chatNavigation.getParent();\ninvariant(tabNavigation, 'ChatNavigator should be within TabNavigator');\ntabNavigation.addListener('tabPress', this.onTabPress);\n@@ -173,11 +173,11 @@ class ChatThreadList extends React.PureComponent<Props, State> {\nconst chatNavigation: ?ChatNavigationProp<\n'ChatThreadList',\n- > = this.props.navigation.dangerouslyGetParent();\n+ > = this.props.navigation.getParent();\ninvariant(chatNavigation, 'ChatNavigator should be within TabNavigator');\nconst tabNavigation: ?TabNavigationProp<\n'Chat',\n- > = chatNavigation.dangerouslyGetParent();\n+ > = chatNavigation.getParent();\ninvariant(tabNavigation, 'ChatNavigator should be within TabNavigator');\ntabNavigation.removeListener('tabPress', this.onTabPress);\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings.react.js", "new_path": "native/chat/settings/thread-settings.react.js", "diff": "@@ -1084,9 +1084,7 @@ const ConnectedThreadSettings: React.ComponentType<BaseProps> = React.memo<BaseP\nconst { navigation } = props;\nReact.useEffect(() => {\n- const tabNavigation: ?TabNavigationProp<\n- 'Chat',\n- > = navigation.dangerouslyGetParent();\n+ const tabNavigation: ?TabNavigationProp<'Chat'> = navigation.getParent();\ninvariant(tabNavigation, 'ChatNavigator should be within TabNavigator');\nconst onTabPress = () => {\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -870,8 +870,8 @@ declare module '@react-navigation/bottom-tabs' {\n+goBack: () => void,\n+isFocused: () => boolean,\n+canGoBack: () => boolean,\n- +dangerouslyGetParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n- +dangerouslyGetState: () => NavigationState,\n+ +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n+ +getState: () => NavigationState,\n+addListener: <EventName: $Keys<\n{| ...EventMap, ...EventMapCore<State> |},\n>>(\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -870,8 +870,8 @@ declare module '@react-navigation/devtools' {\n+goBack: () => void,\n+isFocused: () => boolean,\n+canGoBack: () => boolean,\n- +dangerouslyGetParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n- +dangerouslyGetState: () => NavigationState,\n+ +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n+ +getState: () => NavigationState,\n+addListener: <EventName: $Keys<\n{| ...EventMap, ...EventMapCore<State> |},\n>>(\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -870,8 +870,8 @@ declare module '@react-navigation/material-top-tabs' {\n+goBack: () => void,\n+isFocused: () => boolean,\n+canGoBack: () => boolean,\n- +dangerouslyGetParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n- +dangerouslyGetState: () => NavigationState,\n+ +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n+ +getState: () => NavigationState,\n+addListener: <EventName: $Keys<\n{| ...EventMap, ...EventMapCore<State> |},\n>>(\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -870,8 +870,8 @@ declare module '@react-navigation/native' {\n+goBack: () => void,\n+isFocused: () => boolean,\n+canGoBack: () => boolean,\n- +dangerouslyGetParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n- +dangerouslyGetState: () => NavigationState,\n+ +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n+ +getState: () => NavigationState,\n+addListener: <EventName: $Keys<\n{| ...EventMap, ...EventMapCore<State> |},\n>>(\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -870,8 +870,8 @@ declare module '@react-navigation/stack' {\n+goBack: () => void,\n+isFocused: () => boolean,\n+canGoBack: () => boolean,\n- +dangerouslyGetParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n- +dangerouslyGetState: () => NavigationState,\n+ +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n+ +getState: () => NavigationState,\n+addListener: <EventName: $Keys<\n{| ...EventMap, ...EventMapCore<State> |},\n>>(\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [1/34] ReactNav6: Drop "dangerously" from getParent and getState Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#dropped-dangerously-from-dangerouslygetparent-and-dangerouslygetstate). Depends on D5393 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5394
129,187
07.10.2022 10:47:05
14,400
58c70a5008cfbc8a46244233c501cb85b9e02c80
[native] [3/34] ReactNav6: drop useLinking hook Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#dropped-uselinking-hook). Depends on D5395 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -2236,11 +2236,6 @@ declare module '@react-navigation/native' {\n...\n}>;\n- declare export function useLinking(\n- container: { +current: ?React$ElementRef<NavigationContainerType>, ... },\n- options: LinkingOptions,\n- ): {| +getInitialState: () => Promise<?PossiblyStaleNavigationState> |};\n-\ndeclare export function useLinkTo(): (path: string) => void;\ndeclare export function useLinkProps<To: string>(props: {|\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [3/34] ReactNav6: drop useLinking hook Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#dropped-uselinking-hook). Depends on D5395 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5396
129,187
07.10.2022 10:59:53
14,400
921a800c6ac64c06b2303b0560a08c287af30acf
[native] [4/34] ReactNav6: update LinkTo to accept screen name Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#link-and-uselinkprops-can-now-accept-screen-names). Depends on D5396 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -2228,21 +2228,32 @@ declare module '@react-navigation/native' {\n* Linking\n*/\n+ declare export type LinkTo<\n+ ParamList: ParamListBase,\n+ RouteName: $Keys<ParamList>,\n+ > =\n+ | string\n+ | {| +screen: RouteName, +params?: $ElementType<ParamList, RouteName> |};\n+\ndeclare export var Link: React$ComponentType<{\n- +to: string,\n+ +to: LinkTo<>,\n+action?: GenericNavigationAction,\n+target?: string,\n+children: React$Node,\n...\n}>;\n- declare export function useLinkTo(): (path: string) => void;\n+ declare export function useLinkTo<ParamList: ParamListBase>(\n+ ): (path: LinkTo<ParamList,>) => void;\n- declare export function useLinkProps<To: string>(props: {|\n- +to: To,\n+ declare export function useLinkProps<\n+ ParamList: ParamListBase,\n+ RouteName: $Keys<ParamList>,\n+ >(props: {|\n+ +to: LinkTo<ParamList, RouteName>,\n+action?: GenericNavigationAction,\n|}): {|\n- +href: To,\n+ +href: string,\n+accessibilityRole: 'link',\n+onPress: (MouseEvent | PressEvent) => void,\n|};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [4/34] ReactNav6: update LinkTo to accept screen name Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#link-and-uselinkprops-can-now-accept-screen-names). Depends on D5396 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5397
129,187
07.10.2022 13:39:11
14,400
fe6624bec8cd5ab5ea963ac1f1d3a0b2aa59836a
[native] [7/34] ReactNav6: add Group component Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#new-group-component). Depends on D5399 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -1078,6 +1078,11 @@ declare module '@react-navigation/bottom-tabs' {\n...$Exact<ExtraNavigatorProps>,\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n|}>,\n+ +Group: React$ComponentType<{|\n+ ...ScreenOptionsProp<ScreenOptions, NavProp>,\n+ +children: React$Node,\n+ +navigationKey?: string,\n+ |}>,\n|};\ndeclare export type CreateNavigatorFactory = <\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -1078,6 +1078,11 @@ declare module '@react-navigation/devtools' {\n...$Exact<ExtraNavigatorProps>,\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n|}>,\n+ +Group: React$ComponentType<{|\n+ ...ScreenOptionsProp<ScreenOptions, NavProp>,\n+ +children: React$Node,\n+ +navigationKey?: string,\n+ |}>,\n|};\ndeclare export type CreateNavigatorFactory = <\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -1078,6 +1078,11 @@ declare module '@react-navigation/material-top-tabs' {\n...$Exact<ExtraNavigatorProps>,\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n|}>,\n+ +Group: React$ComponentType<{|\n+ ...ScreenOptionsProp<ScreenOptions, NavProp>,\n+ +children: React$Node,\n+ +navigationKey?: string,\n+ |}>,\n|};\ndeclare export type CreateNavigatorFactory = <\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -1078,6 +1078,11 @@ declare module '@react-navigation/native' {\n...$Exact<ExtraNavigatorProps>,\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n|}>,\n+ +Group: React$ComponentType<{|\n+ ...ScreenOptionsProp<ScreenOptions, NavProp>,\n+ +children: React$Node,\n+ +navigationKey?: string,\n+ |}>,\n|};\ndeclare export type CreateNavigatorFactory = <\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -1078,6 +1078,11 @@ declare module '@react-navigation/stack' {\n...$Exact<ExtraNavigatorProps>,\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n|}>,\n+ +Group: React$ComponentType<{|\n+ ...ScreenOptionsProp<ScreenOptions, NavProp>,\n+ +children: React$Node,\n+ +navigationKey?: string,\n+ |}>,\n|};\ndeclare export type CreateNavigatorFactory = <\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [7/34] ReactNav6: add Group component Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#new-group-component). Depends on D5399 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5400
129,187
07.10.2022 13:49:14
14,400
ef25360c08f643e3461adb11c8fbfc8b9ef14ae0
[native] [8/34] ReactNav6: type new screenListeners prop on Navigator Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#new-screenlisteners-prop-for-navigators-similar-to-screenoptions). Depends on D5400 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -919,7 +919,7 @@ declare module '@react-navigation/bottom-tabs' {\ndeclare export type RouteProp<\nParamList: ParamListBase,\n- RouteName: $Keys<ParamList>,\n+ RouteName: $Keys<ParamList> = $Keys<ParamList>,\n> = {|\n...LeafRoute<RouteName>,\n+params: $ElementType<ParamList, RouteName>,\n@@ -1077,6 +1077,12 @@ declare module '@react-navigation/bottom-tabs' {\n+Navigator: React$ComponentType<{|\n...$Exact<ExtraNavigatorProps>,\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n+ +screenListeners?:\n+ | ScreenListeners<State, EventMap>\n+ | ({|\n+ +route: RouteProp<ParamList>,\n+ +navigation: NavProp,\n+ |}) => ScreenListeners<State, EventMap>,\n|}>,\n+Group: React$ComponentType<{|\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -919,7 +919,7 @@ declare module '@react-navigation/devtools' {\ndeclare export type RouteProp<\nParamList: ParamListBase,\n- RouteName: $Keys<ParamList>,\n+ RouteName: $Keys<ParamList> = $Keys<ParamList>,\n> = {|\n...LeafRoute<RouteName>,\n+params: $ElementType<ParamList, RouteName>,\n@@ -1077,6 +1077,12 @@ declare module '@react-navigation/devtools' {\n+Navigator: React$ComponentType<{|\n...$Exact<ExtraNavigatorProps>,\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n+ +screenListeners?:\n+ | ScreenListeners<State, EventMap>\n+ | ({|\n+ +route: RouteProp<ParamList>,\n+ +navigation: NavProp,\n+ |}) => ScreenListeners<State, EventMap>,\n|}>,\n+Group: React$ComponentType<{|\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -919,7 +919,7 @@ declare module '@react-navigation/material-top-tabs' {\ndeclare export type RouteProp<\nParamList: ParamListBase,\n- RouteName: $Keys<ParamList>,\n+ RouteName: $Keys<ParamList> = $Keys<ParamList>,\n> = {|\n...LeafRoute<RouteName>,\n+params: $ElementType<ParamList, RouteName>,\n@@ -1077,6 +1077,12 @@ declare module '@react-navigation/material-top-tabs' {\n+Navigator: React$ComponentType<{|\n...$Exact<ExtraNavigatorProps>,\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n+ +screenListeners?:\n+ | ScreenListeners<State, EventMap>\n+ | ({|\n+ +route: RouteProp<ParamList>,\n+ +navigation: NavProp,\n+ |}) => ScreenListeners<State, EventMap>,\n|}>,\n+Group: React$ComponentType<{|\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -919,7 +919,7 @@ declare module '@react-navigation/native' {\ndeclare export type RouteProp<\nParamList: ParamListBase,\n- RouteName: $Keys<ParamList>,\n+ RouteName: $Keys<ParamList> = $Keys<ParamList>,\n> = {|\n...LeafRoute<RouteName>,\n+params: $ElementType<ParamList, RouteName>,\n@@ -1077,6 +1077,12 @@ declare module '@react-navigation/native' {\n+Navigator: React$ComponentType<{|\n...$Exact<ExtraNavigatorProps>,\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n+ +screenListeners?:\n+ | ScreenListeners<State, EventMap>\n+ | ({|\n+ +route: RouteProp<ParamList>,\n+ +navigation: NavProp,\n+ |}) => ScreenListeners<State, EventMap>,\n|}>,\n+Group: React$ComponentType<{|\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -919,7 +919,7 @@ declare module '@react-navigation/stack' {\ndeclare export type RouteProp<\nParamList: ParamListBase,\n- RouteName: $Keys<ParamList>,\n+ RouteName: $Keys<ParamList> = $Keys<ParamList>,\n> = {|\n...LeafRoute<RouteName>,\n+params: $ElementType<ParamList, RouteName>,\n@@ -1077,6 +1077,12 @@ declare module '@react-navigation/stack' {\n+Navigator: React$ComponentType<{|\n...$Exact<ExtraNavigatorProps>,\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n+ +screenListeners?:\n+ | ScreenListeners<State, EventMap>\n+ | ({|\n+ +route: RouteProp<ParamList>,\n+ +navigation: NavProp,\n+ |}) => ScreenListeners<State, EventMap>,\n|}>,\n+Group: React$ComponentType<{|\n...ScreenOptionsProp<ScreenOptions, NavProp>,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [8/34] ReactNav6: type new screenListeners prop on Navigator Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#new-screenlisteners-prop-for-navigators-similar-to-screenoptions). Depends on D5400 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5401
129,187
18.10.2022 09:00:56
14,400
4f73988bb3629ee5e70fc7f86877caefaf46951c
[native] [15/34] ReactNav6: add navigator ID Summary: See info about navigator IDs in the [ReactNav API reference](https://reactnavigation.org/docs/navigation-prop/#getparent) Depends on D5407 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/chat/chat.react.js", "new_path": "native/chat/chat.react.js", "diff": "@@ -144,9 +144,11 @@ function ChatNavigator({\ninitialRouteName,\nchildren,\nscreenOptions,\n+ id,\n...rest\n}: ChatNavigatorProps) {\nconst { state, descriptors, navigation } = useNavigationBuilder(ChatRouter, {\n+ id,\ninitialRouteName,\nchildren,\nscreenOptions,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -870,7 +870,8 @@ declare module '@react-navigation/bottom-tabs' {\n+goBack: () => void,\n+isFocused: () => boolean,\n+canGoBack: () => boolean,\n- +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n+ +getId: () => string | void,\n+ +getParent: <Parent: NavigationProp<ParamListBase>>(id?: string) => ?Parent,\n+getState: () => NavigationState,\n+addListener: <EventName: $Keys<\n{| ...EventMap, ...EventMapCore<State> |},\n@@ -1058,6 +1059,7 @@ declare module '@react-navigation/bottom-tabs' {\n|};\ndeclare export type ExtraNavigatorPropsBase = {\n...$Exact<DefaultRouterOptions>,\n+ +id?: string,\n+children?: React$Node,\n...\n};\n@@ -1149,6 +1151,7 @@ declare module '@react-navigation/bottom-tabs' {\n+children?: React$Node,\n|},\n) => {|\n+ +id?: string,\n+state: State,\n+descriptors: {| +[key: string]: Descriptor<NavHelpers, ScreenOptions> |},\n+navigation: NavHelpers,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -870,7 +870,8 @@ declare module '@react-navigation/devtools' {\n+goBack: () => void,\n+isFocused: () => boolean,\n+canGoBack: () => boolean,\n- +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n+ +getId: () => string | void,\n+ +getParent: <Parent: NavigationProp<ParamListBase>>(id?: string) => ?Parent,\n+getState: () => NavigationState,\n+addListener: <EventName: $Keys<\n{| ...EventMap, ...EventMapCore<State> |},\n@@ -1058,6 +1059,7 @@ declare module '@react-navigation/devtools' {\n|};\ndeclare export type ExtraNavigatorPropsBase = {\n...$Exact<DefaultRouterOptions>,\n+ +id?: string,\n+children?: React$Node,\n...\n};\n@@ -1149,6 +1151,7 @@ declare module '@react-navigation/devtools' {\n+children?: React$Node,\n|},\n) => {|\n+ +id?: string,\n+state: State,\n+descriptors: {| +[key: string]: Descriptor<NavHelpers, ScreenOptions> |},\n+navigation: NavHelpers,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -870,7 +870,8 @@ declare module '@react-navigation/material-top-tabs' {\n+goBack: () => void,\n+isFocused: () => boolean,\n+canGoBack: () => boolean,\n- +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n+ +getId: () => string | void,\n+ +getParent: <Parent: NavigationProp<ParamListBase>>(id?: string) => ?Parent,\n+getState: () => NavigationState,\n+addListener: <EventName: $Keys<\n{| ...EventMap, ...EventMapCore<State> |},\n@@ -1058,6 +1059,7 @@ declare module '@react-navigation/material-top-tabs' {\n|};\ndeclare export type ExtraNavigatorPropsBase = {\n...$Exact<DefaultRouterOptions>,\n+ +id?: string,\n+children?: React$Node,\n...\n};\n@@ -1149,6 +1151,7 @@ declare module '@react-navigation/material-top-tabs' {\n+children?: React$Node,\n|},\n) => {|\n+ +id?: string,\n+state: State,\n+descriptors: {| +[key: string]: Descriptor<NavHelpers, ScreenOptions> |},\n+navigation: NavHelpers,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -870,7 +870,8 @@ declare module '@react-navigation/native' {\n+goBack: () => void,\n+isFocused: () => boolean,\n+canGoBack: () => boolean,\n- +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n+ +getId: () => string | void,\n+ +getParent: <Parent: NavigationProp<ParamListBase>>(id?: string) => ?Parent,\n+getState: () => NavigationState,\n+addListener: <EventName: $Keys<\n{| ...EventMap, ...EventMapCore<State> |},\n@@ -1058,6 +1059,7 @@ declare module '@react-navigation/native' {\n|};\ndeclare export type ExtraNavigatorPropsBase = {\n...$Exact<DefaultRouterOptions>,\n+ +id?: string,\n+children?: React$Node,\n...\n};\n@@ -1149,6 +1151,7 @@ declare module '@react-navigation/native' {\n+children?: React$Node,\n|},\n) => {|\n+ +id?: string,\n+state: State,\n+descriptors: {| +[key: string]: Descriptor<NavHelpers, ScreenOptions> |},\n+navigation: NavHelpers,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -870,7 +870,8 @@ declare module '@react-navigation/stack' {\n+goBack: () => void,\n+isFocused: () => boolean,\n+canGoBack: () => boolean,\n- +getParent: <Parent: NavigationProp<ParamListBase>>() => ?Parent,\n+ +getId: () => string | void,\n+ +getParent: <Parent: NavigationProp<ParamListBase>>(id?: string) => ?Parent,\n+getState: () => NavigationState,\n+addListener: <EventName: $Keys<\n{| ...EventMap, ...EventMapCore<State> |},\n@@ -1058,6 +1059,7 @@ declare module '@react-navigation/stack' {\n|};\ndeclare export type ExtraNavigatorPropsBase = {\n...$Exact<DefaultRouterOptions>,\n+ +id?: string,\n+children?: React$Node,\n...\n};\n@@ -1149,6 +1151,7 @@ declare module '@react-navigation/stack' {\n+children?: React$Node,\n|},\n) => {|\n+ +id?: string,\n+state: State,\n+descriptors: {| +[key: string]: Descriptor<NavHelpers, ScreenOptions> |},\n+navigation: NavHelpers,\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/root-navigator.react.js", "new_path": "native/navigation/root-navigator.react.js", "diff": "@@ -58,9 +58,11 @@ function RootNavigator({\ninitialRouteName,\nchildren,\nscreenOptions,\n+ id,\n...rest\n}: RootNavigatorProps) {\nconst { state, descriptors, navigation } = useNavigationBuilder(RootRouter, {\n+ id,\ninitialRouteName,\nchildren,\nscreenOptions,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [15/34] ReactNav6: add navigator ID Summary: See info about navigator IDs in the [ReactNav API reference](https://reactnavigation.org/docs/navigation-prop/#getparent) Depends on D5407 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5408
129,187
18.10.2022 16:39:50
14,400
005e4b524513c5a42f4c466cd6a0810ccedc4349
[native] [21/34] ReactNav6: Add new NavigationContainerRef functions Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#new-hook-and-helper-for-creating-container-ref). Depends on D5413 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -2158,6 +2158,11 @@ declare module '@react-navigation/bottom-tabs' {\n+isReady: () => boolean,\n|};\n+ declare type BaseNavigationContainerInterfaceRef = {|\n+ ...BaseNavigationContainerInterface,\n+ +current: BaseNavigationContainerInterface | null,\n+ |};\n+\n/**\n* State utils\n*/\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -2158,6 +2158,11 @@ declare module '@react-navigation/devtools' {\n+isReady: () => boolean,\n|};\n+ declare type BaseNavigationContainerInterfaceRef = {|\n+ ...BaseNavigationContainerInterface,\n+ +current: BaseNavigationContainerInterface | null,\n+ |};\n+\n/**\n* State utils\n*/\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -2158,6 +2158,11 @@ declare module '@react-navigation/material-top-tabs' {\n+isReady: () => boolean,\n|};\n+ declare type BaseNavigationContainerInterfaceRef = {|\n+ ...BaseNavigationContainerInterface,\n+ +current: BaseNavigationContainerInterface | null,\n+ |};\n+\n/**\n* State utils\n*/\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -2158,6 +2158,11 @@ declare module '@react-navigation/native' {\n+isReady: () => boolean,\n|};\n+ declare type BaseNavigationContainerInterfaceRef = {|\n+ ...BaseNavigationContainerInterface,\n+ +current: BaseNavigationContainerInterface | null,\n+ |};\n+\n/**\n* State utils\n*/\n@@ -2403,6 +2408,12 @@ declare module '@react-navigation/native' {\ndeclare export var NavigationContainer: NavigationContainerType;\n+ declare export function createNavigationContainerRef(\n+ ): BaseNavigationContainerInterfaceRef;\n+\n+ declare export function useNavigationContainerRef(\n+ ): BaseNavigationContainerInterfaceRef;\n+\n/**\n* useBackButton\n*/\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -2158,6 +2158,11 @@ declare module '@react-navigation/stack' {\n+isReady: () => boolean,\n|};\n+ declare type BaseNavigationContainerInterfaceRef = {|\n+ ...BaseNavigationContainerInterface,\n+ +current: BaseNavigationContainerInterface | null,\n+ |};\n+\n/**\n* State utils\n*/\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [21/34] ReactNav6: Add new NavigationContainerRef functions Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#new-hook-and-helper-for-creating-container-ref). Depends on D5413 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5414
129,187
18.10.2022 17:24:08
14,400
db12d5c662dde442fceedc916e14fde4353b8d57
[native] [22/34] ReactNav6: Move keyboardHandlingEnabled to StackOptions Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#keyboardhandlingenabled-is-moved-to-options). Depends on D5414 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -1381,6 +1381,7 @@ declare module '@react-navigation/bottom-tabs' {\n+gestureResponseDistance: {| vertical?: number, horizontal?: number |},\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+ +keyboardHandlingEnabled: boolean,\n// Transition\n...TransitionPreset,\n// Header\n@@ -1471,7 +1472,6 @@ declare module '@react-navigation/bottom-tabs' {\ndeclare type StackNavigationConfig = {|\n+mode?: 'card' | 'modal',\n+headerMode?: 'float' | 'screen' | 'none',\n- +keyboardHandlingEnabled?: boolean,\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -1381,6 +1381,7 @@ declare module '@react-navigation/devtools' {\n+gestureResponseDistance: {| vertical?: number, horizontal?: number |},\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+ +keyboardHandlingEnabled: boolean,\n// Transition\n...TransitionPreset,\n// Header\n@@ -1471,7 +1472,6 @@ declare module '@react-navigation/devtools' {\ndeclare type StackNavigationConfig = {|\n+mode?: 'card' | 'modal',\n+headerMode?: 'float' | 'screen' | 'none',\n- +keyboardHandlingEnabled?: boolean,\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -1381,6 +1381,7 @@ declare module '@react-navigation/material-top-tabs' {\n+gestureResponseDistance: {| vertical?: number, horizontal?: number |},\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+ +keyboardHandlingEnabled: boolean,\n// Transition\n...TransitionPreset,\n// Header\n@@ -1471,7 +1472,6 @@ declare module '@react-navigation/material-top-tabs' {\ndeclare type StackNavigationConfig = {|\n+mode?: 'card' | 'modal',\n+headerMode?: 'float' | 'screen' | 'none',\n- +keyboardHandlingEnabled?: boolean,\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -1381,6 +1381,7 @@ declare module '@react-navigation/native' {\n+gestureResponseDistance: {| vertical?: number, horizontal?: number |},\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+ +keyboardHandlingEnabled: boolean,\n// Transition\n...TransitionPreset,\n// Header\n@@ -1471,7 +1472,6 @@ declare module '@react-navigation/native' {\ndeclare type StackNavigationConfig = {|\n+mode?: 'card' | 'modal',\n+headerMode?: 'float' | 'screen' | 'none',\n- +keyboardHandlingEnabled?: boolean,\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -1381,6 +1381,7 @@ declare module '@react-navigation/stack' {\n+gestureResponseDistance: {| vertical?: number, horizontal?: number |},\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+ +keyboardHandlingEnabled: boolean,\n// Transition\n...TransitionPreset,\n// Header\n@@ -1471,7 +1472,6 @@ declare module '@react-navigation/stack' {\ndeclare type StackNavigationConfig = {|\n+mode?: 'card' | 'modal',\n+headerMode?: 'float' | 'screen' | 'none',\n- +keyboardHandlingEnabled?: boolean,\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/root-navigator.react.js", "new_path": "native/navigation/root-navigator.react.js", "diff": "@@ -63,18 +63,31 @@ function RootNavigator({\nid,\n...rest\n}: RootNavigatorProps) {\n+ const [keyboardHandlingEnabled, setKeyboardHandlingEnabled] = React.useState(\n+ true,\n+ );\n+ const mergedScreenOptions = React.useMemo(() => {\n+ if (typeof screenOptions === 'function') {\n+ return input => ({\n+ ...screenOptions(input),\n+ keyboardHandlingEnabled,\n+ });\n+ }\n+ return {\n+ ...screenOptions,\n+ keyboardHandlingEnabled,\n+ };\n+ }, [screenOptions, keyboardHandlingEnabled]);\n+\nconst { state, descriptors, navigation } = useNavigationBuilder(RootRouter, {\nid,\ninitialRouteName,\nchildren,\n- screenOptions,\n+ screenOptions: mergedScreenOptions,\ndefaultScreenOptions,\nscreenListeners,\n});\n- const [keyboardHandlingEnabled, setKeyboardHandlingEnabled] = React.useState(\n- true,\n- );\nconst rootNavigationContext = React.useMemo(\n() => ({ setKeyboardHandlingEnabled }),\n[setKeyboardHandlingEnabled],\n@@ -87,7 +100,6 @@ function RootNavigator({\nstate={state}\ndescriptors={descriptors}\nnavigation={navigation}\n- keyboardHandlingEnabled={keyboardHandlingEnabled}\ndetachInactiveScreens={Platform.OS !== 'ios'}\n/>\n</RootNavigatorContext.Provider>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [22/34] ReactNav6: Move keyboardHandlingEnabled to StackOptions Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#keyboardhandlingenabled-is-moved-to-options). Depends on D5414 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5415
129,187
18.10.2022 17:30:23
14,400
8988b420447ffc3ca50e005a076522e5b8ee16ba
[native] [23/34] ReactNav6: Replace mode="modal" with presentation: 'modal' Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#modemodal-is-removed-in-favor-of-presentation-modal). Depends on D5415 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -1382,6 +1382,7 @@ declare module '@react-navigation/bottom-tabs' {\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+keyboardHandlingEnabled: boolean,\n+ +presentation: 'card' | 'modal' | 'transparentModal',\n// Transition\n...TransitionPreset,\n// Header\n@@ -1470,7 +1471,6 @@ declare module '@react-navigation/bottom-tabs' {\n*/\ndeclare type StackNavigationConfig = {|\n- +mode?: 'card' | 'modal',\n+headerMode?: 'float' | 'screen' | 'none',\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -1382,6 +1382,7 @@ declare module '@react-navigation/devtools' {\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+keyboardHandlingEnabled: boolean,\n+ +presentation: 'card' | 'modal' | 'transparentModal',\n// Transition\n...TransitionPreset,\n// Header\n@@ -1470,7 +1471,6 @@ declare module '@react-navigation/devtools' {\n*/\ndeclare type StackNavigationConfig = {|\n- +mode?: 'card' | 'modal',\n+headerMode?: 'float' | 'screen' | 'none',\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -1382,6 +1382,7 @@ declare module '@react-navigation/material-top-tabs' {\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+keyboardHandlingEnabled: boolean,\n+ +presentation: 'card' | 'modal' | 'transparentModal',\n// Transition\n...TransitionPreset,\n// Header\n@@ -1470,7 +1471,6 @@ declare module '@react-navigation/material-top-tabs' {\n*/\ndeclare type StackNavigationConfig = {|\n- +mode?: 'card' | 'modal',\n+headerMode?: 'float' | 'screen' | 'none',\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -1382,6 +1382,7 @@ declare module '@react-navigation/native' {\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+keyboardHandlingEnabled: boolean,\n+ +presentation: 'card' | 'modal' | 'transparentModal',\n// Transition\n...TransitionPreset,\n// Header\n@@ -1470,7 +1471,6 @@ declare module '@react-navigation/native' {\n*/\ndeclare type StackNavigationConfig = {|\n- +mode?: 'card' | 'modal',\n+headerMode?: 'float' | 'screen' | 'none',\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -1382,6 +1382,7 @@ declare module '@react-navigation/stack' {\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+keyboardHandlingEnabled: boolean,\n+ +presentation: 'card' | 'modal' | 'transparentModal',\n// Transition\n...TransitionPreset,\n// Header\n@@ -1470,7 +1471,6 @@ declare module '@react-navigation/stack' {\n*/\ndeclare type StackNavigationConfig = {|\n- +mode?: 'card' | 'modal',\n+headerMode?: 'float' | 'screen' | 'none',\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/root-navigator.react.js", "new_path": "native/navigation/root-navigator.react.js", "diff": "@@ -140,8 +140,9 @@ const transitionPreset = {\nconst defaultScreenOptions = {\n...defaultStackScreenOptions,\n- cardStyle: { backgroundColor: 'transparent' },\n...transitionPreset,\n+ cardStyle: { backgroundColor: 'transparent' },\n+ presentation: 'modal',\n};\nconst disableGesturesScreenOptions = {\ngestureEnabled: false,\n@@ -172,11 +173,7 @@ const Root = createRootNavigator<\n>();\nfunction RootComponent(): React.Node {\nreturn (\n- <Root.Navigator\n- mode=\"modal\"\n- headerMode=\"none\"\n- screenOptions={defaultScreenOptions}\n- >\n+ <Root.Navigator headerMode=\"none\" screenOptions={defaultScreenOptions}>\n<Root.Screen\nname={LoggedOutModalRouteName}\ncomponent={LoggedOutModal}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [23/34] ReactNav6: Replace mode="modal" with presentation: 'modal' Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#modemodal-is-removed-in-favor-of-presentation-modal). Depends on D5415 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5416
129,187
19.10.2022 15:43:47
14,400
e3fac0ea48a7bdb3ebc28960bead6b34b0a6b820
[native] [25/34] ReactNav6: Update StackHeaderProps type Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#props-passed-to-custom-header-are-streamlined). Depends on D5417 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -1330,12 +1330,12 @@ declare module '@react-navigation/bottom-tabs' {\n|};\ndeclare export type StackHeaderProps = {|\n- +mode: 'float' | 'screen',\n+ +navigation: StackNavigationHelpers<>,\n+ +route: RouteProp<>,\n+ +options: StackOptions,\n+layout: {| +width: number, +height: number |},\n- +insets: EdgeInsets,\n- +scene: Scene<Route<>>,\n- +previous?: Scene<Route<>>,\n- +navigation: StackNavigationHelpers<ParamListBase>,\n+ +progress: AnimatedInterpolation,\n+ +back?: {| +title: string |},\n+styleInterpolator: StackHeaderStyleInterpolator,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -1330,12 +1330,12 @@ declare module '@react-navigation/devtools' {\n|};\ndeclare export type StackHeaderProps = {|\n- +mode: 'float' | 'screen',\n+ +navigation: StackNavigationHelpers<>,\n+ +route: RouteProp<>,\n+ +options: StackOptions,\n+layout: {| +width: number, +height: number |},\n- +insets: EdgeInsets,\n- +scene: Scene<Route<>>,\n- +previous?: Scene<Route<>>,\n- +navigation: StackNavigationHelpers<ParamListBase>,\n+ +progress: AnimatedInterpolation,\n+ +back?: {| +title: string |},\n+styleInterpolator: StackHeaderStyleInterpolator,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -1330,12 +1330,12 @@ declare module '@react-navigation/material-top-tabs' {\n|};\ndeclare export type StackHeaderProps = {|\n- +mode: 'float' | 'screen',\n+ +navigation: StackNavigationHelpers<>,\n+ +route: RouteProp<>,\n+ +options: StackOptions,\n+layout: {| +width: number, +height: number |},\n- +insets: EdgeInsets,\n- +scene: Scene<Route<>>,\n- +previous?: Scene<Route<>>,\n- +navigation: StackNavigationHelpers<ParamListBase>,\n+ +progress: AnimatedInterpolation,\n+ +back?: {| +title: string |},\n+styleInterpolator: StackHeaderStyleInterpolator,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -1330,12 +1330,12 @@ declare module '@react-navigation/native' {\n|};\ndeclare export type StackHeaderProps = {|\n- +mode: 'float' | 'screen',\n+ +navigation: StackNavigationHelpers<>,\n+ +route: RouteProp<>,\n+ +options: StackOptions,\n+layout: {| +width: number, +height: number |},\n- +insets: EdgeInsets,\n- +scene: Scene<Route<>>,\n- +previous?: Scene<Route<>>,\n- +navigation: StackNavigationHelpers<ParamListBase>,\n+ +progress: AnimatedInterpolation,\n+ +back?: {| +title: string |},\n+styleInterpolator: StackHeaderStyleInterpolator,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -1330,12 +1330,12 @@ declare module '@react-navigation/stack' {\n|};\ndeclare export type StackHeaderProps = {|\n- +mode: 'float' | 'screen',\n+ +navigation: StackNavigationHelpers<>,\n+ +route: RouteProp<>,\n+ +options: StackOptions,\n+layout: {| +width: number, +height: number |},\n- +insets: EdgeInsets,\n- +scene: Scene<Route<>>,\n- +previous?: Scene<Route<>>,\n- +navigation: StackNavigationHelpers<ParamListBase>,\n+ +progress: AnimatedInterpolation,\n+ +back?: {| +title: string |},\n+styleInterpolator: StackHeaderStyleInterpolator,\n|};\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [25/34] ReactNav6: Update StackHeaderProps type Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#props-passed-to-custom-header-are-streamlined). Depends on D5417 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5418
129,187
19.10.2022 15:48:15
14,400
3c1b1648bdce925c92e0df7855a1251b210124de
[native] [26/34] ReactNav6: Make gestureResponseDistance a number Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#the-gestureresponsedistance-option-is-now-a-number-instead-of-an-object). Depends on D5418 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -1376,7 +1376,7 @@ declare module '@react-navigation/bottom-tabs' {\n+animationEnabled: boolean,\n+animationTypeForReplace: 'push' | 'pop',\n+gestureEnabled: boolean,\n- +gestureResponseDistance: {| vertical?: number, horizontal?: number |},\n+ +gestureResponseDistance: number,\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+keyboardHandlingEnabled: boolean,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -1376,7 +1376,7 @@ declare module '@react-navigation/devtools' {\n+animationEnabled: boolean,\n+animationTypeForReplace: 'push' | 'pop',\n+gestureEnabled: boolean,\n- +gestureResponseDistance: {| vertical?: number, horizontal?: number |},\n+ +gestureResponseDistance: number,\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+keyboardHandlingEnabled: boolean,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -1376,7 +1376,7 @@ declare module '@react-navigation/material-top-tabs' {\n+animationEnabled: boolean,\n+animationTypeForReplace: 'push' | 'pop',\n+gestureEnabled: boolean,\n- +gestureResponseDistance: {| vertical?: number, horizontal?: number |},\n+ +gestureResponseDistance: number,\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+keyboardHandlingEnabled: boolean,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -1376,7 +1376,7 @@ declare module '@react-navigation/native' {\n+animationEnabled: boolean,\n+animationTypeForReplace: 'push' | 'pop',\n+gestureEnabled: boolean,\n- +gestureResponseDistance: {| vertical?: number, horizontal?: number |},\n+ +gestureResponseDistance: number,\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+keyboardHandlingEnabled: boolean,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -1376,7 +1376,7 @@ declare module '@react-navigation/stack' {\n+animationEnabled: boolean,\n+animationTypeForReplace: 'push' | 'pop',\n+gestureEnabled: boolean,\n- +gestureResponseDistance: {| vertical?: number, horizontal?: number |},\n+ +gestureResponseDistance: number,\n+gestureVelocityImpact: number,\n+safeAreaInsets: $Partial<EdgeInsets>,\n+keyboardHandlingEnabled: boolean,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [26/34] ReactNav6: Make gestureResponseDistance a number Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#the-gestureresponsedistance-option-is-now-a-number-instead-of-an-object). Depends on D5418 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5419
129,187
19.10.2022 16:06:47
14,400
57e0dd20325f8341e6affe04cdb4dc6e95fadba4
[native] [28/34] ReactNav6: Specify headerShown: false for tab bar Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#a-header-is-shown-by-default-in-tab-screens). Depends on D5420 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -1542,6 +1542,7 @@ declare module '@react-navigation/bottom-tabs' {\n|}>,\n+tabBarButton: BottomTabBarButtonProps => React$Node,\n+unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -1542,6 +1542,7 @@ declare module '@react-navigation/devtools' {\n|}>,\n+tabBarButton: BottomTabBarButtonProps => React$Node,\n+unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/elements_v1.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/elements_v1.x.x.js", "diff": "@@ -1539,6 +1539,7 @@ declare module '@react-navigation/elements' {\n|}>,\n+tabBarButton: BottomTabBarButtonProps => React$Node,\n+unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -1542,6 +1542,7 @@ declare module '@react-navigation/material-top-tabs' {\n|}>,\n+tabBarButton: BottomTabBarButtonProps => React$Node,\n+unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -1542,6 +1542,7 @@ declare module '@react-navigation/native' {\n|}>,\n+tabBarButton: BottomTabBarButtonProps => React$Node,\n+unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -1542,6 +1542,7 @@ declare module '@react-navigation/stack' {\n|}>,\n+tabBarButton: BottomTabBarButtonProps => React$Node,\n+unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/app-navigator.react.js", "new_path": "native/navigation/app-navigator.react.js", "diff": "@@ -108,6 +108,9 @@ const tabBarOptions = {\nborderTopWidth: 1,\n},\n};\n+const tabBarScreenOptions = {\n+ headerShown: false,\n+};\nfunction TabNavigator() {\nconst chatBadge = useSelector(unreadCount);\nconst isCalendarEnabled = useSelector(state => state.enabledApps.calendar);\n@@ -130,6 +133,7 @@ function TabNavigator() {\ntabBar={tabBar}\nbackBehavior=\"none\"\ntabBarOptions={tabBarOptions}\n+ screenOptions={tabBarScreenOptions}\n>\n{calendarTab}\n<Tab.Screen\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [28/34] ReactNav6: Specify headerShown: false for tab bar Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#a-header-is-shown-by-default-in-tab-screens). Depends on D5420 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5421
129,187
19.10.2022 16:16:01
14,400
3924e11a95575582fe4ffd0795d06db7bb5685fd
[native] [29/34] ReactNav6: Merge tabBarOptions into options Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#the-tabbaroptions-prop-is-removed-in-favor-of-more-flexible-options-for-bottom-tabs). Depends on D5421 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -1541,6 +1541,18 @@ declare module '@react-navigation/bottom-tabs' {\n+hide: TabBarVisibilityAnimationConfig,\n|}>,\n+tabBarButton: BottomTabBarButtonProps => React$Node,\n+ +tabBarHideOnKeyboard: boolean,\n+ +tabBarActiveTintColor: string,\n+ +tabBarInactiveTintColor: string,\n+ +tabBarActiveBackgroundColor: string,\n+ +tabBarInactiveBackgroundColor: string,\n+ +tabBarAllowFontScaling: boolean,\n+ +tabBarShowLabel: boolean,\n+ +tabBarLabelStyle: TextStyleProp,\n+ +tabBarIconStyle: TextStyleProp,\n+ +tabBarItemStyle: ViewStyleProp,\n+ +tabBarLabelPosition: 'beside-icon' | 'below-icon',\n+ +tabBarStyle: ViewStyleProp,\n+unmountOnBlur: boolean,\n+headerShown: boolean,\n|}>;\n@@ -1599,39 +1611,18 @@ declare module '@react-navigation/bottom-tabs' {\nBottomTabOptions,\n>;\n- declare export type BottomTabBarOptions = $Partial<{|\n- +keyboardHidesTabBar: boolean,\n- +activeTintColor: string,\n- +inactiveTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveBackgroundColor: string,\n- +allowFontScaling: boolean,\n- +showLabel: boolean,\n- +showIcon: boolean,\n- +labelStyle: TextStyleProp,\n- +iconStyle: TextStyleProp,\n- +tabStyle: ViewStyleProp,\n- +labelPosition: 'beside-icon' | 'below-icon',\n- +adaptive: boolean,\n- +safeAreaInsets: $Partial<EdgeInsets>,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type BottomTabNavigationBuilderResult = {|\n+state: TabNavigationState,\n+navigation: BottomTabNavigationHelpers<>,\n+descriptors: {| +[key: string]: BottomTabDescriptor |},\n|};\n- declare export type BottomTabBarProps = {|\n- ...BottomTabBarOptions,\n- ...BottomTabNavigationBuilderResult,\n- |}\n+ declare export type BottomTabBarProps = BottomTabNavigationBuilderResult;\ndeclare type BottomTabNavigationConfig = {|\n+lazy?: boolean,\n+tabBar?: BottomTabBarProps => React$Node,\n- +tabBarOptions?: BottomTabBarOptions,\n+ +safeAreaInsets?: $Partial<EdgeInsets>,\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -1541,6 +1541,18 @@ declare module '@react-navigation/devtools' {\n+hide: TabBarVisibilityAnimationConfig,\n|}>,\n+tabBarButton: BottomTabBarButtonProps => React$Node,\n+ +tabBarHideOnKeyboard: boolean,\n+ +tabBarActiveTintColor: string,\n+ +tabBarInactiveTintColor: string,\n+ +tabBarActiveBackgroundColor: string,\n+ +tabBarInactiveBackgroundColor: string,\n+ +tabBarAllowFontScaling: boolean,\n+ +tabBarShowLabel: boolean,\n+ +tabBarLabelStyle: TextStyleProp,\n+ +tabBarIconStyle: TextStyleProp,\n+ +tabBarItemStyle: ViewStyleProp,\n+ +tabBarLabelPosition: 'beside-icon' | 'below-icon',\n+ +tabBarStyle: ViewStyleProp,\n+unmountOnBlur: boolean,\n+headerShown: boolean,\n|}>;\n@@ -1599,39 +1611,18 @@ declare module '@react-navigation/devtools' {\nBottomTabOptions,\n>;\n- declare export type BottomTabBarOptions = $Partial<{|\n- +keyboardHidesTabBar: boolean,\n- +activeTintColor: string,\n- +inactiveTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveBackgroundColor: string,\n- +allowFontScaling: boolean,\n- +showLabel: boolean,\n- +showIcon: boolean,\n- +labelStyle: TextStyleProp,\n- +iconStyle: TextStyleProp,\n- +tabStyle: ViewStyleProp,\n- +labelPosition: 'beside-icon' | 'below-icon',\n- +adaptive: boolean,\n- +safeAreaInsets: $Partial<EdgeInsets>,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type BottomTabNavigationBuilderResult = {|\n+state: TabNavigationState,\n+navigation: BottomTabNavigationHelpers<>,\n+descriptors: {| +[key: string]: BottomTabDescriptor |},\n|};\n- declare export type BottomTabBarProps = {|\n- ...BottomTabBarOptions,\n- ...BottomTabNavigationBuilderResult,\n- |}\n+ declare export type BottomTabBarProps = BottomTabNavigationBuilderResult;\ndeclare type BottomTabNavigationConfig = {|\n+lazy?: boolean,\n+tabBar?: BottomTabBarProps => React$Node,\n- +tabBarOptions?: BottomTabBarOptions,\n+ +safeAreaInsets?: $Partial<EdgeInsets>,\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/elements_v1.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/elements_v1.x.x.js", "diff": "@@ -1538,6 +1538,18 @@ declare module '@react-navigation/elements' {\n+hide: TabBarVisibilityAnimationConfig,\n|}>,\n+tabBarButton: BottomTabBarButtonProps => React$Node,\n+ +tabBarHideOnKeyboard: boolean,\n+ +tabBarActiveTintColor: string,\n+ +tabBarInactiveTintColor: string,\n+ +tabBarActiveBackgroundColor: string,\n+ +tabBarInactiveBackgroundColor: string,\n+ +tabBarAllowFontScaling: boolean,\n+ +tabBarShowLabel: boolean,\n+ +tabBarLabelStyle: TextStyleProp,\n+ +tabBarIconStyle: TextStyleProp,\n+ +tabBarItemStyle: ViewStyleProp,\n+ +tabBarLabelPosition: 'beside-icon' | 'below-icon',\n+ +tabBarStyle: ViewStyleProp,\n+unmountOnBlur: boolean,\n+headerShown: boolean,\n|}>;\n@@ -1596,39 +1608,18 @@ declare module '@react-navigation/elements' {\nBottomTabOptions,\n>;\n- declare export type BottomTabBarOptions = $Partial<{|\n- +keyboardHidesTabBar: boolean,\n- +activeTintColor: string,\n- +inactiveTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveBackgroundColor: string,\n- +allowFontScaling: boolean,\n- +showLabel: boolean,\n- +showIcon: boolean,\n- +labelStyle: TextStyleProp,\n- +iconStyle: TextStyleProp,\n- +tabStyle: ViewStyleProp,\n- +labelPosition: 'beside-icon' | 'below-icon',\n- +adaptive: boolean,\n- +safeAreaInsets: $Partial<EdgeInsets>,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type BottomTabNavigationBuilderResult = {|\n+state: TabNavigationState,\n+navigation: BottomTabNavigationHelpers<>,\n+descriptors: {| +[key: string]: BottomTabDescriptor |},\n|};\n- declare export type BottomTabBarProps = {|\n- ...BottomTabBarOptions,\n- ...BottomTabNavigationBuilderResult,\n- |}\n+ declare export type BottomTabBarProps = BottomTabNavigationBuilderResult;\ndeclare type BottomTabNavigationConfig = {|\n+lazy?: boolean,\n+tabBar?: BottomTabBarProps => React$Node,\n- +tabBarOptions?: BottomTabBarOptions,\n+ +safeAreaInsets?: $Partial<EdgeInsets>,\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -1541,6 +1541,18 @@ declare module '@react-navigation/material-top-tabs' {\n+hide: TabBarVisibilityAnimationConfig,\n|}>,\n+tabBarButton: BottomTabBarButtonProps => React$Node,\n+ +tabBarHideOnKeyboard: boolean,\n+ +tabBarActiveTintColor: string,\n+ +tabBarInactiveTintColor: string,\n+ +tabBarActiveBackgroundColor: string,\n+ +tabBarInactiveBackgroundColor: string,\n+ +tabBarAllowFontScaling: boolean,\n+ +tabBarShowLabel: boolean,\n+ +tabBarLabelStyle: TextStyleProp,\n+ +tabBarIconStyle: TextStyleProp,\n+ +tabBarItemStyle: ViewStyleProp,\n+ +tabBarLabelPosition: 'beside-icon' | 'below-icon',\n+ +tabBarStyle: ViewStyleProp,\n+unmountOnBlur: boolean,\n+headerShown: boolean,\n|}>;\n@@ -1599,39 +1611,18 @@ declare module '@react-navigation/material-top-tabs' {\nBottomTabOptions,\n>;\n- declare export type BottomTabBarOptions = $Partial<{|\n- +keyboardHidesTabBar: boolean,\n- +activeTintColor: string,\n- +inactiveTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveBackgroundColor: string,\n- +allowFontScaling: boolean,\n- +showLabel: boolean,\n- +showIcon: boolean,\n- +labelStyle: TextStyleProp,\n- +iconStyle: TextStyleProp,\n- +tabStyle: ViewStyleProp,\n- +labelPosition: 'beside-icon' | 'below-icon',\n- +adaptive: boolean,\n- +safeAreaInsets: $Partial<EdgeInsets>,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type BottomTabNavigationBuilderResult = {|\n+state: TabNavigationState,\n+navigation: BottomTabNavigationHelpers<>,\n+descriptors: {| +[key: string]: BottomTabDescriptor |},\n|};\n- declare export type BottomTabBarProps = {|\n- ...BottomTabBarOptions,\n- ...BottomTabNavigationBuilderResult,\n- |}\n+ declare export type BottomTabBarProps = BottomTabNavigationBuilderResult;\ndeclare type BottomTabNavigationConfig = {|\n+lazy?: boolean,\n+tabBar?: BottomTabBarProps => React$Node,\n- +tabBarOptions?: BottomTabBarOptions,\n+ +safeAreaInsets?: $Partial<EdgeInsets>,\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -1541,6 +1541,18 @@ declare module '@react-navigation/native' {\n+hide: TabBarVisibilityAnimationConfig,\n|}>,\n+tabBarButton: BottomTabBarButtonProps => React$Node,\n+ +tabBarHideOnKeyboard: boolean,\n+ +tabBarActiveTintColor: string,\n+ +tabBarInactiveTintColor: string,\n+ +tabBarActiveBackgroundColor: string,\n+ +tabBarInactiveBackgroundColor: string,\n+ +tabBarAllowFontScaling: boolean,\n+ +tabBarShowLabel: boolean,\n+ +tabBarLabelStyle: TextStyleProp,\n+ +tabBarIconStyle: TextStyleProp,\n+ +tabBarItemStyle: ViewStyleProp,\n+ +tabBarLabelPosition: 'beside-icon' | 'below-icon',\n+ +tabBarStyle: ViewStyleProp,\n+unmountOnBlur: boolean,\n+headerShown: boolean,\n|}>;\n@@ -1599,39 +1611,18 @@ declare module '@react-navigation/native' {\nBottomTabOptions,\n>;\n- declare export type BottomTabBarOptions = $Partial<{|\n- +keyboardHidesTabBar: boolean,\n- +activeTintColor: string,\n- +inactiveTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveBackgroundColor: string,\n- +allowFontScaling: boolean,\n- +showLabel: boolean,\n- +showIcon: boolean,\n- +labelStyle: TextStyleProp,\n- +iconStyle: TextStyleProp,\n- +tabStyle: ViewStyleProp,\n- +labelPosition: 'beside-icon' | 'below-icon',\n- +adaptive: boolean,\n- +safeAreaInsets: $Partial<EdgeInsets>,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type BottomTabNavigationBuilderResult = {|\n+state: TabNavigationState,\n+navigation: BottomTabNavigationHelpers<>,\n+descriptors: {| +[key: string]: BottomTabDescriptor |},\n|};\n- declare export type BottomTabBarProps = {|\n- ...BottomTabBarOptions,\n- ...BottomTabNavigationBuilderResult,\n- |}\n+ declare export type BottomTabBarProps = BottomTabNavigationBuilderResult;\ndeclare type BottomTabNavigationConfig = {|\n+lazy?: boolean,\n+tabBar?: BottomTabBarProps => React$Node,\n- +tabBarOptions?: BottomTabBarOptions,\n+ +safeAreaInsets?: $Partial<EdgeInsets>,\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -1541,6 +1541,18 @@ declare module '@react-navigation/stack' {\n+hide: TabBarVisibilityAnimationConfig,\n|}>,\n+tabBarButton: BottomTabBarButtonProps => React$Node,\n+ +tabBarHideOnKeyboard: boolean,\n+ +tabBarActiveTintColor: string,\n+ +tabBarInactiveTintColor: string,\n+ +tabBarActiveBackgroundColor: string,\n+ +tabBarInactiveBackgroundColor: string,\n+ +tabBarAllowFontScaling: boolean,\n+ +tabBarShowLabel: boolean,\n+ +tabBarLabelStyle: TextStyleProp,\n+ +tabBarIconStyle: TextStyleProp,\n+ +tabBarItemStyle: ViewStyleProp,\n+ +tabBarLabelPosition: 'beside-icon' | 'below-icon',\n+ +tabBarStyle: ViewStyleProp,\n+unmountOnBlur: boolean,\n+headerShown: boolean,\n|}>;\n@@ -1599,39 +1611,18 @@ declare module '@react-navigation/stack' {\nBottomTabOptions,\n>;\n- declare export type BottomTabBarOptions = $Partial<{|\n- +keyboardHidesTabBar: boolean,\n- +activeTintColor: string,\n- +inactiveTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveBackgroundColor: string,\n- +allowFontScaling: boolean,\n- +showLabel: boolean,\n- +showIcon: boolean,\n- +labelStyle: TextStyleProp,\n- +iconStyle: TextStyleProp,\n- +tabStyle: ViewStyleProp,\n- +labelPosition: 'beside-icon' | 'below-icon',\n- +adaptive: boolean,\n- +safeAreaInsets: $Partial<EdgeInsets>,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type BottomTabNavigationBuilderResult = {|\n+state: TabNavigationState,\n+navigation: BottomTabNavigationHelpers<>,\n+descriptors: {| +[key: string]: BottomTabDescriptor |},\n|};\n- declare export type BottomTabBarProps = {|\n- ...BottomTabBarOptions,\n- ...BottomTabNavigationBuilderResult,\n- |}\n+ declare export type BottomTabBarProps = BottomTabNavigationBuilderResult;\ndeclare type BottomTabNavigationConfig = {|\n+lazy?: boolean,\n+tabBar?: BottomTabBarProps => React$Node,\n- +tabBarOptions?: BottomTabBarOptions,\n+ +safeAreaInsets?: $Partial<EdgeInsets>,\n+detachInactiveScreens?: boolean,\n|};\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/app-navigator.react.js", "new_path": "native/navigation/app-navigator.react.js", "diff": "@@ -100,17 +100,15 @@ const Tab = createBottomTabNavigator<\nTabParamList,\nBottomTabNavigationHelpers<ScreenParamList>,\n>();\n-const tabBarOptions = {\n- keyboardHidesTabBar: false,\n- activeTintColor: '#AE94DB',\n- style: {\n+const tabBarScreenOptions = {\n+ headerShown: false,\n+ tabBarHideOnKeyboard: false,\n+ tabBarActiveTintColor: '#AE94DB',\n+ tabBarStyle: {\nbackgroundColor: '#0A0A0A',\nborderTopWidth: 1,\n},\n};\n-const tabBarScreenOptions = {\n- headerShown: false,\n-};\nfunction TabNavigator() {\nconst chatBadge = useSelector(unreadCount);\nconst isCalendarEnabled = useSelector(state => state.enabledApps.calendar);\n@@ -132,7 +130,6 @@ function TabNavigator() {\nlazy={false}\ntabBar={tabBar}\nbackBehavior=\"none\"\n- tabBarOptions={tabBarOptions}\nscreenOptions={tabBarScreenOptions}\n>\n{calendarTab}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [29/34] ReactNav6: Merge tabBarOptions into options Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#the-tabbaroptions-prop-is-removed-in-favor-of-more-flexible-options-for-bottom-tabs). Depends on D5421 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5422
129,187
19.10.2022 16:18:16
14,400
7c9726eccf762c2e9694e60859349d9d60b63e6c
[native] [30/34] ReactNav6: Remove tabBarVisible option Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#the-tabbarvisible-option-is-no-longer-present). Depends on D5422 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -1535,7 +1535,6 @@ declare module '@react-navigation/bottom-tabs' {\n+tabBarBadgeStyle: TextStyleProp,\n+tabBarAccessibilityLabel: string,\n+tabBarTestID: string,\n- +tabBarVisible: boolean,\n+tabBarVisibilityAnimationConfig: $Partial<{|\n+show: TabBarVisibilityAnimationConfig,\n+hide: TabBarVisibilityAnimationConfig,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -1535,7 +1535,6 @@ declare module '@react-navigation/devtools' {\n+tabBarBadgeStyle: TextStyleProp,\n+tabBarAccessibilityLabel: string,\n+tabBarTestID: string,\n- +tabBarVisible: boolean,\n+tabBarVisibilityAnimationConfig: $Partial<{|\n+show: TabBarVisibilityAnimationConfig,\n+hide: TabBarVisibilityAnimationConfig,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/elements_v1.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/elements_v1.x.x.js", "diff": "@@ -1532,7 +1532,6 @@ declare module '@react-navigation/elements' {\n+tabBarBadgeStyle: TextStyleProp,\n+tabBarAccessibilityLabel: string,\n+tabBarTestID: string,\n- +tabBarVisible: boolean,\n+tabBarVisibilityAnimationConfig: $Partial<{|\n+show: TabBarVisibilityAnimationConfig,\n+hide: TabBarVisibilityAnimationConfig,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -1535,7 +1535,6 @@ declare module '@react-navigation/material-top-tabs' {\n+tabBarBadgeStyle: TextStyleProp,\n+tabBarAccessibilityLabel: string,\n+tabBarTestID: string,\n- +tabBarVisible: boolean,\n+tabBarVisibilityAnimationConfig: $Partial<{|\n+show: TabBarVisibilityAnimationConfig,\n+hide: TabBarVisibilityAnimationConfig,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -1535,7 +1535,6 @@ declare module '@react-navigation/native' {\n+tabBarBadgeStyle: TextStyleProp,\n+tabBarAccessibilityLabel: string,\n+tabBarTestID: string,\n- +tabBarVisible: boolean,\n+tabBarVisibilityAnimationConfig: $Partial<{|\n+show: TabBarVisibilityAnimationConfig,\n+hide: TabBarVisibilityAnimationConfig,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -1535,7 +1535,6 @@ declare module '@react-navigation/stack' {\n+tabBarBadgeStyle: TextStyleProp,\n+tabBarAccessibilityLabel: string,\n+tabBarTestID: string,\n- +tabBarVisible: boolean,\n+tabBarVisibilityAnimationConfig: $Partial<{|\n+show: TabBarVisibilityAnimationConfig,\n+hide: TabBarVisibilityAnimationConfig,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [30/34] ReactNav6: Remove tabBarVisible option Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#the-tabbarvisible-option-is-no-longer-present). Depends on D5422 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5423
129,187
19.10.2022 16:21:18
14,400
e57d27959985d8c7d44dc93f3b310eaa54d2fc3d
[native] [31/34] ReactNav6: Move lazy prop of BottomTabBarNavigator to options Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#the-lazy-prop-is-moved-to-lazy-option-for-per-screen-configuration-for-bottom-tabs). Depends on D5423 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -1554,6 +1554,7 @@ declare module '@react-navigation/bottom-tabs' {\n+tabBarStyle: ViewStyleProp,\n+unmountOnBlur: boolean,\n+headerShown: boolean,\n+ +lazy: boolean,\n|}>;\n/**\n@@ -1619,7 +1620,6 @@ declare module '@react-navigation/bottom-tabs' {\ndeclare export type BottomTabBarProps = BottomTabNavigationBuilderResult;\ndeclare type BottomTabNavigationConfig = {|\n- +lazy?: boolean,\n+tabBar?: BottomTabBarProps => React$Node,\n+safeAreaInsets?: $Partial<EdgeInsets>,\n+detachInactiveScreens?: boolean,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -1554,6 +1554,7 @@ declare module '@react-navigation/devtools' {\n+tabBarStyle: ViewStyleProp,\n+unmountOnBlur: boolean,\n+headerShown: boolean,\n+ +lazy: boolean,\n|}>;\n/**\n@@ -1619,7 +1620,6 @@ declare module '@react-navigation/devtools' {\ndeclare export type BottomTabBarProps = BottomTabNavigationBuilderResult;\ndeclare type BottomTabNavigationConfig = {|\n- +lazy?: boolean,\n+tabBar?: BottomTabBarProps => React$Node,\n+safeAreaInsets?: $Partial<EdgeInsets>,\n+detachInactiveScreens?: boolean,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/elements_v1.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/elements_v1.x.x.js", "diff": "@@ -1551,6 +1551,7 @@ declare module '@react-navigation/elements' {\n+tabBarStyle: ViewStyleProp,\n+unmountOnBlur: boolean,\n+headerShown: boolean,\n+ +lazy: boolean,\n|}>;\n/**\n@@ -1616,7 +1617,6 @@ declare module '@react-navigation/elements' {\ndeclare export type BottomTabBarProps = BottomTabNavigationBuilderResult;\ndeclare type BottomTabNavigationConfig = {|\n- +lazy?: boolean,\n+tabBar?: BottomTabBarProps => React$Node,\n+safeAreaInsets?: $Partial<EdgeInsets>,\n+detachInactiveScreens?: boolean,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -1554,6 +1554,7 @@ declare module '@react-navigation/material-top-tabs' {\n+tabBarStyle: ViewStyleProp,\n+unmountOnBlur: boolean,\n+headerShown: boolean,\n+ +lazy: boolean,\n|}>;\n/**\n@@ -1619,7 +1620,6 @@ declare module '@react-navigation/material-top-tabs' {\ndeclare export type BottomTabBarProps = BottomTabNavigationBuilderResult;\ndeclare type BottomTabNavigationConfig = {|\n- +lazy?: boolean,\n+tabBar?: BottomTabBarProps => React$Node,\n+safeAreaInsets?: $Partial<EdgeInsets>,\n+detachInactiveScreens?: boolean,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -1554,6 +1554,7 @@ declare module '@react-navigation/native' {\n+tabBarStyle: ViewStyleProp,\n+unmountOnBlur: boolean,\n+headerShown: boolean,\n+ +lazy: boolean,\n|}>;\n/**\n@@ -1619,7 +1620,6 @@ declare module '@react-navigation/native' {\ndeclare export type BottomTabBarProps = BottomTabNavigationBuilderResult;\ndeclare type BottomTabNavigationConfig = {|\n- +lazy?: boolean,\n+tabBar?: BottomTabBarProps => React$Node,\n+safeAreaInsets?: $Partial<EdgeInsets>,\n+detachInactiveScreens?: boolean,\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -1554,6 +1554,7 @@ declare module '@react-navigation/stack' {\n+tabBarStyle: ViewStyleProp,\n+unmountOnBlur: boolean,\n+headerShown: boolean,\n+ +lazy: boolean,\n|}>;\n/**\n@@ -1619,7 +1620,6 @@ declare module '@react-navigation/stack' {\ndeclare export type BottomTabBarProps = BottomTabNavigationBuilderResult;\ndeclare type BottomTabNavigationConfig = {|\n- +lazy?: boolean,\n+tabBar?: BottomTabBarProps => React$Node,\n+safeAreaInsets?: $Partial<EdgeInsets>,\n+detachInactiveScreens?: boolean,\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/app-navigator.react.js", "new_path": "native/navigation/app-navigator.react.js", "diff": "@@ -108,6 +108,7 @@ const tabBarScreenOptions = {\nbackgroundColor: '#0A0A0A',\nborderTopWidth: 1,\n},\n+ lazy: false,\n};\nfunction TabNavigator() {\nconst chatBadge = useSelector(unreadCount);\n@@ -127,7 +128,6 @@ function TabNavigator() {\nreturn (\n<Tab.Navigator\ninitialRouteName={ChatRouteName}\n- lazy={false}\ntabBar={tabBar}\nbackBehavior=\"none\"\nscreenOptions={tabBarScreenOptions}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [31/34] ReactNav6: Move lazy prop of BottomTabBarNavigator to options Summary: Context on change [here](https://reactnavigation.org/docs/upgrading-from-5.x/#the-lazy-prop-is-moved-to-lazy-option-for-per-screen-configuration-for-bottom-tabs). Depends on D5423 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5424
129,187
19.10.2022 16:35:53
14,400
dfb194a3df9303a7f645f31f04ca1410ecbe323c
[native] [32/34] ReactNav6: Update MaterialTopTabsNavigator Summary: Context on changes [in this section](https://reactnavigation.org/docs/upgrading-from-5.x/#material-top-tab-navigator). Depends on D5424 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/chat/chat.react.js", "new_path": "native/chat/chat.react.js", "diff": "@@ -102,16 +102,16 @@ const ChatThreadsTopTab = createMaterialTopTabNavigator();\nfunction ChatThreadsComponent(): React.Node {\nconst colors = useColors();\nconst { tabBarBackground, tabBarAccent } = colors;\n- const tabBarOptions = React.useMemo(\n+ const screenOptions = React.useMemo(\n() => ({\n- showIcon: true,\n- style: {\n+ tabBarShowIcon: true,\n+ tabBarStyle: {\nbackgroundColor: tabBarBackground,\n},\n- tabStyle: {\n+ tabBarItemStyle: {\nflexDirection: 'row',\n},\n- indicatorStyle: {\n+ tabBarIndicatorStyle: {\nborderColor: tabBarAccent,\nborderBottomWidth: 2,\n},\n@@ -119,7 +119,7 @@ function ChatThreadsComponent(): React.Node {\n[tabBarAccent, tabBarBackground],\n);\nreturn (\n- <ChatThreadsTopTab.Navigator tabBarOptions={tabBarOptions}>\n+ <ChatThreadsTopTab.Navigator screenOptions={screenOptions}>\n<ChatThreadsTopTab.Screen\nname={HomeChatThreadListRouteName}\ncomponent={HomeChatThreadList}\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "diff": "@@ -1808,6 +1808,26 @@ declare module '@react-navigation/bottom-tabs' {\n+tabBarIcon: ({| +focused: boolean, +color: string |}) => React$Node,\n+tabBarAccessibilityLabel: string,\n+tabBarTestID: string,\n+ +tabBarActiveTintColor: string,\n+ +tabBarInactiveTintColor: string,\n+ +tabBarPressColor: string,\n+ +tabBarPressOpacity: number,\n+ +tabBarShowLabel: boolean,\n+ +tabBarShowIcon: boolean,\n+ +tabBarAllowFontScaling: boolean,\n+ +tabBarBounces: boolean,\n+ +tabBarScrollEnabled: boolean,\n+ +tabBarIconStyle: ViewStyleProp,\n+ +tabBarLabelStyle: TextStyleProp,\n+ +tabBarItemStyle: ViewStyleProp,\n+ +tabBarIndicatorStyle: ViewStyleProp,\n+ +tabBarIndicatorContainerStyle: ViewStyleProp,\n+ +tabBarContentContainerStyle: ViewStyleProp,\n+ +tabBarStyle: ViewStyleProp,\n+ +tabBarBadge: () => React$Node,\n+ +tabBarIndicator: MaterialTopTabBarIndicatorProps => React$Node,\n+ +lazy: boolean,\n+ +lazyPlaceholder: ({| +route: Route<> |}) => React$Node,\n|}>;\n/**\n@@ -1891,35 +1911,12 @@ declare module '@react-navigation/bottom-tabs' {\n|};\ndeclare export type MaterialTopTabBarIndicatorProps = {|\n- +navigationState: TabNavigationState,\n+ +state: TabNavigationState,\n+width: string,\n+style?: ViewStyleProp,\n+getTabWidth: number => number,\n|};\n- declare export type MaterialTopTabBarOptions = $Partial<{|\n- +scrollEnabled: boolean,\n- +bounces: boolean,\n- +pressColor: string,\n- +pressOpacity: number,\n- +getAccessible: ({| +route: Route<> |}) => boolean,\n- +renderBadge: ({| +route: Route<> |}) => React$Node,\n- +renderIndicator: MaterialTopTabBarIndicatorProps => React$Node,\n- +tabStyle: ViewStyleProp,\n- +indicatorStyle: ViewStyleProp,\n- +indicatorContainerStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- +activeTintColor: string,\n- +inactiveTintColor: string,\n- +iconStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- +showLabel: boolean,\n- +showIcon: boolean,\n- +allowFontScaling: boolean,\n- |}>;\n-\ndeclare export type MaterialTopTabDescriptor = Descriptor<\nMaterialBottomTabNavigationHelpers<>,\nMaterialBottomTabOptions,\n@@ -1932,7 +1929,6 @@ declare module '@react-navigation/bottom-tabs' {\n|};\ndeclare export type MaterialTopTabBarProps = {|\n- ...MaterialTopTabBarOptions,\n...MaterialTopTabNavigationBuilderResult,\n+layout: {| +width: number, +height: number |},\n+position: any, // Reanimated.Node<number>\n@@ -1944,16 +1940,13 @@ declare module '@react-navigation/bottom-tabs' {\n+position?: any, // Reanimated.Value<number>\n+tabBarPosition?: 'top' | 'bottom',\n+initialLayout?: $Partial<{| +width: number, +height: number |}>,\n- +lazy?: boolean,\n+lazyPreloadDistance?: number,\n+removeClippedSubviews?: boolean,\n+sceneContainerStyle?: ViewStyleProp,\n+style?: ViewStyleProp,\n+gestureHandlerProps?: PanGestureHandlerProps,\n+pager?: MaterialTopTabPagerProps => React$Node,\n- +lazyPlaceholder?: ({| +route: Route<> |}) => React$Node,\n+tabBar?: MaterialTopTabBarProps => React$Node,\n- +tabBarOptions?: MaterialTopTabBarOptions,\n|};\ndeclare export type ExtraMaterialTopTabNavigatorProps = {|\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "diff": "@@ -1808,6 +1808,26 @@ declare module '@react-navigation/devtools' {\n+tabBarIcon: ({| +focused: boolean, +color: string |}) => React$Node,\n+tabBarAccessibilityLabel: string,\n+tabBarTestID: string,\n+ +tabBarActiveTintColor: string,\n+ +tabBarInactiveTintColor: string,\n+ +tabBarPressColor: string,\n+ +tabBarPressOpacity: number,\n+ +tabBarShowLabel: boolean,\n+ +tabBarShowIcon: boolean,\n+ +tabBarAllowFontScaling: boolean,\n+ +tabBarBounces: boolean,\n+ +tabBarScrollEnabled: boolean,\n+ +tabBarIconStyle: ViewStyleProp,\n+ +tabBarLabelStyle: TextStyleProp,\n+ +tabBarItemStyle: ViewStyleProp,\n+ +tabBarIndicatorStyle: ViewStyleProp,\n+ +tabBarIndicatorContainerStyle: ViewStyleProp,\n+ +tabBarContentContainerStyle: ViewStyleProp,\n+ +tabBarStyle: ViewStyleProp,\n+ +tabBarBadge: () => React$Node,\n+ +tabBarIndicator: MaterialTopTabBarIndicatorProps => React$Node,\n+ +lazy: boolean,\n+ +lazyPlaceholder: ({| +route: Route<> |}) => React$Node,\n|}>;\n/**\n@@ -1891,35 +1911,12 @@ declare module '@react-navigation/devtools' {\n|};\ndeclare export type MaterialTopTabBarIndicatorProps = {|\n- +navigationState: TabNavigationState,\n+ +state: TabNavigationState,\n+width: string,\n+style?: ViewStyleProp,\n+getTabWidth: number => number,\n|};\n- declare export type MaterialTopTabBarOptions = $Partial<{|\n- +scrollEnabled: boolean,\n- +bounces: boolean,\n- +pressColor: string,\n- +pressOpacity: number,\n- +getAccessible: ({| +route: Route<> |}) => boolean,\n- +renderBadge: ({| +route: Route<> |}) => React$Node,\n- +renderIndicator: MaterialTopTabBarIndicatorProps => React$Node,\n- +tabStyle: ViewStyleProp,\n- +indicatorStyle: ViewStyleProp,\n- +indicatorContainerStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- +activeTintColor: string,\n- +inactiveTintColor: string,\n- +iconStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- +showLabel: boolean,\n- +showIcon: boolean,\n- +allowFontScaling: boolean,\n- |}>;\n-\ndeclare export type MaterialTopTabDescriptor = Descriptor<\nMaterialBottomTabNavigationHelpers<>,\nMaterialBottomTabOptions,\n@@ -1932,7 +1929,6 @@ declare module '@react-navigation/devtools' {\n|};\ndeclare export type MaterialTopTabBarProps = {|\n- ...MaterialTopTabBarOptions,\n...MaterialTopTabNavigationBuilderResult,\n+layout: {| +width: number, +height: number |},\n+position: any, // Reanimated.Node<number>\n@@ -1944,16 +1940,13 @@ declare module '@react-navigation/devtools' {\n+position?: any, // Reanimated.Value<number>\n+tabBarPosition?: 'top' | 'bottom',\n+initialLayout?: $Partial<{| +width: number, +height: number |}>,\n- +lazy?: boolean,\n+lazyPreloadDistance?: number,\n+removeClippedSubviews?: boolean,\n+sceneContainerStyle?: ViewStyleProp,\n+style?: ViewStyleProp,\n+gestureHandlerProps?: PanGestureHandlerProps,\n+pager?: MaterialTopTabPagerProps => React$Node,\n- +lazyPlaceholder?: ({| +route: Route<> |}) => React$Node,\n+tabBar?: MaterialTopTabBarProps => React$Node,\n- +tabBarOptions?: MaterialTopTabBarOptions,\n|};\ndeclare export type ExtraMaterialTopTabNavigatorProps = {|\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/elements_v1.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/elements_v1.x.x.js", "diff": "@@ -1805,6 +1805,26 @@ declare module '@react-navigation/elements' {\n+tabBarIcon: ({| +focused: boolean, +color: string |}) => React$Node,\n+tabBarAccessibilityLabel: string,\n+tabBarTestID: string,\n+ +tabBarActiveTintColor: string,\n+ +tabBarInactiveTintColor: string,\n+ +tabBarPressColor: string,\n+ +tabBarPressOpacity: number,\n+ +tabBarShowLabel: boolean,\n+ +tabBarShowIcon: boolean,\n+ +tabBarAllowFontScaling: boolean,\n+ +tabBarBounces: boolean,\n+ +tabBarScrollEnabled: boolean,\n+ +tabBarIconStyle: ViewStyleProp,\n+ +tabBarLabelStyle: TextStyleProp,\n+ +tabBarItemStyle: ViewStyleProp,\n+ +tabBarIndicatorStyle: ViewStyleProp,\n+ +tabBarIndicatorContainerStyle: ViewStyleProp,\n+ +tabBarContentContainerStyle: ViewStyleProp,\n+ +tabBarStyle: ViewStyleProp,\n+ +tabBarBadge: () => React$Node,\n+ +tabBarIndicator: MaterialTopTabBarIndicatorProps => React$Node,\n+ +lazy: boolean,\n+ +lazyPlaceholder: ({| +route: Route<> |}) => React$Node,\n|}>;\n/**\n@@ -1888,35 +1908,12 @@ declare module '@react-navigation/elements' {\n|};\ndeclare export type MaterialTopTabBarIndicatorProps = {|\n- +navigationState: TabNavigationState,\n+ +state: TabNavigationState,\n+width: string,\n+style?: ViewStyleProp,\n+getTabWidth: number => number,\n|};\n- declare export type MaterialTopTabBarOptions = $Partial<{|\n- +scrollEnabled: boolean,\n- +bounces: boolean,\n- +pressColor: string,\n- +pressOpacity: number,\n- +getAccessible: ({| +route: Route<> |}) => boolean,\n- +renderBadge: ({| +route: Route<> |}) => React$Node,\n- +renderIndicator: MaterialTopTabBarIndicatorProps => React$Node,\n- +tabStyle: ViewStyleProp,\n- +indicatorStyle: ViewStyleProp,\n- +indicatorContainerStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- +activeTintColor: string,\n- +inactiveTintColor: string,\n- +iconStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- +showLabel: boolean,\n- +showIcon: boolean,\n- +allowFontScaling: boolean,\n- |}>;\n-\ndeclare export type MaterialTopTabDescriptor = Descriptor<\nMaterialBottomTabNavigationHelpers<>,\nMaterialBottomTabOptions,\n@@ -1929,7 +1926,6 @@ declare module '@react-navigation/elements' {\n|};\ndeclare export type MaterialTopTabBarProps = {|\n- ...MaterialTopTabBarOptions,\n...MaterialTopTabNavigationBuilderResult,\n+layout: {| +width: number, +height: number |},\n+position: any, // Reanimated.Node<number>\n@@ -1941,16 +1937,13 @@ declare module '@react-navigation/elements' {\n+position?: any, // Reanimated.Value<number>\n+tabBarPosition?: 'top' | 'bottom',\n+initialLayout?: $Partial<{| +width: number, +height: number |}>,\n- +lazy?: boolean,\n+lazyPreloadDistance?: number,\n+removeClippedSubviews?: boolean,\n+sceneContainerStyle?: ViewStyleProp,\n+style?: ViewStyleProp,\n+gestureHandlerProps?: PanGestureHandlerProps,\n+pager?: MaterialTopTabPagerProps => React$Node,\n- +lazyPlaceholder?: ({| +route: Route<> |}) => React$Node,\n+tabBar?: MaterialTopTabBarProps => React$Node,\n- +tabBarOptions?: MaterialTopTabBarOptions,\n|};\ndeclare export type ExtraMaterialTopTabNavigatorProps = {|\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "diff": "@@ -1808,6 +1808,26 @@ declare module '@react-navigation/material-top-tabs' {\n+tabBarIcon: ({| +focused: boolean, +color: string |}) => React$Node,\n+tabBarAccessibilityLabel: string,\n+tabBarTestID: string,\n+ +tabBarActiveTintColor: string,\n+ +tabBarInactiveTintColor: string,\n+ +tabBarPressColor: string,\n+ +tabBarPressOpacity: number,\n+ +tabBarShowLabel: boolean,\n+ +tabBarShowIcon: boolean,\n+ +tabBarAllowFontScaling: boolean,\n+ +tabBarBounces: boolean,\n+ +tabBarScrollEnabled: boolean,\n+ +tabBarIconStyle: ViewStyleProp,\n+ +tabBarLabelStyle: TextStyleProp,\n+ +tabBarItemStyle: ViewStyleProp,\n+ +tabBarIndicatorStyle: ViewStyleProp,\n+ +tabBarIndicatorContainerStyle: ViewStyleProp,\n+ +tabBarContentContainerStyle: ViewStyleProp,\n+ +tabBarStyle: ViewStyleProp,\n+ +tabBarBadge: () => React$Node,\n+ +tabBarIndicator: MaterialTopTabBarIndicatorProps => React$Node,\n+ +lazy: boolean,\n+ +lazyPlaceholder: ({| +route: Route<> |}) => React$Node,\n|}>;\n/**\n@@ -1891,35 +1911,12 @@ declare module '@react-navigation/material-top-tabs' {\n|};\ndeclare export type MaterialTopTabBarIndicatorProps = {|\n- +navigationState: TabNavigationState,\n+ +state: TabNavigationState,\n+width: string,\n+style?: ViewStyleProp,\n+getTabWidth: number => number,\n|};\n- declare export type MaterialTopTabBarOptions = $Partial<{|\n- +scrollEnabled: boolean,\n- +bounces: boolean,\n- +pressColor: string,\n- +pressOpacity: number,\n- +getAccessible: ({| +route: Route<> |}) => boolean,\n- +renderBadge: ({| +route: Route<> |}) => React$Node,\n- +renderIndicator: MaterialTopTabBarIndicatorProps => React$Node,\n- +tabStyle: ViewStyleProp,\n- +indicatorStyle: ViewStyleProp,\n- +indicatorContainerStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- +activeTintColor: string,\n- +inactiveTintColor: string,\n- +iconStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- +showLabel: boolean,\n- +showIcon: boolean,\n- +allowFontScaling: boolean,\n- |}>;\n-\ndeclare export type MaterialTopTabDescriptor = Descriptor<\nMaterialBottomTabNavigationHelpers<>,\nMaterialBottomTabOptions,\n@@ -1932,7 +1929,6 @@ declare module '@react-navigation/material-top-tabs' {\n|};\ndeclare export type MaterialTopTabBarProps = {|\n- ...MaterialTopTabBarOptions,\n...MaterialTopTabNavigationBuilderResult,\n+layout: {| +width: number, +height: number |},\n+position: any, // Reanimated.Node<number>\n@@ -1944,16 +1940,13 @@ declare module '@react-navigation/material-top-tabs' {\n+position?: any, // Reanimated.Value<number>\n+tabBarPosition?: 'top' | 'bottom',\n+initialLayout?: $Partial<{| +width: number, +height: number |}>,\n- +lazy?: boolean,\n+lazyPreloadDistance?: number,\n+removeClippedSubviews?: boolean,\n+sceneContainerStyle?: ViewStyleProp,\n+style?: ViewStyleProp,\n+gestureHandlerProps?: PanGestureHandlerProps,\n+pager?: MaterialTopTabPagerProps => React$Node,\n- +lazyPlaceholder?: ({| +route: Route<> |}) => React$Node,\n+tabBar?: MaterialTopTabBarProps => React$Node,\n- +tabBarOptions?: MaterialTopTabBarOptions,\n|};\ndeclare export type ExtraMaterialTopTabNavigatorProps = {|\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "diff": "@@ -1808,6 +1808,26 @@ declare module '@react-navigation/native' {\n+tabBarIcon: ({| +focused: boolean, +color: string |}) => React$Node,\n+tabBarAccessibilityLabel: string,\n+tabBarTestID: string,\n+ +tabBarActiveTintColor: string,\n+ +tabBarInactiveTintColor: string,\n+ +tabBarPressColor: string,\n+ +tabBarPressOpacity: number,\n+ +tabBarShowLabel: boolean,\n+ +tabBarShowIcon: boolean,\n+ +tabBarAllowFontScaling: boolean,\n+ +tabBarBounces: boolean,\n+ +tabBarScrollEnabled: boolean,\n+ +tabBarIconStyle: ViewStyleProp,\n+ +tabBarLabelStyle: TextStyleProp,\n+ +tabBarItemStyle: ViewStyleProp,\n+ +tabBarIndicatorStyle: ViewStyleProp,\n+ +tabBarIndicatorContainerStyle: ViewStyleProp,\n+ +tabBarContentContainerStyle: ViewStyleProp,\n+ +tabBarStyle: ViewStyleProp,\n+ +tabBarBadge: () => React$Node,\n+ +tabBarIndicator: MaterialTopTabBarIndicatorProps => React$Node,\n+ +lazy: boolean,\n+ +lazyPlaceholder: ({| +route: Route<> |}) => React$Node,\n|}>;\n/**\n@@ -1891,35 +1911,12 @@ declare module '@react-navigation/native' {\n|};\ndeclare export type MaterialTopTabBarIndicatorProps = {|\n- +navigationState: TabNavigationState,\n+ +state: TabNavigationState,\n+width: string,\n+style?: ViewStyleProp,\n+getTabWidth: number => number,\n|};\n- declare export type MaterialTopTabBarOptions = $Partial<{|\n- +scrollEnabled: boolean,\n- +bounces: boolean,\n- +pressColor: string,\n- +pressOpacity: number,\n- +getAccessible: ({| +route: Route<> |}) => boolean,\n- +renderBadge: ({| +route: Route<> |}) => React$Node,\n- +renderIndicator: MaterialTopTabBarIndicatorProps => React$Node,\n- +tabStyle: ViewStyleProp,\n- +indicatorStyle: ViewStyleProp,\n- +indicatorContainerStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- +activeTintColor: string,\n- +inactiveTintColor: string,\n- +iconStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- +showLabel: boolean,\n- +showIcon: boolean,\n- +allowFontScaling: boolean,\n- |}>;\n-\ndeclare export type MaterialTopTabDescriptor = Descriptor<\nMaterialBottomTabNavigationHelpers<>,\nMaterialBottomTabOptions,\n@@ -1932,7 +1929,6 @@ declare module '@react-navigation/native' {\n|};\ndeclare export type MaterialTopTabBarProps = {|\n- ...MaterialTopTabBarOptions,\n...MaterialTopTabNavigationBuilderResult,\n+layout: {| +width: number, +height: number |},\n+position: any, // Reanimated.Node<number>\n@@ -1944,16 +1940,13 @@ declare module '@react-navigation/native' {\n+position?: any, // Reanimated.Value<number>\n+tabBarPosition?: 'top' | 'bottom',\n+initialLayout?: $Partial<{| +width: number, +height: number |}>,\n- +lazy?: boolean,\n+lazyPreloadDistance?: number,\n+removeClippedSubviews?: boolean,\n+sceneContainerStyle?: ViewStyleProp,\n+style?: ViewStyleProp,\n+gestureHandlerProps?: PanGestureHandlerProps,\n+pager?: MaterialTopTabPagerProps => React$Node,\n- +lazyPlaceholder?: ({| +route: Route<> |}) => React$Node,\n+tabBar?: MaterialTopTabBarProps => React$Node,\n- +tabBarOptions?: MaterialTopTabBarOptions,\n|};\ndeclare export type ExtraMaterialTopTabNavigatorProps = {|\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "diff": "@@ -1808,6 +1808,26 @@ declare module '@react-navigation/stack' {\n+tabBarIcon: ({| +focused: boolean, +color: string |}) => React$Node,\n+tabBarAccessibilityLabel: string,\n+tabBarTestID: string,\n+ +tabBarActiveTintColor: string,\n+ +tabBarInactiveTintColor: string,\n+ +tabBarPressColor: string,\n+ +tabBarPressOpacity: number,\n+ +tabBarShowLabel: boolean,\n+ +tabBarShowIcon: boolean,\n+ +tabBarAllowFontScaling: boolean,\n+ +tabBarBounces: boolean,\n+ +tabBarScrollEnabled: boolean,\n+ +tabBarIconStyle: ViewStyleProp,\n+ +tabBarLabelStyle: TextStyleProp,\n+ +tabBarItemStyle: ViewStyleProp,\n+ +tabBarIndicatorStyle: ViewStyleProp,\n+ +tabBarIndicatorContainerStyle: ViewStyleProp,\n+ +tabBarContentContainerStyle: ViewStyleProp,\n+ +tabBarStyle: ViewStyleProp,\n+ +tabBarBadge: () => React$Node,\n+ +tabBarIndicator: MaterialTopTabBarIndicatorProps => React$Node,\n+ +lazy: boolean,\n+ +lazyPlaceholder: ({| +route: Route<> |}) => React$Node,\n|}>;\n/**\n@@ -1891,35 +1911,12 @@ declare module '@react-navigation/stack' {\n|};\ndeclare export type MaterialTopTabBarIndicatorProps = {|\n- +navigationState: TabNavigationState,\n+ +state: TabNavigationState,\n+width: string,\n+style?: ViewStyleProp,\n+getTabWidth: number => number,\n|};\n- declare export type MaterialTopTabBarOptions = $Partial<{|\n- +scrollEnabled: boolean,\n- +bounces: boolean,\n- +pressColor: string,\n- +pressOpacity: number,\n- +getAccessible: ({| +route: Route<> |}) => boolean,\n- +renderBadge: ({| +route: Route<> |}) => React$Node,\n- +renderIndicator: MaterialTopTabBarIndicatorProps => React$Node,\n- +tabStyle: ViewStyleProp,\n- +indicatorStyle: ViewStyleProp,\n- +indicatorContainerStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- +activeTintColor: string,\n- +inactiveTintColor: string,\n- +iconStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- +showLabel: boolean,\n- +showIcon: boolean,\n- +allowFontScaling: boolean,\n- |}>;\n-\ndeclare export type MaterialTopTabDescriptor = Descriptor<\nMaterialBottomTabNavigationHelpers<>,\nMaterialBottomTabOptions,\n@@ -1932,7 +1929,6 @@ declare module '@react-navigation/stack' {\n|};\ndeclare export type MaterialTopTabBarProps = {|\n- ...MaterialTopTabBarOptions,\n...MaterialTopTabNavigationBuilderResult,\n+layout: {| +width: number, +height: number |},\n+position: any, // Reanimated.Node<number>\n@@ -1944,16 +1940,13 @@ declare module '@react-navigation/stack' {\n+position?: any, // Reanimated.Value<number>\n+tabBarPosition?: 'top' | 'bottom',\n+initialLayout?: $Partial<{| +width: number, +height: number |}>,\n- +lazy?: boolean,\n+lazyPreloadDistance?: number,\n+removeClippedSubviews?: boolean,\n+sceneContainerStyle?: ViewStyleProp,\n+style?: ViewStyleProp,\n+gestureHandlerProps?: PanGestureHandlerProps,\n+pager?: MaterialTopTabPagerProps => React$Node,\n- +lazyPlaceholder?: ({| +route: Route<> |}) => React$Node,\n+tabBar?: MaterialTopTabBarProps => React$Node,\n- +tabBarOptions?: MaterialTopTabBarOptions,\n|};\ndeclare export type ExtraMaterialTopTabNavigatorProps = {|\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [32/34] ReactNav6: Update MaterialTopTabsNavigator Summary: Context on changes [in this section](https://reactnavigation.org/docs/upgrading-from-5.x/#material-top-tab-navigator). Depends on D5424 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek Reviewed By: atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5425
129,187
19.10.2022 16:41:09
14,400
8760eb9609f35d674eb61871d6cd3c587c6f1c1d
[native] [34/34] ReactNav6: Update package versions Summary: Exciting!! Depends on D5426 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek, derek Subscribers: derek, abosh
[ { "change_type": "RENAME", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v6.x.x.js", "diff": "" }, { "change_type": "RENAME", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v6.x.x.js", "diff": "" }, { "change_type": "RENAME", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v6.x.x.js", "diff": "" }, { "change_type": "RENAME", "old_path": "native/flow-typed/npm/@react-navigation/native_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v6.x.x.js", "diff": "" }, { "change_type": "RENAME", "old_path": "native/flow-typed/npm/@react-navigation/stack_v5.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v6.x.x.js", "diff": "" }, { "change_type": "MODIFY", "old_path": "native/ios/Podfile.lock", "new_path": "native/ios/Podfile.lock", "diff": "@@ -761,6 +761,8 @@ PODS:\n- React\n- react-native-orientation-locker (1.1.6):\n- React\n+ - react-native-pager-view (6.0.1):\n+ - React-Core\n- react-native-safe-area-context (3.1.9):\n- React-Core\n- react-native-video/Video (5.1.1):\n@@ -850,8 +852,8 @@ PODS:\n- RNCClipboard (1.5.1):\n- React-Core\n- SDWebImage (~> 5.8)\n- - RNCMaskedView (0.1.10):\n- - React\n+ - RNCMaskedView (0.2.8):\n+ - React-Core\n- RNDeviceInfo (8.0.7):\n- React-Core\n- RNExitApp (1.1.0):\n@@ -992,6 +994,7 @@ DEPENDENCIES:\n- \"react-native-netinfo (from `../../node_modules/@react-native-community/netinfo`)\"\n- react-native-notifications (from `../../node_modules/react-native-notifications`)\n- react-native-orientation-locker (from `../../node_modules/react-native-orientation-locker`)\n+ - react-native-pager-view (from `../../node_modules/react-native-pager-view`)\n- react-native-safe-area-context (from `../../node_modules/react-native-safe-area-context`)\n- react-native-video/VideoCaching (from `../../node_modules/react-native-video/react-native-video.podspec`)\n- react-native-webview (from `../../node_modules/react-native-webview`)\n@@ -1013,7 +1016,7 @@ DEPENDENCIES:\n- ReactNativeKeyboardTrackingView (from `../../node_modules/react-native-keyboard-tracking-view`)\n- \"RNCAsyncStorage (from `../../node_modules/@react-native-community/async-storage`)\"\n- \"RNCClipboard (from `../../node_modules/@react-native-community/clipboard`)\"\n- - \"RNCMaskedView (from `../../node_modules/@react-native-community/masked-view`)\"\n+ - \"RNCMaskedView (from `../../node_modules/@react-native-masked-view/masked-view`)\"\n- RNDeviceInfo (from `../../node_modules/react-native-device-info`)\n- RNExitApp (from `../../node_modules/react-native-exit-app`)\n- RNFastImage (from `../../node_modules/react-native-fast-image`)\n@@ -1142,6 +1145,8 @@ EXTERNAL SOURCES:\n:path: \"../../node_modules/react-native-notifications\"\nreact-native-orientation-locker:\n:path: \"../../node_modules/react-native-orientation-locker\"\n+ react-native-pager-view:\n+ :path: \"../../node_modules/react-native-pager-view\"\nreact-native-safe-area-context:\n:path: \"../../node_modules/react-native-safe-area-context\"\nreact-native-video:\n@@ -1185,7 +1190,7 @@ EXTERNAL SOURCES:\nRNCClipboard:\n:path: \"../../node_modules/@react-native-community/clipboard\"\nRNCMaskedView:\n- :path: \"../../node_modules/@react-native-community/masked-view\"\n+ :path: \"../../node_modules/@react-native-masked-view/masked-view\"\nRNDeviceInfo:\n:path: \"../../node_modules/react-native-device-info\"\nRNExitApp:\n@@ -1275,6 +1280,7 @@ SPEC CHECKSUMS:\nreact-native-netinfo: e849fc21ca2f4128a5726c801a82fc6f4a6db50d\nreact-native-notifications: bb042206ac7eab9323d528c780b3d6fe796c1f5e\nreact-native-orientation-locker: 23918c400376a7043e752c639c122fcf6bce8f1c\n+ react-native-pager-view: 3051346698a0ba0c4e13e40097cc11b00ee03cca\nreact-native-safe-area-context: b6e0e284002381d2ff29fa4fff42b4d8282e3c94\nreact-native-video: 0bb76b6d6b77da3009611586c7dbf817b947f30e\nreact-native-webview: e771bc375f789ebfa02a26939a57dbc6fa897336\n@@ -1296,7 +1302,7 @@ SPEC CHECKSUMS:\nReactNativeKeyboardTrackingView: 02137fac3b2ebd330d74fa54ead48b14750a2306\nRNCAsyncStorage: 60a80e72d95bf02a01cace55d3697d9724f0d77f\nRNCClipboard: f470a4445c779f99c10201b038ab3f9e24e71dbc\n- RNCMaskedView: 5a8ec07677aa885546a0d98da336457e2bea557f\n+ RNCMaskedView: bc0170f389056201c82a55e242e5d90070e18e5a\nRNDeviceInfo: 55463fa6e252ca3f0e2ba6001a7b82f879914338\nRNExitApp: c4e052df2568b43bec8a37c7cd61194d4cfee2c3\nRNFastImage: 2ed80661d5ef384fb1b539f1f3c81a1733f92bc9\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"@react-native-community/art\": \"^1.2.0\",\n\"@react-native-community/async-storage\": \"^1.6.1\",\n\"@react-native-community/clipboard\": \"^1.5.1\",\n- \"@react-native-community/masked-view\": \"^0.1.10\",\n\"@react-native-community/netinfo\": \"^6.0.0\",\n- \"@react-navigation/bottom-tabs\": \"^5.11.1\",\n- \"@react-navigation/devtools\": \"^5.1.17\",\n- \"@react-navigation/material-top-tabs\": \"^5.3.9\",\n- \"@react-navigation/native\": \"^5.9.8\",\n- \"@react-navigation/stack\": \"^5.12.8\",\n+ \"@react-native-masked-view/masked-view\": \"^0.2.8\",\n+ \"@react-navigation/bottom-tabs\": \"^6.4.0\",\n+ \"@react-navigation/devtools\": \"^6.0.10\",\n+ \"@react-navigation/elements\": \"^1.3.6\",\n+ \"@react-navigation/material-top-tabs\": \"^6.3.0\",\n+ \"@react-navigation/native\": \"^6.0.13\",\n+ \"@react-navigation/stack\": \"^6.3.2\",\n\"base-64\": \"^0.1.0\",\n\"expo\": \"43.0.0\",\n\"expo-haptics\": \"~11.0.3\",\n\"react-native-keychain\": \"^8.0.0\",\n\"react-native-notifications\": \"git+https://git@github.com/ashoat/react-native-notifications.git\",\n\"react-native-orientation-locker\": \"^1.1.6\",\n+ \"react-native-pager-view\": \"^6.0.1\",\n\"react-native-progress\": \"^4.1.2\",\n\"react-native-reanimated\": \"^2.3.1\",\n\"react-native-safe-area-context\": \"^3.1.9\",\n\"react-native-safe-area-view\": \"^2.0.0\",\n\"react-native-screens\": \"~3.8.0\",\n\"react-native-svg\": \"^12.3.0\",\n- \"react-native-tab-view\": \"^2.15.2\",\n+ \"react-native-tab-view\": \"^3.3.0\",\n\"react-native-vector-icons\": \"^6.6.0\",\n\"react-native-video\": \"~5.1.1\",\n\"react-native-webview\": \"^11.23.0\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "resolved \"https://registry.yarnpkg.com/@react-native-community/clipboard/-/clipboard-1.5.1.tgz#32abb3ea2eb91ee3f9c5fb1d32d5783253c9fabe\"\nintegrity sha512-AHAmrkLEH5UtPaDiRqoULERHh3oNv7Dgs0bTC0hO5Z2GdNokAMPT5w8ci8aMcRemcwbtdHjxChgtjbeA38GBdA==\n-\"@react-native-community/masked-view@^0.1.10\":\n- version \"0.1.10\"\n- resolved \"https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.10.tgz#5dda643e19e587793bc2034dd9bf7398ad43d401\"\n- integrity sha512-rk4sWFsmtOw8oyx8SD3KSvawwaK7gRBSEIy2TAwURyGt+3TizssXP1r8nx3zY+R7v2vYYHXZ+k2/GULAT/bcaQ==\n-\n\"@react-native-community/netinfo@^6.0.0\":\nversion \"6.0.0\"\nresolved \"https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-6.0.0.tgz#2a4d7190b508dd0c2293656c9c1aa068f6f60a71\"\nintegrity sha512-Z9M8VGcF2IZVOo2x+oUStvpCW/8HjIRi4+iQCu5n+PhC7OqCQX58KYAzdBr///alIfRXiu6oMb+lK+rXQH1FvQ==\n+\"@react-native-masked-view/masked-view@^0.2.8\":\n+ version \"0.2.8\"\n+ resolved \"https://registry.yarnpkg.com/@react-native-masked-view/masked-view/-/masked-view-0.2.8.tgz#34405a4361882dae7c81b1b771fe9f5fbd545a97\"\n+ integrity sha512-+1holBPDF1yi/y0uc1WB6lA5tSNHhM7PpTMapT3ypvSnKQ9+C6sy/zfjxNxRA/llBQ1Ci6f94EaK56UCKs5lTA==\n+\n\"@react-native/assets@1.0.0\":\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/@react-native/assets/-/assets-1.0.0.tgz#c6f9bf63d274bafc8e970628de24986b30a55c8e\"\nresolved \"https://registry.yarnpkg.com/@react-native/polyfills/-/polyfills-2.0.0.tgz#4c40b74655c83982c8cf47530ee7dc13d957b6aa\"\nintegrity sha512-K0aGNn1TjalKj+65D7ycc1//H9roAQ51GJVk5ZJQFb2teECGmzd86bYDC0aYdbRf7gtovescq4Zt6FR0tgXiHQ==\n-\"@react-navigation/bottom-tabs@^5.11.1\":\n- version \"5.11.1\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/bottom-tabs/-/bottom-tabs-5.11.1.tgz#58c4f784d3262f7fb6f3075b41f64e9617054087\"\n- integrity sha512-fkkFzEIOZzV98sbq2kee/cXNIO3L/2x4cDGP0oIqhXDxser78J0jg08pZqyF6IIq9gPHo5T8vGffvhNBaZoCGw==\n+\"@react-navigation/bottom-tabs@^6.4.0\":\n+ version \"6.4.0\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/bottom-tabs/-/bottom-tabs-6.4.0.tgz#63743874648f92adedf37186cb7cedcd47826ee9\"\n+ integrity sha512-90CapiXjiWudbCiki9e6fOr/CECQRguIxv5OD7IBfbAMGX5GGiJpX8aqiHAz2DxpAz31v4JZcUr945+lFhXBfA==\ndependencies:\n- color \"^3.1.3\"\n- react-native-iphone-x-helper \"^1.3.0\"\n+ \"@react-navigation/elements\" \"^1.3.6\"\n+ color \"^4.2.3\"\n+ warn-once \"^0.1.0\"\n-\"@react-navigation/core@^5.14.3\", \"@react-navigation/core@^5.16.1\":\n- version \"5.16.1\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/core/-/core-5.16.1.tgz#e0d308bd9bbd930114ce55c4151806b6d7907f69\"\n- integrity sha512-3AToC7vPNeSNcHFLd1h71L6u34hfXoRAS1CxF9Fc4uC8uOrVqcNvphpeFbE0O9Bw6Zpl0BnMFl7E5gaL3KGzNA==\n+\"@react-navigation/core@^6.4.0\":\n+ version \"6.4.0\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/core/-/core-6.4.0.tgz#c44d33a8d8ef010a102c7f831fc8add772678509\"\n+ integrity sha512-tpc0Ak/DiHfU3LlYaRmIY7vI4sM/Ru0xCet6runLUh9aABf4wiLgxyFJ5BtoWq6xFF8ymYEA/KWtDhetQ24YiA==\ndependencies:\n- \"@react-navigation/routers\" \"^5.7.4\"\n+ \"@react-navigation/routers\" \"^6.1.3\"\nescape-string-regexp \"^4.0.0\"\n- nanoid \"^3.1.15\"\n- query-string \"^6.13.6\"\n+ nanoid \"^3.1.23\"\n+ query-string \"^7.0.0\"\nreact-is \"^16.13.0\"\n+ use-latest-callback \"^0.1.5\"\n-\"@react-navigation/devtools@^5.1.17\":\n- version \"5.1.17\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/devtools/-/devtools-5.1.17.tgz#1be6bc81a8588bceb36e83648abe10dd724b6b4d\"\n- integrity sha512-c/lvyagwIDORcFWDjqO9TY7ESRP58kjApf+v7qvh5ReXBbm/gXD5KdzlFyeMCXfkxW9bfH5HXOHL9AkiVzt5oA==\n+\"@react-navigation/devtools@^6.0.10\":\n+ version \"6.0.10\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/devtools/-/devtools-6.0.10.tgz#54b71fa5cd61ccd82af2ad70f1cd77648dbba7da\"\n+ integrity sha512-TF2hkHBL/UxgYIorZJkFeliyJ7faa+WZJgCJ+q8B6xZuwloCxQQDb3E2yQqAf7OZOsRlTFLppCnhp1PLJRTzPw==\ndependencies:\n- \"@react-navigation/core\" \"^5.14.3\"\n- deep-equal \"^2.0.4\"\n+ deep-equal \"^2.0.5\"\n+ nanoid \"^3.1.23\"\n+ stacktrace-parser \"^0.1.10\"\n-\"@react-navigation/material-top-tabs@^5.3.9\":\n- version \"5.3.9\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/material-top-tabs/-/material-top-tabs-5.3.9.tgz#8a43c3213313abdc896bf5d59eb447ec67a66593\"\n- integrity sha512-y7Ny5Emjuo5NsmiXX5mkAn1j160dzYocV+r8H/tiQUfR9cTLRu22jym7eLGpeKM0yzpeT2o2D+kRclom4oxMjg==\n+\"@react-navigation/elements@^1.3.6\":\n+ version \"1.3.6\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/elements/-/elements-1.3.6.tgz#fa700318528db93f05144b1be4b691b9c1dd1abe\"\n+ integrity sha512-pNJ8R9JMga6SXOw6wGVN0tjmE6vegwPmJBL45SEMX2fqTfAk2ykDnlJHodRpHpAgsv0DaI8qX76z3A+aqKSU0w==\n+\n+\"@react-navigation/material-top-tabs@^6.3.0\":\n+ version \"6.3.0\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/material-top-tabs/-/material-top-tabs-6.3.0.tgz#ac49389155a3c1cb7a82119491e2059a7557718e\"\n+ integrity sha512-nv9c3WbmzuwYZqDkinP375aTYzQIXkCzAmpHRsVH3AjpF2Qc62oKDjWuSMFdRn3VPe3LAH/0P6yUzQSX/800yQ==\ndependencies:\n- color \"^3.1.3\"\n+ color \"^4.2.3\"\n+ warn-once \"^0.1.0\"\n-\"@react-navigation/native@^5.9.8\":\n- version \"5.9.8\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/native/-/native-5.9.8.tgz#ac76ee6390ea7ce807486ca5c38d903e23433a97\"\n- integrity sha512-DNbcDHXQPSFDLn51kkVVJjT3V7jJy2GztNYZe/2bEg29mi5QEcHHcpifjMCtyFKntAOWzKlG88UicIQ17UEghg==\n+\"@react-navigation/native@^6.0.13\":\n+ version \"6.0.13\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/native/-/native-6.0.13.tgz#ec504120e193ea6a7f24ffa765a1338be5a3160a\"\n+ integrity sha512-CwaJcAGbhv3p3ECablxBkw8QBCGDWXqVRwQ4QbelajNW623m3sNTC9dOF6kjp8au6Rg9B5e0KmeuY0xWbPk79A==\ndependencies:\n- \"@react-navigation/core\" \"^5.16.1\"\n+ \"@react-navigation/core\" \"^6.4.0\"\nescape-string-regexp \"^4.0.0\"\n- nanoid \"^3.1.15\"\n+ fast-deep-equal \"^3.1.3\"\n+ nanoid \"^3.1.23\"\n-\"@react-navigation/routers@^5.7.4\":\n- version \"5.7.4\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/routers/-/routers-5.7.4.tgz#8b5460e841a0c64f6c9a5fbc2a1eb832432d4fb0\"\n- integrity sha512-0N202XAqsU/FlE53Nmh6GHyMtGm7g6TeC93mrFAFJOqGRKznT0/ail+cYlU6tNcPA9AHzZu1Modw1eoDINSliQ==\n+\"@react-navigation/routers@^6.1.3\":\n+ version \"6.1.3\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/routers/-/routers-6.1.3.tgz#1df51959e9a67c44367462e8b929b7360a5d2555\"\n+ integrity sha512-idJotMEzHc3haWsCh7EvnnZMKxvaS4YF/x2UyFBkNFiEFUaEo/1ioQU6qqmVLspdEv4bI/dLm97hQo7qD8Yl7Q==\ndependencies:\n- nanoid \"^3.1.15\"\n+ nanoid \"^3.1.23\"\n-\"@react-navigation/stack@^5.12.8\":\n- version \"5.13.0\"\n- resolved \"https://registry.yarnpkg.com/@react-navigation/stack/-/stack-5.13.0.tgz#3c00848642a4a966f497822f02494273f4d4c621\"\n- integrity sha512-UorckfT7p7D5BLMJgpi8lY6duSV6WSG/NwidxWQK06u5bO0Uwxgx9sINjJZbS5+ijVJy8bB8SbG/I+H2bgT4eA==\n+\"@react-navigation/stack@^6.3.2\":\n+ version \"6.3.2\"\n+ resolved \"https://registry.yarnpkg.com/@react-navigation/stack/-/stack-6.3.2.tgz#ba0a65e10e2b165185f20718046f25d8c9abb076\"\n+ integrity sha512-wb8koMp4OTrG5geOqEFPDatTyl8dsSyRBHN4h0wzgNT29V/JjkS3LYwkGLLfUmMfeLXFyIfEPILAjYLFmnk3dA==\ndependencies:\n- color \"^3.1.3\"\n- react-native-iphone-x-helper \"^1.3.0\"\n+ \"@react-navigation/elements\" \"^1.3.6\"\n+ color \"^4.2.3\"\n+ warn-once \"^0.1.0\"\n\"@redux-devtools/app@^1.0.0-9\":\nversion \"1.0.0-9\"\n@@ -6548,7 +6559,7 @@ color-support@^1.1.2, 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@^3.0.0, color@^3.1.3, color@^3.2.1:\n+color@^3.0.0, color@^3.2.1:\nversion \"3.2.1\"\nresolved \"https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164\"\nintegrity sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==\n@@ -7451,20 +7462,21 @@ deep-equal@^1.0.1:\nobject-keys \"^1.1.1\"\nregexp.prototype.flags \"^1.2.0\"\n-deep-equal@^2.0.4:\n- version \"2.0.4\"\n- resolved \"https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.4.tgz#6b0b407a074666033169df3acaf128e1c6f3eab6\"\n- integrity sha512-BUfaXrVoCfgkOQY/b09QdO9L3XNoF2XH0A3aY9IQwQL/ZjLOe8FQgCNVl1wiolhsFo8kFdO9zdPViCPbmaJA5w==\n+deep-equal@^2.0.5:\n+ version \"2.0.5\"\n+ resolved \"https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.5.tgz#55cd2fe326d83f9cbf7261ef0e060b3f724c5cb9\"\n+ integrity sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw==\ndependencies:\n- es-abstract \"^1.18.0-next.1\"\n- es-get-iterator \"^1.1.0\"\n+ call-bind \"^1.0.0\"\n+ es-get-iterator \"^1.1.1\"\n+ get-intrinsic \"^1.0.1\"\nis-arguments \"^1.0.4\"\nis-date-object \"^1.0.2\"\nis-regex \"^1.1.1\"\nisarray \"^2.0.5\"\n- object-is \"^1.1.3\"\n+ object-is \"^1.1.4\"\nobject-keys \"^1.1.1\"\n- object.assign \"^4.1.1\"\n+ object.assign \"^4.1.2\"\nregexp.prototype.flags \"^1.3.0\"\nside-channel \"^1.0.3\"\nwhich-boxed-primitive \"^1.0.1\"\n@@ -8100,16 +8112,17 @@ es-abstract@^1.17.4, es-abstract@^1.17.5, es-abstract@^1.18.0-next.1, es-abstrac\nstring.prototype.trimstart \"^1.0.4\"\nunbox-primitive \"^1.0.1\"\n-es-get-iterator@^1.1.0:\n- version \"1.1.0\"\n- resolved \"https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8\"\n- integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==\n+es-get-iterator@^1.1.1:\n+ version \"1.1.2\"\n+ resolved \"https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.2.tgz#9234c54aba713486d7ebde0220864af5e2b283f7\"\n+ integrity sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ==\ndependencies:\n- es-abstract \"^1.17.4\"\n+ call-bind \"^1.0.2\"\n+ get-intrinsic \"^1.1.0\"\nhas-symbols \"^1.0.1\"\n- is-arguments \"^1.0.4\"\n- is-map \"^2.0.1\"\n- is-set \"^2.0.1\"\n+ is-arguments \"^1.1.0\"\n+ is-map \"^2.0.2\"\n+ is-set \"^2.0.2\"\nis-string \"^1.0.5\"\nisarray \"^2.0.5\"\n@@ -9225,6 +9238,11 @@ fill-range@^7.0.1:\ndependencies:\nto-regex-range \"^5.0.1\"\n+filter-obj@^1.1.0:\n+ version \"1.1.0\"\n+ resolved \"https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b\"\n+ integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==\n+\nfinalhandler@1.1.2, finalhandler@~1.1.2:\nversion \"1.1.2\"\nresolved \"https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d\"\n@@ -9710,6 +9728,15 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5:\nresolved \"https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e\"\nintegrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==\n+get-intrinsic@^1.0.1:\n+ version \"1.1.3\"\n+ resolved \"https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.3.tgz#063c84329ad93e83893c7f4f243ef63ffa351385\"\n+ integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==\n+ dependencies:\n+ function-bind \"^1.1.1\"\n+ has \"^1.0.3\"\n+ has-symbols \"^1.0.3\"\n+\nget-intrinsic@^1.0.2, get-intrinsic@^1.1.0:\nversion \"1.1.1\"\nresolved \"https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6\"\n@@ -10759,6 +10786,14 @@ is-arguments@^1.0.4:\nresolved \"https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3\"\nintegrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==\n+is-arguments@^1.1.0:\n+ version \"1.1.1\"\n+ resolved \"https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b\"\n+ integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==\n+ dependencies:\n+ call-bind \"^1.0.2\"\n+ has-tostringtag \"^1.0.0\"\n+\nis-arrayish@^0.2.1:\nversion \"0.2.1\"\nresolved \"https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d\"\n@@ -10976,6 +11011,11 @@ is-map@^2.0.1:\nresolved \"https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1\"\nintegrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==\n+is-map@^2.0.2:\n+ version \"2.0.2\"\n+ resolved \"https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127\"\n+ integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==\n+\nis-nan@^1.3.2:\nversion \"1.3.2\"\nresolved \"https://registry.yarnpkg.com/is-nan/-/is-nan-1.3.2.tgz#043a54adea31748b55b6cd4e09aadafa69bd9e1d\"\n@@ -11090,6 +11130,11 @@ is-set@^2.0.1:\nresolved \"https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43\"\nintegrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==\n+is-set@^2.0.2:\n+ version \"2.0.2\"\n+ resolved \"https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec\"\n+ integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==\n+\nis-stream-ended@^0.1.4:\nversion \"0.1.4\"\nresolved \"https://registry.yarnpkg.com/is-stream-ended/-/is-stream-ended-0.1.4.tgz#f50224e95e06bce0e356d440a4827cd35b267eda\"\n@@ -13785,7 +13830,7 @@ nanoid@^2.0.0:\nresolved \"https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.11.tgz#ec24b8a758d591561531b4176a01e3ab4f0f0280\"\nintegrity sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==\n-nanoid@^3.1.15, nanoid@^3.1.23:\n+nanoid@^3.1.23:\nversion \"3.1.30\"\nresolved \"https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362\"\nintegrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ==\n@@ -14245,7 +14290,7 @@ object-inspect@^1.10.3, object-inspect@^1.11.1, object-inspect@^1.9.0:\nresolved \"https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0\"\nintegrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==\n-object-is@^1.0.1, object-is@^1.1.3:\n+object-is@^1.0.1:\nversion \"1.1.3\"\nresolved \"https://registry.yarnpkg.com/object-is/-/object-is-1.1.3.tgz#2e3b9e65560137455ee3bd62aec4d90a2ea1cc81\"\nintegrity sha512-teyqLvFWzLkq5B9ki8FVWA902UER2qkxmdA4nLf+wjOLAWgxzCWZNCxpDq9MvE8MmhWNr+I8w3BN49Vx36Y6Xg==\n@@ -14253,6 +14298,14 @@ object-is@^1.0.1, object-is@^1.1.3:\ndefine-properties \"^1.1.3\"\nes-abstract \"^1.18.0-next.1\"\n+object-is@^1.1.4:\n+ version \"1.1.5\"\n+ resolved \"https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac\"\n+ integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==\n+ dependencies:\n+ call-bind \"^1.0.2\"\n+ define-properties \"^1.1.3\"\n+\nobject-keys@0.5.0:\nversion \"0.5.0\"\nresolved \"https://registry.yarnpkg.com/object-keys/-/object-keys-0.5.0.tgz#09e211f3e00318afc4f592e36e7cdc10d9ad7293\"\n@@ -14275,7 +14328,7 @@ object-visit@^1.0.0:\ndependencies:\nisobject \"^3.0.0\"\n-object.assign@^4.1.0, object.assign@^4.1.1, object.assign@^4.1.2:\n+object.assign@^4.1.0, object.assign@^4.1.2:\nversion \"4.1.2\"\nresolved \"https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940\"\nintegrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==\n@@ -15699,12 +15752,13 @@ query-string@^4.1.0:\nobject-assign \"^4.1.0\"\nstrict-uri-encode \"^1.0.0\"\n-query-string@^6.13.6:\n- version \"6.13.7\"\n- resolved \"https://registry.yarnpkg.com/query-string/-/query-string-6.13.7.tgz#af53802ff6ed56f3345f92d40a056f93681026ee\"\n- integrity sha512-CsGs8ZYb39zu0WLkeOhe0NMePqgYdAuCqxOYKDR5LVCytDZYMGx3Bb+xypvQvPHVPijRXB0HZNFllCzHRe4gEA==\n+query-string@^7.0.0:\n+ version \"7.1.1\"\n+ resolved \"https://registry.yarnpkg.com/query-string/-/query-string-7.1.1.tgz#754620669db978625a90f635f12617c271a088e1\"\n+ integrity sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w==\ndependencies:\ndecode-uri-component \"^0.2.0\"\n+ filter-obj \"^1.1.0\"\nsplit-on-first \"^1.0.0\"\nstrict-uri-encode \"^2.0.0\"\n@@ -16054,11 +16108,6 @@ react-native-in-app-message@^1.0.2:\nresolved \"https://registry.yarnpkg.com/react-native-in-app-message/-/react-native-in-app-message-1.0.2.tgz#e971c039bcd0e238306f73fbea43fc866aa94a69\"\nintegrity sha512-dbzC3AMT5CzGafzUu8ifFMd5g6v0Ww5q9oQgw8RRqjMhggoXDipct9BBI9g4tAoUB2xE2axqu2tKC5pnpBnbdQ==\n-react-native-iphone-x-helper@^1.3.0:\n- version \"1.3.1\"\n- resolved \"https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz#20c603e9a0e765fd6f97396638bdeb0e5a60b010\"\n- integrity sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg==\n-\nreact-native-keyboard-input@6.0.1:\nversion \"6.0.1\"\nresolved \"https://registry.yarnpkg.com/react-native-keyboard-input/-/react-native-keyboard-input-6.0.1.tgz#996a0c00c2232b09e30cdee37dd8c086c688e1f7\"\n@@ -16089,6 +16138,11 @@ react-native-orientation-locker@^1.1.6:\nresolved \"https://registry.yarnpkg.com/react-native-orientation-locker/-/react-native-orientation-locker-1.1.6.tgz#7d66a62cdbf4dd1548522efe69a4e04af5daf929\"\nintegrity sha512-yXTC8KmKfhuEAh+gCOcehx0v4IjYapV0lJ6W1muafoISvxMsT+Cizzy+Iz78hQywVZTJNB/Xusl7WMXev7OxDQ==\n+react-native-pager-view@^6.0.1:\n+ version \"6.0.1\"\n+ resolved \"https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-6.0.1.tgz#353abf38d3c2b91ed7c586f10af0f94700f5b1dc\"\n+ integrity sha512-kOVNu+4JnR3Gpykviy4WbOAnQz8TgP6O2pRvne221oPUDQLYrvEE/FINR0P85TxbMgvKTPlLejGw0ZHQbezK/g==\n+\nreact-native-progress@^4.1.2:\nversion \"4.1.2\"\nresolved \"https://registry.yarnpkg.com/react-native-progress/-/react-native-progress-4.1.2.tgz#ffb2264ddfeba409c730e36a9791bb7bbe07a00d\"\n@@ -16152,10 +16206,12 @@ react-native-svg@^12.3.0:\ncss-select \"^4.2.1\"\ncss-tree \"^1.0.0-alpha.39\"\n-react-native-tab-view@^2.15.2:\n- version \"2.15.2\"\n- resolved \"https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-2.15.2.tgz#4bc7832d33a119306614efee667509672a7ee64e\"\n- integrity sha512-2hxLkBnZtEKFDyfvNO5EUywhy3f/EiLOBO8SWqKj4BMBTO0QwnybaPE5MVF00Fhz+VA4+h/iI40Dkrrtq70dGg==\n+react-native-tab-view@^3.3.0:\n+ version \"3.3.0\"\n+ resolved \"https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-3.3.0.tgz#3d24ae4f4c55cfd54cd1d2d1f8915b0b2c33a5da\"\n+ integrity sha512-xjAQe657Gp/de2QHb7ptksTg8Jcb+j3fLAdcYryzfavt/pe+HtKLpkCtQsxyIJpRrAO7YPxFsymi2N4MnNfePA==\n+ dependencies:\n+ use-latest-callback \"^0.1.5\"\nreact-native-url-polyfill@^1.3.0:\nversion \"1.3.0\"\n@@ -17940,6 +17996,13 @@ stackframe@^1.1.1:\nresolved \"https://registry.yarnpkg.com/stackframe/-/stackframe-1.2.0.tgz#52429492d63c62eb989804c11552e3d22e779303\"\nintegrity sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==\n+stacktrace-parser@^0.1.10:\n+ version \"0.1.10\"\n+ resolved \"https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a\"\n+ integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==\n+ dependencies:\n+ type-fest \"^0.7.1\"\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@@ -19186,6 +19249,11 @@ use-callback-ref@^1.3.0:\ndependencies:\ntslib \"^2.0.0\"\n+use-latest-callback@^0.1.5:\n+ version \"0.1.5\"\n+ resolved \"https://registry.yarnpkg.com/use-latest-callback/-/use-latest-callback-0.1.5.tgz#a4a836c08fa72f6608730b5b8f4bbd9c57c04f51\"\n+ integrity sha512-HtHatS2U4/h32NlkhupDsPlrbiD27gSH5swBdtXbCAlc6pfOFzaj0FehW/FO12rx8j2Vy4/lJScCiJyM01E+bQ==\n+\nuse-sidecar@^1.1.2:\nversion \"1.1.2\"\nresolved \"https://registry.yarnpkg.com/use-sidecar/-/use-sidecar-1.1.2.tgz#2f43126ba2d7d7e117aa5855e5d8f0276dfe73c2\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] [34/34] ReactNav6: Update package versions Summary: Exciting!! Depends on D5426 Test Plan: Flow + ran the app on my phone and played around with it Reviewers: atul, tomek, bartek, derek Reviewed By: derek Subscribers: derek, abosh Differential Revision: https://phab.comm.dev/D5427
129,206
12.10.2022 20:41:41
14,400
d15b292342ee3fd8b2d94c86fba28e4fe006fe2f
Added tests for spoiler regex Summary: Added tests for spoiler regex, will test positive and negative examples. Test Plan: Tested results using Reviewers: rohan, atul, ginsu Subscribers: tomek, abosh
[ { "change_type": "ADD", "old_path": null, "new_path": "lib/shared/markdown.test.js", "diff": "+// @flow\n+\n+import { spoilerRegex } from './markdown.js';\n+\n+// Each of the below tests is subject to the following RegEx pattern:\n+// Spoiler RegEx: /^\\|\\|([^\\n]+?)\\|\\|/g\n+\n+describe('spoilerRegex', () => {\n+ it('We expect a spoiler with a single space character to match.', () => {\n+ expect('|| ||').toMatch(spoilerRegex);\n+ });\n+\n+ it('We expect a spoiler with regular text + spaces to match (1).', () => {\n+ expect('|| hello ||').toMatch(spoilerRegex);\n+ });\n+\n+ it('We expect a spoiler with regular text + spaces to match (2).', () => {\n+ expect('||SPOILER||').toMatch(spoilerRegex);\n+ });\n+\n+ it('We expect a spoiler containing any number of || within it to match (1).', () => {\n+ expect('|| || ||').toMatch(spoilerRegex);\n+ });\n+\n+ it('We expect a spoiler containing any number of || within it to match (2).', () => {\n+ expect('||||||').toMatch(spoilerRegex);\n+ });\n+\n+ it('We expect a spoiler containing any number of || within it, as well as regular text + spaces, to match.', () => {\n+ expect('||SPOILER||SPOILER||').toMatch(spoilerRegex);\n+ });\n+\n+ it('We do not expect a spoiler containing a new line character to match (1).', () => {\n+ expect('||\\n||').not.toMatch(spoilerRegex);\n+ });\n+\n+ it('We do not expect a spoiler containing a new line character to match (2).', () => {\n+ expect('||\\r\\n||').not.toMatch(spoilerRegex);\n+ });\n+\n+ it('We do not expect an empty spoiler to match.', () => {\n+ expect('||||').not.toMatch(spoilerRegex);\n+ });\n+\n+ it('We expect a spoiler containing a single space to match, even when split across multiple lines.', () => {\n+ expect('|| \\\n+ ||').toMatch(spoilerRegex);\n+ });\n+\n+ it('We do not expect a spoiler containing a new line character to match (3).', () => {\n+ expect('|| \\n\\\n+ ||').not.toMatch(spoilerRegex);\n+ });\n+});\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Added tests for spoiler regex Summary: Added tests for spoiler regex, will test positive and negative examples. Test Plan: Tested results using https://regexr.com/ Reviewers: rohan, atul, ginsu Reviewed By: atul Subscribers: tomek, abosh Differential Revision: https://phab.comm.dev/D5358
129,189
20.10.2022 11:34:39
14,400
6df5a6495bc9ef37188c1ff0604d740deea7752a
[keyserver/sql] add SIWE columns Summary: columns necessary for SIWE [[ | linear task ]] Test Plan: run keyserver, verify columns are in table with tableplus Reviewers: atul, varun, tomek Subscribers: abosh, ginsu, ashoat, tomek, varun, atul
[ { "change_type": "MODIFY", "old_path": "keyserver/src/database/migration-config.js", "new_path": "keyserver/src/database/migration-config.js", "diff": "@@ -36,6 +36,17 @@ const migrations: $ReadOnlyMap<number, () => Promise<void>> = new Map([\nawait dbQuery(SQL`ALTER TABLE uploads ADD INDEX container (container)`);\n},\n],\n+ [\n+ 5,\n+ async () => {\n+ await dbQuery(SQL`\n+ ALTER TABLE cookies\n+ ADD device_id varchar(255) DEFAULT NULL,\n+ ADD public_key varchar(255) DEFAULT NULL,\n+ ADD social_proof varchar(255) DEFAULT NULL;\n+ `);\n+ },\n+ ],\n]);\nconst newDatabaseVersion: number = Math.max(...migrations.keys());\n" }, { "change_type": "MODIFY", "old_path": "keyserver/src/database/setup-db.js", "new_path": "keyserver/src/database/setup-db.js", "diff": "@@ -33,6 +33,9 @@ async function createTables() {\nlast_used bigint(20) NOT NULL,\ndevice_token varchar(255) DEFAULT NULL,\nversions json DEFAULT NULL,\n+ device_id varchar(255) DEFAULT NULL,\n+ public_key varchar(255) DEFAULT NULL,\n+ social_proof varchar(255) DEFAULT NULL,\n\\`primary\\` TINYINT(1) DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=latin1;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver/sql] add SIWE columns Summary: columns necessary for SIWE [[ https://linear.app/comm/issue/ENG-1966/add-siwe-columns-to-cookies-table | linear task ]] Test Plan: run keyserver, verify columns are in table with tableplus Reviewers: atul, varun, tomek Reviewed By: tomek Subscribers: abosh, ginsu, ashoat, tomek, varun, atul Differential Revision: https://phab.comm.dev/D5438
129,184
21.10.2022 13:47:32
14,400
339e83a168bbe1215bd0e83c821a1e827ee6e19a
[GH Actions] Add `arm-linux-androideabi` target via `rustup` for Android CI Summary: Fix Android CI for GitHub Actions Test Plan: See if CI passes Reviewers: ashoat, varun Subscribers: ashoat, tomek, abosh
[ { "change_type": "MODIFY", "old_path": ".github/workflows/android_ci.yml", "new_path": ".github/workflows/android_ci.yml", "diff": "@@ -24,6 +24,9 @@ jobs:\njava-version: '11'\ndistribution: 'adopt'\n+ - name: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android\n+ run: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android\n+\n- name: Install Yarn\nrun: npm install -g yarn\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[GH Actions] Add `arm-linux-androideabi` target via `rustup` for Android CI Summary: Fix Android CI for GitHub Actions Test Plan: See if CI passes Reviewers: ashoat, varun Reviewed By: ashoat, varun Subscribers: ashoat, tomek, abosh Differential Revision: https://phab.comm.dev/D5450
129,184
21.10.2022 14:34:55
14,400
89fb3fb5aa32d606e762944e7578cceb8bc25c97
[GH Actions] Add `apt install protobuf-compiler` to Android CI Summary: Attempt to fix GH Actions CI to unblock release. Test Plan: CI Reviewers: varun Subscribers: ashoat, tomek, abosh
[ { "change_type": "MODIFY", "old_path": ".github/workflows/android_ci.yml", "new_path": ".github/workflows/android_ci.yml", "diff": "@@ -27,6 +27,9 @@ jobs:\n- name: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android\nrun: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android\n+ - name: apt update && apt install -y protobuf-compiler\n+ run: apt update && apt install -y protobuf-compiler\n+\n- name: Install Yarn\nrun: npm install -g yarn\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[GH Actions] Add `apt install protobuf-compiler` to Android CI Summary: Attempt to fix GH Actions CI to unblock release. Test Plan: CI Reviewers: varun Reviewed By: varun Subscribers: ashoat, tomek, abosh Differential Revision: https://phab.comm.dev/D5456
129,184
21.10.2022 14:36:31
14,400
b1f7ecdc14c708a1e435d4704fc4ba3280ca8609
[yarn] Rename `yarn patch` to `yarn arcpatch` Summary: Addresses point made by here: Test Plan: Continues to work as expected... straightforward rename Reviewers: varun, tomek, ginsu Subscribers: ashoat, abosh, tomek
[ { "change_type": "MODIFY", "old_path": "package.json", "new_path": "package.json", "diff": "\"rust-pre-commit\": \"./scripts/rust_pre_commit.sh\",\n\"terraform-pre-commit\": \"./scripts/terraform_pre_commit.sh\",\n\"prepare\": \"husky install\",\n- \"patch\": \"git pull --all --tags && arc patch\"\n+ \"arcpatch\": \"git pull --all --tags && arc patch\"\n},\n\"devDependencies\": {\n\"babel-eslint\": \"^10.1.0\",\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[yarn] Rename `yarn patch` to `yarn arcpatch` Summary: Addresses point made by @tomek here: https://phab.comm.dev/D5445#inline-35863 Test Plan: Continues to work as expected... straightforward rename Reviewers: varun, tomek, ginsu Reviewed By: varun Subscribers: ashoat, abosh, tomek Differential Revision: https://phab.comm.dev/D5455
129,184
21.10.2022 14:47:05
14,400
a85b85a55f851add5e8614e6bf42e30d55cf5dd5
[GH Actions] Attempt to fix `protobuf-compiler` installation for Android CI Summary: There was a permissions issue so we have to use `sudo`. Also modified command to match what we have in `.github/workflows/shellcheck.yml` Test Plan: CI Reviewers: varun Subscribers: ashoat, tomek, abosh
[ { "change_type": "MODIFY", "old_path": ".github/workflows/android_ci.yml", "new_path": ".github/workflows/android_ci.yml", "diff": "@@ -27,8 +27,8 @@ jobs:\n- name: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android\nrun: rustup target add aarch64-linux-android arm-linux-androideabi i686-linux-android x86_64-linux-android\n- - name: apt update && apt install -y protobuf-compiler\n- run: apt update && apt install -y protobuf-compiler\n+ - name: sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install -y protobuf-compiler\n+ run: sudo apt-get update && DEBIAN_FRONTEND=noninteractive sudo apt-get install -y protobuf-compiler\n- name: Install Yarn\nrun: npm install -g yarn\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[GH Actions] Attempt to fix `protobuf-compiler` installation for Android CI Summary: There was a permissions issue so we have to use `sudo`. Also modified command to match what we have in `.github/workflows/shellcheck.yml` Test Plan: CI Reviewers: varun Reviewed By: varun Subscribers: ashoat, tomek, abosh Differential Revision: https://phab.comm.dev/D5457
129,184
24.10.2022 09:11:30
14,400
ded8df036dc0859178b9af16d03b92ee9e3a0553
[native] `codeVersion` -> 150
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -444,8 +444,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 149\n- versionName '1.0.149'\n+ versionCode 150\n+ versionName '1.0.150'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{149};\n+ const int codeVersion{150};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 149;\n+ CURRENT_PROJECT_VERSION = 150;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.149;\n+ MARKETING_VERSION = 1.0.150;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 149;\n+ CURRENT_PROJECT_VERSION = 150;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.149;\n+ MARKETING_VERSION = 1.0.150;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.149</string>\n+ <string>1.0.150</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>149</string>\n+ <string>150</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.149</string>\n+ <string>1.0.150</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>149</string>\n+ <string>150</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 150
129,184
24.10.2022 11:16:16
14,400
bc520a2fba9e40bb09c2b5ee357658e7f578deea
[native] `codeVersion` -> 151
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -444,8 +444,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 150\n- versionName '1.0.150'\n+ versionCode 151\n+ versionName '1.0.151'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{150};\n+ const int codeVersion{151};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 150;\n+ CURRENT_PROJECT_VERSION = 151;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.150;\n+ MARKETING_VERSION = 1.0.151;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 150;\n+ CURRENT_PROJECT_VERSION = 151;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.150;\n+ MARKETING_VERSION = 1.0.151;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.150</string>\n+ <string>1.0.151</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>150</string>\n+ <string>151</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.150</string>\n+ <string>1.0.151</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>150</string>\n+ <string>151</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 151
129,184
24.10.2022 16:27:21
14,400
f858ee10b0007c30be68c4b9055d15710798e79f
[ios] Update `Podfile.lock` Summary: Corresponding changes to `Podfile.lock` after landing the reanimated bump: Test Plan: NA, ran `yarn cleaninstall` on `master`. Reviewers: varun, marcin, tomek Subscribers: tomek, abosh
[ { "change_type": "MODIFY", "old_path": "native/ios/Podfile.lock", "new_path": "native/ios/Podfile.lock", "diff": "@@ -868,7 +868,7 @@ PODS:\n- React-Core\n- RNKeychain (8.0.0):\n- React-Core\n- - RNReanimated (2.4.1):\n+ - RNReanimated (2.10.0):\n- DoubleConversion\n- FBLazyVector\n- FBReactNativeSpec\n@@ -876,7 +876,6 @@ PODS:\n- RCT-Folly\n- RCTRequired\n- RCTTypeSafety\n- - React\n- React-callinvoker\n- React-Core\n- React-Core/DevSupport\n@@ -1309,7 +1308,7 @@ SPEC CHECKSUMS:\nRNFS: 54da03c2b7d862c42ea3ca8c7f86f892760a535a\nRNGestureHandler: a479ebd5ed4221a810967000735517df0d2db211\nRNKeychain: 4f63aada75ebafd26f4bc2c670199461eab85d94\n- RNReanimated: e8afbe2a9e08e9e778ea72ddb1a8533445812621\n+ RNReanimated: f9055ab75a49358b30f99155637f95d77727e7dc\nRNScreens: 6e1ea5787989f92b0671049b808aef64fa1ef98c\nRNSVG: 302bfc9905bd8122f08966dc2ce2d07b7b52b9f8\nRNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[ios] Update `Podfile.lock` Summary: Corresponding changes to `Podfile.lock` after landing the reanimated bump: https://github.com/CommE2E/comm/commit/34eb8d4b830e9bd535f06bdc7f544bdafa5b6e15 Test Plan: NA, ran `yarn cleaninstall` on `master`. Reviewers: varun, marcin, tomek Reviewed By: varun Subscribers: tomek, abosh Differential Revision: https://phab.comm.dev/D5470
129,187
27.10.2022 10:08:49
14,400
4ab9b07c828f3a44d67ef72127aa3942b35e78c5
[keyserver] Allow for larger crash reports to be uploaded Summary: See details in "Attempt to submit crash report" section of [ENG-1821](https://linear.app/comm/issue/ENG-1821#comment-70811db9). Test Plan: Tested this live in production :) Reviewers: atul Subscribers: tomek, abosh
[ { "change_type": "MODIFY", "old_path": "keyserver/docker-compose.yml", "new_path": "keyserver/docker-compose.yml", "diff": "@@ -30,7 +30,7 @@ services:\nexpose:\n- \"3306\"\ncommand: >\n- --max-allowed-packet=64M\n+ --max-allowed-packet=256M\n--local-infile=0\n--sql-mode=STRICT_ALL_TABLES\n--innodb-buffer-pool-size=1600M\n" }, { "change_type": "MODIFY", "old_path": "keyserver/src/keyserver.js", "new_path": "keyserver/src/keyserver.js", "diff": "@@ -65,7 +65,7 @@ import {\n} else {\nconst server = express();\nexpressWs(server);\n- server.use(express.json({ limit: '50mb' }));\n+ server.use(express.json({ limit: '250mb' }));\nserver.use(cookieParser());\nconst setupAppRouter = router => {\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] Allow for larger crash reports to be uploaded Summary: See details in "Attempt to submit crash report" section of [ENG-1821](https://linear.app/comm/issue/ENG-1821#comment-70811db9). Test Plan: Tested this live in production :) Reviewers: atul Reviewed By: atul Subscribers: tomek, abosh Differential Revision: https://phab.comm.dev/D5493
129,184
27.10.2022 15:57:37
14,400
29284e1e5fa3e8c8cae73615468f3b605d55e726
[native] `codeVersion` -> 152
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -444,8 +444,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 151\n- versionName '1.0.151'\n+ versionCode 152\n+ versionName '1.0.152'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{151};\n+ const int codeVersion{152};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 151;\n+ CURRENT_PROJECT_VERSION = 152;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.151;\n+ MARKETING_VERSION = 1.0.152;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 151;\n+ CURRENT_PROJECT_VERSION = 152;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.151;\n+ MARKETING_VERSION = 1.0.152;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.151</string>\n+ <string>1.0.152</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>151</string>\n+ <string>152</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.151</string>\n+ <string>1.0.152</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>151</string>\n+ <string>152</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 152
129,182
30.10.2022 21:38:01
-3,600
ac8f8e05eee51d33e05773272918f7b6146234a5
[native] Generate device ID using Rust Summary: Generate unique device ID on native using rust's crates, as suggested in D4616. Test Plan: Run `cargo test` in native/native_rust_library Reviewers: tomek, varun, max, ashoat, marcin Subscribers: jon, ashoat, atul, abosh
[ { "change_type": "MODIFY", "old_path": "native/native_rust_library/Cargo.lock", "new_path": "native/native_rust_library/Cargo.lock", "diff": "# It is not intended for manual editing.\nversion = 3\n+[[package]]\n+name = \"aho-corasick\"\n+version = \"0.7.19\"\n+source = \"registry+https://github.com/rust-lang/crates.io-index\"\n+checksum = \"b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e\"\n+dependencies = [\n+ \"memchr\",\n+]\n+\n[[package]]\nname = \"anyhow\"\nversion = \"1.0.65\"\n@@ -651,6 +660,7 @@ dependencies = [\n\"opaque-ke\",\n\"prost\",\n\"rand\",\n+ \"regex\",\n\"sha2\",\n\"tokio\",\n\"tokio-stream\",\n@@ -899,6 +909,8 @@ version = \"1.6.0\"\nsource = \"registry+https://github.com/rust-lang/crates.io-index\"\nchecksum = \"4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b\"\ndependencies = [\n+ \"aho-corasick\",\n+ \"memchr\",\n\"regex-syntax\",\n]\n" }, { "change_type": "MODIFY", "old_path": "native/native_rust_library/Cargo.toml", "new_path": "native/native_rust_library/Cargo.toml", "diff": "@@ -20,6 +20,7 @@ argon2 = \"0.4\"\ndigest = \"0.9\"\ncurve25519-dalek = \"3.2\"\nsha2 = \"0.9\"\n+regex = \"1.6\"\n[build-dependencies]\ncxx-build = \"1.0\"\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/native_rust_library/src/crypto_tools.rs", "diff": "+use crate::ffi::DeviceType;\n+use rand::distributions::{Alphanumeric, DistString};\n+#[cfg(test)]\n+use regex::Regex;\n+\n+// DEVICE_ID_CHAR_LENGTH has to be kept in sync with deviceIDCharLength\n+// which is defined in web/utils/device-id.js\n+// and with DEVICE_CHAR_LENGTH\n+// defined in services/tunnelbroker/src/Constants.h\n+const DEVICE_ID_CHAR_LENGTH: usize = 64;\n+// DEVICE_ID_FORMAT_REGEX has to be kept in sync with deviceIDFormatRegex\n+// which is defined in web/utils/device-id.js\n+// and with DEVICEID_FORMAT_REGEX\n+// defined in services/tunnelbroker/src/Constants.h\n+#[cfg(test)]\n+const DEVICE_ID_FORMAT_REGEX: &str = \"^(ks|mobile|web):[a-zA-Z0-9]{64}$\";\n+\n+// generate_device_id has to be kept in sync with generateDeviceID\n+// which is defined in web/utils/device-id.js\n+pub fn generate_device_id(device_type: DeviceType) -> Result<String, String> {\n+ let prefix = match device_type {\n+ DeviceType::KEYSERVER => \"ks\",\n+ DeviceType::WEB => \"web\",\n+ DeviceType::MOBILE => \"mobile\",\n+ _ => {\n+ return Err(String::from(\"Incorrect device type provieded\"));\n+ }\n+ };\n+ let mut rng = rand::thread_rng();\n+ let suffix: String =\n+ Alphanumeric.sample_string(&mut rng, DEVICE_ID_CHAR_LENGTH);\n+\n+ Ok(format!(\"{}:{}\", &prefix, &suffix))\n+}\n+\n+#[cfg(test)]\n+mod tests {\n+ use super::*;\n+\n+ fn check_regex(s: &String) -> bool {\n+ Regex::new(&DEVICE_ID_FORMAT_REGEX).unwrap().is_match(&s)\n+ }\n+\n+ #[test]\n+ fn generate_device_id_ks() {\n+ for _x in 1..100 {\n+ let result = generate_device_id(DeviceType::KEYSERVER).unwrap();\n+ assert!(\n+ check_regex(&result),\n+ \"result: {} does not match regex {}\",\n+ &result,\n+ &DEVICE_ID_FORMAT_REGEX\n+ );\n+ }\n+ }\n+\n+ #[test]\n+ fn generate_device_id_web() {\n+ for _x in 1..100 {\n+ let result = generate_device_id(DeviceType::WEB).unwrap();\n+ assert!(\n+ check_regex(&result),\n+ \"result: {} does not match regex {}\",\n+ &result,\n+ &DEVICE_ID_FORMAT_REGEX\n+ );\n+ }\n+ }\n+\n+ #[test]\n+ fn generate_device_id_mobile() {\n+ for _x in 1..100 {\n+ let result = generate_device_id(DeviceType::MOBILE).unwrap();\n+ assert!(\n+ check_regex(&result),\n+ \"result: {} does not match regex {}\",\n+ &result,\n+ &DEVICE_ID_FORMAT_REGEX\n+ );\n+ }\n+ }\n+}\n" }, { "change_type": "MODIFY", "old_path": "native/native_rust_library/src/lib.rs", "new_path": "native/native_rust_library/src/lib.rs", "diff": "@@ -4,12 +4,14 @@ use tokio::runtime::{Builder, Runtime};\nuse tonic::{transport::Channel, Status};\nuse tracing::instrument;\n+mod crypto_tools;\nmod identity_client;\nmod opaque;\nmod identity {\ntonic::include_proto!(\"identity\");\n}\n+use crypto_tools::generate_device_id;\nuse identity::identity_service_client::IdentityServiceClient;\nuse identity_client::{\nget_user_id, login_user_pake, login_user_wallet, register_user,\n@@ -31,7 +33,15 @@ lazy_static! {\n#[cxx::bridge]\nmod ffi {\n+\n+ enum DeviceType {\n+ KEYSERVER,\n+ WEB,\n+ MOBILE,\n+ }\n+\nextern \"Rust\" {\n+ // Identity Service Client\ntype Client;\nfn initialize_client() -> Box<Client>;\nfn get_user_id_blocking(\n@@ -68,6 +78,8 @@ mod ffi {\nsiwe_signature: Vec<u8>,\nuser_public_key: String,\n) -> Result<String>;\n+ // Crypto Tools\n+ fn generate_device_id(device_type: DeviceType) -> Result<String>;\n}\n}\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Generate device ID using Rust Summary: Generate unique device ID on native using rust's crates, as suggested in D4616. Test Plan: Run `cargo test` in native/native_rust_library Reviewers: tomek, varun, max, ashoat, marcin Reviewed By: tomek, varun, ashoat, marcin Subscribers: jon, ashoat, atul, abosh Differential Revision: https://phab.comm.dev/D4754
129,206
25.10.2022 22:08:38
14,400
c23876e01ba4ee6ad4fed018d8be23d82b6d6766
added tests to check spoiler regex extracted values Summary: added a few tests to make sure the spoiler regex is actually extracting the correct spoiler text. Test Plan: tested manually by hand Reviewers: ginsu, atul, rohan Subscribers: ashoat, tomek, abosh
[ { "change_type": "MODIFY", "old_path": "lib/shared/markdown.test.js", "new_path": "lib/shared/markdown.test.js", "diff": "@@ -51,4 +51,34 @@ describe('spoilerRegex', () => {\nexpect('|| \\n\\\n||').not.toMatch(spoilerRegex);\n});\n+\n+ it(\"We expect to extract 'hello' from the following spoiler: ||hello||\", () => {\n+ const spoiler = '||hello||';\n+ const extracted = spoiler.match(spoilerRegex);\n+ expect(extracted ? extracted[0] : null).toMatch('hello');\n+ });\n+\n+ it(\"We expect to extract '||' from the following spoiler: ||||||\", () => {\n+ const spoiler = '||||||';\n+ const extracted = spoiler.match(spoilerRegex);\n+ expect(extracted ? extracted[0] : null).toMatch('||');\n+ });\n+\n+ it(\"We expect to extract ' ' from the following spoiler: || || ||\", () => {\n+ const spoiler = '|| || ||';\n+ const extracted = spoiler.match(spoilerRegex);\n+ expect(extracted ? extracted[0] : null).toMatch(' ');\n+ });\n+\n+ it(\"We expect to extract '||THISISASPOILER||' from the following spoiler: ||||THISISASPOILER||||\", () => {\n+ const spoiler = '||||THISISASPOILER||||';\n+ const extracted = spoiler.match(spoilerRegex);\n+ expect(extracted ? extracted[0] : null).toMatch('||THISISASPOILER||');\n+ });\n+\n+ it(\"We expect to extract '' from the following spoiler: || \\\\|\\\\| ||\", () => {\n+ const spoiler = '|| \\\\|\\\\| ||';\n+ const extracted = spoiler.match(spoilerRegex);\n+ expect(extracted ? extracted[0] : null).toMatch(' \\\\|\\\\| ');\n+ });\n});\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
added tests to check spoiler regex extracted values Summary: added a few tests to make sure the spoiler regex is actually extracting the correct spoiler text. Test Plan: tested manually by hand Reviewers: ginsu, atul, rohan Reviewed By: ginsu, rohan Subscribers: ashoat, tomek, abosh Differential Revision: https://phab.comm.dev/D5483
129,187
31.10.2022 12:33:20
14,400
764a3e16a557fca99b6dc0f9da65492fe99f66b8
[landing] Fix typo in investor data Test Plan: I haven't tested this Reviewers: ginsu Subscribers: tomek, atul, abosh
[ { "change_type": "MODIFY", "old_path": "landing/investor-data.js", "new_path": "landing/investor-data.js", "diff": "@@ -543,7 +543,7 @@ const investorsData: $ReadOnlyArray<Investors> = [\n{\nid: 'david_rodriguez',\nname: 'David Rodriguez',\n- description: 'Co-Founder and Managing Partner at Draft Venturest',\n+ description: 'Co-Founder and Managing Partner at Draft Ventures',\ninvolvement: 'Initially Invested in Dec 2021',\nimageURL: `${assetsCacheURLPrefix}/investors/david_rodriguez.jpeg`,\ntwitter: 'davidjrodriguez',\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[landing] Fix typo in investor data Test Plan: I haven't tested this Reviewers: ginsu Reviewed By: ginsu Subscribers: tomek, atul, abosh Differential Revision: https://phab.comm.dev/D5511
129,184
31.10.2022 16:20:38
14,400
5f0effca47439f508052c71241fa8cbe3132a6e2
[native] Introduce `StaffContext` Summary: Context: This diff is essentially copy/paste of `native/root-context.js` (which is why I made it a separate diff) Depends on D5498 Test Plan: NA Reviewers: marcin, tomek, varun, ashoat Subscribers: ashoat, abosh
[ { "change_type": "ADD", "old_path": null, "new_path": "native/staff/staff-context.js", "diff": "+// @flow\n+\n+import * as React from 'react';\n+\n+export type StaffContextType = {\n+ +staffUserHasBeenLoggedIn: boolean,\n+};\n+\n+const StaffContext: React.Context<StaffContextType> = React.createContext({\n+ staffUserHasBeenLoggedIn: false,\n+});\n+\n+export { StaffContext };\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Introduce `StaffContext` Summary: Context: https://linear.app/comm/issue/ENG-2134/have-a-flag-that-indicates-whether-the-build-is-a-staff-release This diff is essentially copy/paste of `native/root-context.js` (which is why I made it a separate diff) --- Depends on D5498 Test Plan: NA Reviewers: marcin, tomek, varun, ashoat Reviewed By: ashoat Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5499
129,189
31.10.2022 16:14:36
14,400
e4e42e88c56c876173fa611b3cae6602d83fc614
[keyserver] added siwe packages Test Plan: run keyserver, investigate licensing etc. Reviewers: ashoat, atul, varun Subscribers: abosh, tomek, ginsu, varun, atul, ashoat
[ { "change_type": "MODIFY", "old_path": "keyserver/package.json", "new_path": "keyserver/package.json", "diff": "\"common-tags\": \"^1.7.2\",\n\"cookie-parser\": \"^1.4.3\",\n\"dateformat\": \"^3.0.3\",\n+ \"ethers\": \"^5.7.2\",\n\"express\": \"^4.17.1\",\n\"express-ws\": \"^4.0.0\",\n\"firebase-admin\": \"^10.1.0\",\n\"replacestream\": \"^4.0.3\",\n\"rereadable-stream\": \"^1.4.5\",\n\"sharp\": \"^0.30.5\",\n+ \"siwe\": \"^1.1.6\",\n\"sql-template-strings\": \"^2.2.2\",\n\"stream-combiner\": \"^0.2.2\",\n\"tcomb\": \"^3.2.29\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "dependencies:\n\"@ethersproject/logger\" \"^5.7.0\"\n+\"@ethersproject/networks@5.7.1\":\n+ version \"5.7.1\"\n+ resolved \"https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6\"\n+ integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==\n+ dependencies:\n+ \"@ethersproject/logger\" \"^5.7.0\"\n+\n\"@ethersproject/pbkdf2@5.7.0\", \"@ethersproject/pbkdf2@^5.7.0\":\nversion \"5.7.0\"\nresolved \"https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.7.0.tgz#d2267d0a1f6e123f3771007338c47cccd83d3102\"\nbech32 \"1.1.4\"\nws \"7.4.6\"\n+\"@ethersproject/providers@5.7.2\":\n+ version \"5.7.2\"\n+ resolved \"https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb\"\n+ integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==\n+ dependencies:\n+ \"@ethersproject/abstract-provider\" \"^5.7.0\"\n+ \"@ethersproject/abstract-signer\" \"^5.7.0\"\n+ \"@ethersproject/address\" \"^5.7.0\"\n+ \"@ethersproject/base64\" \"^5.7.0\"\n+ \"@ethersproject/basex\" \"^5.7.0\"\n+ \"@ethersproject/bignumber\" \"^5.7.0\"\n+ \"@ethersproject/bytes\" \"^5.7.0\"\n+ \"@ethersproject/constants\" \"^5.7.0\"\n+ \"@ethersproject/hash\" \"^5.7.0\"\n+ \"@ethersproject/logger\" \"^5.7.0\"\n+ \"@ethersproject/networks\" \"^5.7.0\"\n+ \"@ethersproject/properties\" \"^5.7.0\"\n+ \"@ethersproject/random\" \"^5.7.0\"\n+ \"@ethersproject/rlp\" \"^5.7.0\"\n+ \"@ethersproject/sha2\" \"^5.7.0\"\n+ \"@ethersproject/strings\" \"^5.7.0\"\n+ \"@ethersproject/transactions\" \"^5.7.0\"\n+ \"@ethersproject/web\" \"^5.7.0\"\n+ bech32 \"1.1.4\"\n+ ws \"7.4.6\"\n+\n\"@ethersproject/random@5.7.0\", \"@ethersproject/random@^5.7.0\":\nversion \"5.7.0\"\nresolved \"https://registry.yarnpkg.com/@ethersproject/random/-/random-5.7.0.tgz#af19dcbc2484aae078bb03656ec05df66253280c\"\n\"@ethersproject/properties\" \"^5.7.0\"\n\"@ethersproject/strings\" \"^5.7.0\"\n+\"@ethersproject/web@5.7.1\":\n+ version \"5.7.1\"\n+ resolved \"https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae\"\n+ integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==\n+ dependencies:\n+ \"@ethersproject/base64\" \"^5.7.0\"\n+ \"@ethersproject/bytes\" \"^5.7.0\"\n+ \"@ethersproject/logger\" \"^5.7.0\"\n+ \"@ethersproject/properties\" \"^5.7.0\"\n+ \"@ethersproject/strings\" \"^5.7.0\"\n+\n\"@ethersproject/wordlists@5.7.0\", \"@ethersproject/wordlists@^5.7.0\":\nversion \"5.7.0\"\nresolved \"https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.7.0.tgz#8fb2c07185d68c3e09eb3bfd6e779ba2774627f5\"\n@@ -8820,6 +8864,42 @@ ethers@^5.7.0:\n\"@ethersproject/web\" \"5.7.0\"\n\"@ethersproject/wordlists\" \"5.7.0\"\n+ethers@^5.7.2:\n+ version \"5.7.2\"\n+ resolved \"https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e\"\n+ integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==\n+ dependencies:\n+ \"@ethersproject/abi\" \"5.7.0\"\n+ \"@ethersproject/abstract-provider\" \"5.7.0\"\n+ \"@ethersproject/abstract-signer\" \"5.7.0\"\n+ \"@ethersproject/address\" \"5.7.0\"\n+ \"@ethersproject/base64\" \"5.7.0\"\n+ \"@ethersproject/basex\" \"5.7.0\"\n+ \"@ethersproject/bignumber\" \"5.7.0\"\n+ \"@ethersproject/bytes\" \"5.7.0\"\n+ \"@ethersproject/constants\" \"5.7.0\"\n+ \"@ethersproject/contracts\" \"5.7.0\"\n+ \"@ethersproject/hash\" \"5.7.0\"\n+ \"@ethersproject/hdnode\" \"5.7.0\"\n+ \"@ethersproject/json-wallets\" \"5.7.0\"\n+ \"@ethersproject/keccak256\" \"5.7.0\"\n+ \"@ethersproject/logger\" \"5.7.0\"\n+ \"@ethersproject/networks\" \"5.7.1\"\n+ \"@ethersproject/pbkdf2\" \"5.7.0\"\n+ \"@ethersproject/properties\" \"5.7.0\"\n+ \"@ethersproject/providers\" \"5.7.2\"\n+ \"@ethersproject/random\" \"5.7.0\"\n+ \"@ethersproject/rlp\" \"5.7.0\"\n+ \"@ethersproject/sha2\" \"5.7.0\"\n+ \"@ethersproject/signing-key\" \"5.7.0\"\n+ \"@ethersproject/solidity\" \"5.7.0\"\n+ \"@ethersproject/strings\" \"5.7.0\"\n+ \"@ethersproject/transactions\" \"5.7.0\"\n+ \"@ethersproject/units\" \"5.7.0\"\n+ \"@ethersproject/wallet\" \"5.7.0\"\n+ \"@ethersproject/web\" \"5.7.1\"\n+ \"@ethersproject/wordlists\" \"5.7.0\"\n+\nethjs-util@0.1.6, ethjs-util@^0.1.3:\nversion \"0.1.6\"\nresolved \"https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[keyserver] added siwe packages Test Plan: run keyserver, investigate licensing etc. Reviewers: ashoat, atul, varun Reviewed By: ashoat Subscribers: abosh, tomek, ginsu, varun, atul, ashoat Differential Revision: https://phab.comm.dev/D5512
129,206
01.11.2022 14:17:04
14,400
fc0d37a56c5b721fe2d872fe2ae1dd4ec62d4093
added no-var rule to root level eslint Summary: added no-var rule to root level eslint Test Plan: Went to a few files before committing eslint change, and I was able to see that var cannot be used. Reviewers: atul, rohan, ginsu Subscribers: ashoat, tomek, abosh
[ { "change_type": "MODIFY", "old_path": ".eslintrc.json", "new_path": ".eslintrc.json", "diff": "\"no-unused-vars\": [\"error\", { \"ignoreRestSiblings\": true }],\n\"react/prop-types\": [\"error\", { \"skipUndeclared\": true }],\n\"no-shadow\": 1,\n+ \"no-var\": \"error\",\n\"import/order\": [\n\"warn\",\n{\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
added no-var rule to root level eslint Summary: added no-var rule to root level eslint Test Plan: Went to a few files before committing eslint change, and I was able to see that var cannot be used. Reviewers: atul, rohan, ginsu Reviewed By: atul, rohan, ginsu Subscribers: ashoat, tomek, abosh Differential Revision: https://phab.comm.dev/D5516
129,187
07.11.2022 09:48:42
18,000
565ebe619583ac03be37e252efe51c5d12ebc949
[native] Update to Summary: This resolves Android CI issue](https://linear.app/comm/issue/ENG-2181/android-ci-issue). More context [here](https://github.com/facebook/react-native/issues/35210). Test Plan: Confirm Android builds are fixed Reviewers: tomek, bartek, atul Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/ios/Podfile.lock", "new_path": "native/ios/Podfile.lock", "diff": "@@ -386,14 +386,14 @@ PODS:\n- EXSplashScreen (0.13.5):\n- ExpoModulesCore\n- React-Core\n- - FBLazyVector (0.66.4)\n- - FBReactNativeSpec (0.66.4):\n+ - FBLazyVector (0.66.5)\n+ - FBReactNativeSpec (0.66.5):\n- RCT-Folly (= 2021.06.28.00-v2)\n- - RCTRequired (= 0.66.4)\n- - RCTTypeSafety (= 0.66.4)\n- - React-Core (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - ReactCommon/turbomodule/core (= 0.66.4)\n+ - RCTRequired (= 0.66.5)\n+ - RCTTypeSafety (= 0.66.5)\n+ - React-Core (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - ReactCommon/turbomodule/core (= 0.66.5)\n- Flipper (0.99.0):\n- Flipper-Folly (~> 2.6)\n- Flipper-RSocket (~> 1.4)\n@@ -540,203 +540,203 @@ PODS:\n- fmt (~> 6.2.1)\n- glog\n- libevent\n- - RCTRequired (0.66.4)\n- - RCTTypeSafety (0.66.4):\n- - FBLazyVector (= 0.66.4)\n+ - RCTRequired (0.66.5)\n+ - RCTTypeSafety (0.66.5):\n+ - FBLazyVector (= 0.66.5)\n- RCT-Folly (= 2021.06.28.00-v2)\n- - RCTRequired (= 0.66.4)\n- - React-Core (= 0.66.4)\n- - React (0.66.4):\n- - React-Core (= 0.66.4)\n- - React-Core/DevSupport (= 0.66.4)\n- - React-Core/RCTWebSocket (= 0.66.4)\n- - React-RCTActionSheet (= 0.66.4)\n- - React-RCTAnimation (= 0.66.4)\n- - React-RCTBlob (= 0.66.4)\n- - React-RCTImage (= 0.66.4)\n- - React-RCTLinking (= 0.66.4)\n- - React-RCTNetwork (= 0.66.4)\n- - React-RCTSettings (= 0.66.4)\n- - React-RCTText (= 0.66.4)\n- - React-RCTVibration (= 0.66.4)\n- - React-callinvoker (0.66.4)\n- - React-Core (0.66.4):\n+ - RCTRequired (= 0.66.5)\n+ - React-Core (= 0.66.5)\n+ - React (0.66.5):\n+ - React-Core (= 0.66.5)\n+ - React-Core/DevSupport (= 0.66.5)\n+ - React-Core/RCTWebSocket (= 0.66.5)\n+ - React-RCTActionSheet (= 0.66.5)\n+ - React-RCTAnimation (= 0.66.5)\n+ - React-RCTBlob (= 0.66.5)\n+ - React-RCTImage (= 0.66.5)\n+ - React-RCTLinking (= 0.66.5)\n+ - React-RCTNetwork (= 0.66.5)\n+ - React-RCTSettings (= 0.66.5)\n+ - React-RCTText (= 0.66.5)\n+ - React-RCTVibration (= 0.66.5)\n+ - React-callinvoker (0.66.5)\n+ - React-Core (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- - React-Core/Default (= 0.66.4)\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-Core/Default (= 0.66.5)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/CoreModulesHeaders (0.66.4):\n+ - React-Core/CoreModulesHeaders (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- React-Core/Default\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/Default (0.66.4):\n+ - React-Core/Default (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/DevSupport (0.66.4):\n+ - React-Core/DevSupport (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- - React-Core/Default (= 0.66.4)\n- - React-Core/RCTWebSocket (= 0.66.4)\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-jsinspector (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-Core/Default (= 0.66.5)\n+ - React-Core/RCTWebSocket (= 0.66.5)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-jsinspector (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/RCTActionSheetHeaders (0.66.4):\n+ - React-Core/RCTActionSheetHeaders (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- React-Core/Default\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/RCTAnimationHeaders (0.66.4):\n+ - React-Core/RCTAnimationHeaders (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- React-Core/Default\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/RCTBlobHeaders (0.66.4):\n+ - React-Core/RCTBlobHeaders (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- React-Core/Default\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/RCTImageHeaders (0.66.4):\n+ - React-Core/RCTImageHeaders (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- React-Core/Default\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/RCTLinkingHeaders (0.66.4):\n+ - React-Core/RCTLinkingHeaders (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- React-Core/Default\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/RCTNetworkHeaders (0.66.4):\n+ - React-Core/RCTNetworkHeaders (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- React-Core/Default\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/RCTSettingsHeaders (0.66.4):\n+ - React-Core/RCTSettingsHeaders (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- React-Core/Default\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/RCTTextHeaders (0.66.4):\n+ - React-Core/RCTTextHeaders (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- React-Core/Default\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/RCTVibrationHeaders (0.66.4):\n+ - React-Core/RCTVibrationHeaders (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- React-Core/Default\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-Core/RCTWebSocket (0.66.4):\n+ - React-Core/RCTWebSocket (0.66.5):\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- - React-Core/Default (= 0.66.4)\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-Core/Default (= 0.66.5)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- Yoga\n- - React-CoreModules (0.66.4):\n- - FBReactNativeSpec (= 0.66.4)\n+ - React-CoreModules (0.66.5):\n+ - FBReactNativeSpec (= 0.66.5)\n- RCT-Folly (= 2021.06.28.00-v2)\n- - RCTTypeSafety (= 0.66.4)\n- - React-Core/CoreModulesHeaders (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-RCTImage (= 0.66.4)\n- - ReactCommon/turbomodule/core (= 0.66.4)\n- - React-cxxreact (0.66.4):\n+ - RCTTypeSafety (= 0.66.5)\n+ - React-Core/CoreModulesHeaders (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-RCTImage (= 0.66.5)\n+ - ReactCommon/turbomodule/core (= 0.66.5)\n+ - React-cxxreact (0.66.5):\n- boost (= 1.76.0)\n- DoubleConversion\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- - React-callinvoker (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsinspector (= 0.66.4)\n- - React-logger (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n- - React-runtimeexecutor (= 0.66.4)\n- - React-hermes (0.66.4):\n+ - React-callinvoker (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsinspector (= 0.66.5)\n+ - React-logger (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n+ - React-runtimeexecutor (= 0.66.5)\n+ - React-hermes (0.66.5):\n- DoubleConversion\n- glog\n- hermes-engine\n- RCT-Folly (= 2021.06.28.00-v2)\n- RCT-Folly/Futures (= 2021.06.28.00-v2)\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-jsiexecutor (= 0.66.4)\n- - React-jsinspector (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n- - React-jsi (0.66.4):\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-jsiexecutor (= 0.66.5)\n+ - React-jsinspector (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n+ - React-jsi (0.66.5):\n- boost (= 1.76.0)\n- DoubleConversion\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- - React-jsi/Default (= 0.66.4)\n- - React-jsi/Default (0.66.4):\n+ - React-jsi/Default (= 0.66.5)\n+ - React-jsi/Default (0.66.5):\n- boost (= 1.76.0)\n- DoubleConversion\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- - React-jsiexecutor (0.66.4):\n+ - React-jsiexecutor (0.66.5):\n- DoubleConversion\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n- - React-jsinspector (0.66.4)\n- - React-logger (0.66.4):\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n+ - React-jsinspector (0.66.5)\n+ - React-logger (0.66.5):\n- glog\n- react-native-background-upload (6.5.1):\n- React\n@@ -774,71 +774,71 @@ PODS:\n- SPTPersistentCache (~> 1.1.0)\n- react-native-webview (11.23.0):\n- React-Core\n- - React-perflogger (0.66.4)\n- - React-RCTActionSheet (0.66.4):\n- - React-Core/RCTActionSheetHeaders (= 0.66.4)\n- - React-RCTAnimation (0.66.4):\n- - FBReactNativeSpec (= 0.66.4)\n+ - React-perflogger (0.66.5)\n+ - React-RCTActionSheet (0.66.5):\n+ - React-Core/RCTActionSheetHeaders (= 0.66.5)\n+ - React-RCTAnimation (0.66.5):\n+ - FBReactNativeSpec (= 0.66.5)\n- RCT-Folly (= 2021.06.28.00-v2)\n- - RCTTypeSafety (= 0.66.4)\n- - React-Core/RCTAnimationHeaders (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - ReactCommon/turbomodule/core (= 0.66.4)\n- - React-RCTBlob (0.66.4):\n- - FBReactNativeSpec (= 0.66.4)\n+ - RCTTypeSafety (= 0.66.5)\n+ - React-Core/RCTAnimationHeaders (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - ReactCommon/turbomodule/core (= 0.66.5)\n+ - React-RCTBlob (0.66.5):\n+ - FBReactNativeSpec (= 0.66.5)\n- RCT-Folly (= 2021.06.28.00-v2)\n- - React-Core/RCTBlobHeaders (= 0.66.4)\n- - React-Core/RCTWebSocket (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-RCTNetwork (= 0.66.4)\n- - ReactCommon/turbomodule/core (= 0.66.4)\n- - React-RCTImage (0.66.4):\n- - FBReactNativeSpec (= 0.66.4)\n+ - React-Core/RCTBlobHeaders (= 0.66.5)\n+ - React-Core/RCTWebSocket (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-RCTNetwork (= 0.66.5)\n+ - ReactCommon/turbomodule/core (= 0.66.5)\n+ - React-RCTImage (0.66.5):\n+ - FBReactNativeSpec (= 0.66.5)\n- RCT-Folly (= 2021.06.28.00-v2)\n- - RCTTypeSafety (= 0.66.4)\n- - React-Core/RCTImageHeaders (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-RCTNetwork (= 0.66.4)\n- - ReactCommon/turbomodule/core (= 0.66.4)\n- - React-RCTLinking (0.66.4):\n- - FBReactNativeSpec (= 0.66.4)\n- - React-Core/RCTLinkingHeaders (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - ReactCommon/turbomodule/core (= 0.66.4)\n- - React-RCTNetwork (0.66.4):\n- - FBReactNativeSpec (= 0.66.4)\n+ - RCTTypeSafety (= 0.66.5)\n+ - React-Core/RCTImageHeaders (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-RCTNetwork (= 0.66.5)\n+ - ReactCommon/turbomodule/core (= 0.66.5)\n+ - React-RCTLinking (0.66.5):\n+ - FBReactNativeSpec (= 0.66.5)\n+ - React-Core/RCTLinkingHeaders (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - ReactCommon/turbomodule/core (= 0.66.5)\n+ - React-RCTNetwork (0.66.5):\n+ - FBReactNativeSpec (= 0.66.5)\n- RCT-Folly (= 2021.06.28.00-v2)\n- - RCTTypeSafety (= 0.66.4)\n- - React-Core/RCTNetworkHeaders (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - ReactCommon/turbomodule/core (= 0.66.4)\n- - React-RCTSettings (0.66.4):\n- - FBReactNativeSpec (= 0.66.4)\n+ - RCTTypeSafety (= 0.66.5)\n+ - React-Core/RCTNetworkHeaders (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - ReactCommon/turbomodule/core (= 0.66.5)\n+ - React-RCTSettings (0.66.5):\n+ - FBReactNativeSpec (= 0.66.5)\n- RCT-Folly (= 2021.06.28.00-v2)\n- - RCTTypeSafety (= 0.66.4)\n- - React-Core/RCTSettingsHeaders (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - ReactCommon/turbomodule/core (= 0.66.4)\n- - React-RCTText (0.66.4):\n- - React-Core/RCTTextHeaders (= 0.66.4)\n- - React-RCTVibration (0.66.4):\n- - FBReactNativeSpec (= 0.66.4)\n+ - RCTTypeSafety (= 0.66.5)\n+ - React-Core/RCTSettingsHeaders (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - ReactCommon/turbomodule/core (= 0.66.5)\n+ - React-RCTText (0.66.5):\n+ - React-Core/RCTTextHeaders (= 0.66.5)\n+ - React-RCTVibration (0.66.5):\n+ - FBReactNativeSpec (= 0.66.5)\n- RCT-Folly (= 2021.06.28.00-v2)\n- - React-Core/RCTVibrationHeaders (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - ReactCommon/turbomodule/core (= 0.66.4)\n- - React-runtimeexecutor (0.66.4):\n- - React-jsi (= 0.66.4)\n- - ReactCommon/turbomodule/core (0.66.4):\n+ - React-Core/RCTVibrationHeaders (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - ReactCommon/turbomodule/core (= 0.66.5)\n+ - React-runtimeexecutor (0.66.5):\n+ - React-jsi (= 0.66.5)\n+ - ReactCommon/turbomodule/core (0.66.5):\n- DoubleConversion\n- glog\n- RCT-Folly (= 2021.06.28.00-v2)\n- - React-callinvoker (= 0.66.4)\n- - React-Core (= 0.66.4)\n- - React-cxxreact (= 0.66.4)\n- - React-jsi (= 0.66.4)\n- - React-logger (= 0.66.4)\n- - React-perflogger (= 0.66.4)\n+ - React-callinvoker (= 0.66.5)\n+ - React-Core (= 0.66.5)\n+ - React-cxxreact (= 0.66.5)\n+ - React-jsi (= 0.66.5)\n+ - React-logger (= 0.66.5)\n+ - React-perflogger (= 0.66.5)\n- ReactNativeART (1.2.0):\n- React\n- ReactNativeDarkMode (0.2.0-rc.1):\n@@ -1234,8 +1234,8 @@ SPEC CHECKSUMS:\nExpoModulesCore: c9438f6add0fb7b04b7c64eb97a833d2752a7834\nEXSecureStore: 919bf7c28472862020d2cd7b59b69aae160b5d40\nEXSplashScreen: 57f329dbf25c5c12800feed79068a056453dc772\n- FBLazyVector: e5569e42a1c79ca00521846c223173a57aca1fe1\n- FBReactNativeSpec: fe08c1cd7e2e205718d77ad14b34957cce949b58\n+ FBLazyVector: a926a9aaa3596b181972abf0f47eff3dee796222\n+ FBReactNativeSpec: f1141d5407f4a27c397bca5db03cc03919357b0d\nFlipper: 30e8eeeed6abdc98edaf32af0cda2f198be4b733\nFlipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c\nFlipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41\n@@ -1259,18 +1259,18 @@ SPEC CHECKSUMS:\nOpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b\n\"Protobuf-C++\": 8833c36ca1a3b6422e75ec27534d63a6a762c843\nRCT-Folly: 632694a4b94fb0f2cb090921861846beec77d8b8\n- RCTRequired: 4bf86c70714490bca4bf2696148638284622644b\n- RCTTypeSafety: c475a7059eb77935fa53d2c17db299893f057d5d\n- React: f64af14e3f2c50f6f2c91a5fd250e4ff1b3c3459\n- React-callinvoker: b74e4ae80287780dcdf0cab262bcb581eeef56e7\n- React-Core: 3eb7432bad96ff1d25aebc1defbae013fee2fd0e\n- React-CoreModules: ad9e1fd5650e16666c57a08328df86fd7e480cb9\n- React-cxxreact: 02633ff398cf7e91a2c1e12590d323c4a4b8668a\n- React-hermes: 7b4c6617b4d4c880d0f44e629651810bf3417440\n- React-jsi: 805c41a927d6499fb811772acb971467d9204633\n- React-jsiexecutor: 94ce921e1d8ce7023366873ec371f3441383b396\n- React-jsinspector: d0374f7509d407d2264168b6d0fad0b54e300b85\n- React-logger: 933f80c97c633ee8965d609876848148e3fef438\n+ RCTRequired: 405e24508a0feed1771d48caebb85c581db53122\n+ RCTTypeSafety: 0654998ea6afd3dccecbf6bb379d7c10d1361a72\n+ React: cce3ac45191e66a78c79234582cbfe322e4dfd00\n+ React-callinvoker: 613b19264ce63cab0a2bbb6546caa24f2ad0a679\n+ React-Core: fe529d7c1d74b3eb9505fdfc2f4b10f2f2984a85\n+ React-CoreModules: 71f5d032922a043ab6f9023acda41371a774bf5c\n+ React-cxxreact: 808c0d39b270860af712848082009d623180999c\n+ React-hermes: 6d7dfec2394c40780f5db123acf7a4ae2cc01895\n+ React-jsi: 01b246df3667ad921a33adeb0ce199772afe9e2b\n+ React-jsiexecutor: 50a73168582868421112609d2fb155e607e34ec8\n+ React-jsinspector: 953260b8580780a6e81f2a6d319a8d42fd5028d8\n+ React-logger: fa4ff1e9c7e115648f7c5dafb7c20822ab4f7a7e\nreact-native-background-upload: c62f25610ffd49b1781fbdf1135b3b17f2f914b9\nreact-native-camera: b5c8c7a71feecfdd5b39f0dbbf6b64b957ed55f2\nreact-native-ffmpeg: f9a60452aaa5d478aac205b248224994f3bde416\n@@ -1283,18 +1283,18 @@ SPEC CHECKSUMS:\nreact-native-safe-area-context: b6e0e284002381d2ff29fa4fff42b4d8282e3c94\nreact-native-video: 0bb76b6d6b77da3009611586c7dbf817b947f30e\nreact-native-webview: e771bc375f789ebfa02a26939a57dbc6fa897336\n- React-perflogger: 93075d8931c32cd1fce8a98c15d2d5ccc4d891bd\n- React-RCTActionSheet: 7d3041e6761b4f3044a37079ddcb156575fb6d89\n- React-RCTAnimation: 743e88b55ac62511ae5c2e22803d4f503f2a3a13\n- React-RCTBlob: bee3a2f98fa7fc25c957c8643494244f74bea0a0\n- React-RCTImage: 19fc9e29b06cc38611c553494f8d3040bf78c24e\n- React-RCTLinking: dc799503979c8c711126d66328e7ce8f25c2848f\n- React-RCTNetwork: 417e4e34cf3c19eaa5fd4e9eb20180d662a799ce\n- React-RCTSettings: 4df89417265af26501a7e0e9192a34d3d9848dff\n- React-RCTText: f8a21c3499ab322326290fa9b701ae29aa093aa5\n- React-RCTVibration: e3ffca672dd3772536cb844274094b0e2c31b187\n- React-runtimeexecutor: dec32ee6f2e2a26e13e58152271535fadff5455a\n- ReactCommon: 57b69f6383eafcbd7da625bfa6003810332313c4\n+ React-perflogger: 169fb34f60c5fd793b370002ee9c916eba9bc4ae\n+ React-RCTActionSheet: 2355539e02ad5cd4b1328682ab046487e1e1e920\n+ React-RCTAnimation: 150644a38c24d80f1f761859c10c727412303f57\n+ React-RCTBlob: 66042a0ab4206f112ed453130f2cb8802dd7cd82\n+ React-RCTImage: 3b954d8398ec4bed26cec10e10d311cb3533818b\n+ React-RCTLinking: 331d9b8a0702c751c7843ddc65b64297c264adc2\n+ React-RCTNetwork: 96e10dad824ce112087445199ea734b79791ad14\n+ React-RCTSettings: 41feb3f5fb3319846ad0ba9e8d339e54b5774b67\n+ React-RCTText: 254741e11c41516759e93ab0b8c38b90f8998f61\n+ React-RCTVibration: 96dbefca7504f3e52ff47cd0ad0826d20e3a789f\n+ React-runtimeexecutor: 09041c28ce04143a113eac2d357a6b06bd64b607\n+ ReactCommon: 8a7a138ae43c04bb8dd760935589f326ca810484\nReactNativeART: 78edc68dd4a1e675338cd0cd113319cf3a65f2ab\nReactNativeDarkMode: 88317ff05ba95fd063dd347ad32f8c4cefd3166c\nReactNativeKeyboardInput: 266ba27a2e9921f5bdc0b4cc30289b2a2f46b157\n@@ -1316,7 +1316,7 @@ SPEC CHECKSUMS:\nSDWebImageWebPCoder: d0dac55073088d24b2ac1b191a71a8f8d0adac21\nSPTPersistentCache: df36ea46762d7cf026502bbb86a8b79d0080dff4\nSQLCipher-Amalgamation: cbd36045fe7b458b8a442958a01aefdbc44c20f8\n- Yoga: e7dc4e71caba6472ff48ad7d234389b91dadc280\n+ Yoga: b316a990bb6d115afa1b436b5626ac7c61717d17\nYogaKit: f782866e155069a2cca2517aafea43200b01fd5a\nPODFILE CHECKSUM: 4941a5495075fdda98e5a2f416bf6315c8111946\n" }, { "change_type": "MODIFY", "old_path": "native/package.json", "new_path": "native/package.json", "diff": "\"md5\": \"^2.2.1\",\n\"olm\": \"git+https://gitlab.matrix.org/matrix-org/olm.git#v3.2.4\",\n\"react\": \"17.0.2\",\n- \"react-native\": \"0.66.4\",\n+ \"react-native\": \"0.66.5\",\n\"react-native-background-upload\": \"^6.5.1\",\n\"react-native-camera\": \"^3.31.0\",\n\"react-native-dark-mode\": \"^0.2.0-rc.1\",\n" }, { "change_type": "MODIFY", "old_path": "yarn.lock", "new_path": "yarn.lock", "diff": "@@ -16516,10 +16516,10 @@ react-native-webview@^11.23.0:\nescape-string-regexp \"2.0.0\"\ninvariant \"2.2.4\"\n-react-native@0.66.4:\n- version \"0.66.4\"\n- resolved \"https://registry.yarnpkg.com/react-native/-/react-native-0.66.4.tgz#bf89a5fb18bd23046d889fb4de4ea2822a4d7805\"\n- integrity sha512-9vx5dlSfQlKbbDtr8+xMon6qsmSu7jvjdXWZpEKh3XVKpUidbbODv7048gwVKX8YAel1egeR7hN8vzSeI6ssTw==\n+react-native@0.66.5:\n+ version \"0.66.5\"\n+ resolved \"https://registry.yarnpkg.com/react-native/-/react-native-0.66.5.tgz#9056a2f7ad04d5e75b3a00dab847b3366d69f26a\"\n+ integrity sha512-dC5xmE1anT+m8eGU0N/gv2XUWZygii6TTqbwZPsN+uMhVvjxt4FsTqpZOFFvA5sxLPR/NDEz8uybTvItNBMClw==\ndependencies:\n\"@jest/create-cache-key-function\" \"^27.0.1\"\n\"@react-native-community/cli\" \"^6.0.0\"\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Update to react-native@0.66.5 Summary: This resolves [ENG-2181: Android CI issue](https://linear.app/comm/issue/ENG-2181/android-ci-issue). More context [here](https://github.com/facebook/react-native/issues/35210). Test Plan: Confirm Android builds are fixed Reviewers: tomek, bartek, atul Reviewed By: tomek, atul Subscribers: abosh Differential Revision: https://phab.comm.dev/D5542
129,187
04.11.2022 13:18:50
14,400
7a442aeae8b8321b16fb5ce226195567b30e2cc3
[native] Update libdef for React Nav 6 Summary: See D5537 and [ENG-2175](https://linear.app/comm/issue/ENG-2175/add-and-update-react-navigation-libdef-for-react-navigationdrawer) for context. Will describe changes and where they came from inline. Depends on D5537 Test Plan: Flow Reviewers: atul, inka, tomek Subscribers: abosh
[ { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v6.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/bottom-tabs_v6.x.x.js", "diff": "@@ -742,7 +742,7 @@ declare module '@react-navigation/bottom-tabs' {\ndeclare export type DrawerRouterOptions = {|\n...TabRouterOptions,\n- +openByDefault?: boolean,\n+ +defaultStatus?: 'open' | 'closed',\n|};\n/**\n@@ -1971,29 +1971,46 @@ declare module '@react-navigation/bottom-tabs' {\n*/\ndeclare export type DrawerOptions = $Partial<{|\n- title: string,\n- drawerLabel:\n+ +title: string,\n+ +lazy: boolean,\n+ +drawerLabel:\n| string\n| ({| +color: string, +focused: boolean |}) => React$Node,\n- drawerIcon: ({|\n+ +drawerIcon: ({|\n+color: string,\n+size: number,\n+focused: boolean,\n|}) => React$Node,\n- gestureEnabled: boolean,\n- swipeEnabled: boolean,\n- unmountOnBlur: boolean,\n+ +drawerActiveTintColor: string,\n+ +drawerActiveBackgroundColor: string,\n+ +drawerInactiveTintColor: string,\n+ +drawerInactiveBackgroundColor: string,\n+ +drawerItemStyle: ViewStyleProp,\n+ +drawerLabelStyle: TextStyleProp,\n+ +drawerContentContainerStyle: ViewStyleProp,\n+ +drawerContentStyle: ViewStyleProp,\n+ +drawerStyle: ViewStyleProp,\n+ +drawerPosition: 'left' | 'right',\n+ +drawerType: 'front' | 'back' | 'slide' | 'permanent',\n+ +drawerHideStatusBarOnOpen: boolean,\n+ +drawerStatusBarAnimation: 'slide' | 'none' | 'fade',\n+ +overlayColor: string,\n+ +sceneContainerStyle: ViewStyleProp,\n+ +gestureHandlerProps: PanGestureHandlerProps,\n+ +swipeEnabled: boolean,\n+ +swipeEdgeWidth: number,\n+ +swipeMinDistance: number,\n+ +keyboardDismissMode: 'on-drag' | 'none',\n+ +unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n* Drawer navigation prop\n*/\n- declare export type DrawerNavigationEventMap = {|\n- ...EventMapCore<DrawerNavigationState>,\n- +drawerOpen: {| +data: void, +canPreventDefault: false |},\n- +drawerClose: {| +data: void, +canPreventDefault: false |},\n- |};\n+ declare export type DrawerNavigationEventMap =\n+ EventMapCore<DrawerNavigationState>;\ndeclare type DrawerExtraNavigationHelpers<\nParamList: ParamListBase = ParamListBase,\n@@ -2042,49 +2059,16 @@ declare module '@react-navigation/bottom-tabs' {\nDrawerOptions,\n>;\n- declare export type DrawerItemListBaseOptions = $Partial<{|\n- +activeTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveTintColor: string,\n- +inactiveBackgroundColor: string,\n- +itemStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- |}>;\n-\n- declare export type DrawerContentOptions = $Partial<{|\n- ...DrawerItemListBaseOptions,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type DrawerNavigationBuilderResult = {|\n+state: DrawerNavigationState,\n+navigation: DrawerNavigationHelpers<>,\n+descriptors: {| +[key: string]: DrawerDescriptor |},\n|};\n- declare export type DrawerContentProps = {|\n- ...DrawerContentOptions,\n- ...DrawerNavigationBuilderResult,\n- +progress: any, // Reanimated.Node<number>\n- |};\n-\ndeclare export type DrawerNavigationConfig = {|\n- +drawerPosition?: 'left' | 'right',\n- +drawerType?: 'front' | 'back' | 'slide' | 'permanent',\n- +edgeWidth?: number,\n- +hideStatusBar?: boolean,\n- +keyboardDismissMode?: 'on-drag' | 'none',\n- +minSwipeDistance?: number,\n- +overlayColor?: string,\n- +statusBarAnimation?: 'slide' | 'none' | 'fade',\n- +gestureHandlerProps?: PanGestureHandlerProps,\n- +lazy?: boolean,\n- +drawerContent?: DrawerContentProps => React$Node,\n- +drawerContentOptions?: DrawerContentOptions,\n- +sceneContainerStyle?: ViewStyleProp,\n- +drawerStyle?: ViewStyleProp,\n+ +drawerContent?: DrawerNavigationBuilderResult => React$Node,\n+detachInactiveScreens?: boolean,\n+ +useLegacyImplementation?: boolean,\n|};\ndeclare export type ExtraDrawerNavigatorProps = {|\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/devtools_v6.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/devtools_v6.x.x.js", "diff": "@@ -742,7 +742,7 @@ declare module '@react-navigation/devtools' {\ndeclare export type DrawerRouterOptions = {|\n...TabRouterOptions,\n- +openByDefault?: boolean,\n+ +defaultStatus?: 'open' | 'closed',\n|};\n/**\n@@ -1971,29 +1971,46 @@ declare module '@react-navigation/devtools' {\n*/\ndeclare export type DrawerOptions = $Partial<{|\n- title: string,\n- drawerLabel:\n+ +title: string,\n+ +lazy: boolean,\n+ +drawerLabel:\n| string\n| ({| +color: string, +focused: boolean |}) => React$Node,\n- drawerIcon: ({|\n+ +drawerIcon: ({|\n+color: string,\n+size: number,\n+focused: boolean,\n|}) => React$Node,\n- gestureEnabled: boolean,\n- swipeEnabled: boolean,\n- unmountOnBlur: boolean,\n+ +drawerActiveTintColor: string,\n+ +drawerActiveBackgroundColor: string,\n+ +drawerInactiveTintColor: string,\n+ +drawerInactiveBackgroundColor: string,\n+ +drawerItemStyle: ViewStyleProp,\n+ +drawerLabelStyle: TextStyleProp,\n+ +drawerContentContainerStyle: ViewStyleProp,\n+ +drawerContentStyle: ViewStyleProp,\n+ +drawerStyle: ViewStyleProp,\n+ +drawerPosition: 'left' | 'right',\n+ +drawerType: 'front' | 'back' | 'slide' | 'permanent',\n+ +drawerHideStatusBarOnOpen: boolean,\n+ +drawerStatusBarAnimation: 'slide' | 'none' | 'fade',\n+ +overlayColor: string,\n+ +sceneContainerStyle: ViewStyleProp,\n+ +gestureHandlerProps: PanGestureHandlerProps,\n+ +swipeEnabled: boolean,\n+ +swipeEdgeWidth: number,\n+ +swipeMinDistance: number,\n+ +keyboardDismissMode: 'on-drag' | 'none',\n+ +unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n* Drawer navigation prop\n*/\n- declare export type DrawerNavigationEventMap = {|\n- ...EventMapCore<DrawerNavigationState>,\n- +drawerOpen: {| +data: void, +canPreventDefault: false |},\n- +drawerClose: {| +data: void, +canPreventDefault: false |},\n- |};\n+ declare export type DrawerNavigationEventMap =\n+ EventMapCore<DrawerNavigationState>;\ndeclare type DrawerExtraNavigationHelpers<\nParamList: ParamListBase = ParamListBase,\n@@ -2042,49 +2059,16 @@ declare module '@react-navigation/devtools' {\nDrawerOptions,\n>;\n- declare export type DrawerItemListBaseOptions = $Partial<{|\n- +activeTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveTintColor: string,\n- +inactiveBackgroundColor: string,\n- +itemStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- |}>;\n-\n- declare export type DrawerContentOptions = $Partial<{|\n- ...DrawerItemListBaseOptions,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type DrawerNavigationBuilderResult = {|\n+state: DrawerNavigationState,\n+navigation: DrawerNavigationHelpers<>,\n+descriptors: {| +[key: string]: DrawerDescriptor |},\n|};\n- declare export type DrawerContentProps = {|\n- ...DrawerContentOptions,\n- ...DrawerNavigationBuilderResult,\n- +progress: any, // Reanimated.Node<number>\n- |};\n-\ndeclare export type DrawerNavigationConfig = {|\n- +drawerPosition?: 'left' | 'right',\n- +drawerType?: 'front' | 'back' | 'slide' | 'permanent',\n- +edgeWidth?: number,\n- +hideStatusBar?: boolean,\n- +keyboardDismissMode?: 'on-drag' | 'none',\n- +minSwipeDistance?: number,\n- +overlayColor?: string,\n- +statusBarAnimation?: 'slide' | 'none' | 'fade',\n- +gestureHandlerProps?: PanGestureHandlerProps,\n- +lazy?: boolean,\n- +drawerContent?: DrawerContentProps => React$Node,\n- +drawerContentOptions?: DrawerContentOptions,\n- +sceneContainerStyle?: ViewStyleProp,\n- +drawerStyle?: ViewStyleProp,\n+ +drawerContent?: DrawerNavigationBuilderResult => React$Node,\n+detachInactiveScreens?: boolean,\n+ +useLegacyImplementation?: boolean,\n|};\ndeclare export type ExtraDrawerNavigatorProps = {|\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/drawer_v6.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/drawer_v6.x.x.js", "diff": "@@ -742,7 +742,7 @@ declare module '@react-navigation/drawer' {\ndeclare export type DrawerRouterOptions = {|\n...TabRouterOptions,\n- +openByDefault?: boolean,\n+ +defaultStatus?: 'open' | 'closed',\n|};\n/**\n@@ -1971,29 +1971,46 @@ declare module '@react-navigation/drawer' {\n*/\ndeclare export type DrawerOptions = $Partial<{|\n- title: string,\n- drawerLabel:\n+ +title: string,\n+ +lazy: boolean,\n+ +drawerLabel:\n| string\n| ({| +color: string, +focused: boolean |}) => React$Node,\n- drawerIcon: ({|\n+ +drawerIcon: ({|\n+color: string,\n+size: number,\n+focused: boolean,\n|}) => React$Node,\n- gestureEnabled: boolean,\n- swipeEnabled: boolean,\n- unmountOnBlur: boolean,\n+ +drawerActiveTintColor: string,\n+ +drawerActiveBackgroundColor: string,\n+ +drawerInactiveTintColor: string,\n+ +drawerInactiveBackgroundColor: string,\n+ +drawerItemStyle: ViewStyleProp,\n+ +drawerLabelStyle: TextStyleProp,\n+ +drawerContentContainerStyle: ViewStyleProp,\n+ +drawerContentStyle: ViewStyleProp,\n+ +drawerStyle: ViewStyleProp,\n+ +drawerPosition: 'left' | 'right',\n+ +drawerType: 'front' | 'back' | 'slide' | 'permanent',\n+ +drawerHideStatusBarOnOpen: boolean,\n+ +drawerStatusBarAnimation: 'slide' | 'none' | 'fade',\n+ +overlayColor: string,\n+ +sceneContainerStyle: ViewStyleProp,\n+ +gestureHandlerProps: PanGestureHandlerProps,\n+ +swipeEnabled: boolean,\n+ +swipeEdgeWidth: number,\n+ +swipeMinDistance: number,\n+ +keyboardDismissMode: 'on-drag' | 'none',\n+ +unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n* Drawer navigation prop\n*/\n- declare export type DrawerNavigationEventMap = {|\n- ...EventMapCore<DrawerNavigationState>,\n- +drawerOpen: {| +data: void, +canPreventDefault: false |},\n- +drawerClose: {| +data: void, +canPreventDefault: false |},\n- |};\n+ declare export type DrawerNavigationEventMap =\n+ EventMapCore<DrawerNavigationState>;\ndeclare type DrawerExtraNavigationHelpers<\nParamList: ParamListBase = ParamListBase,\n@@ -2042,49 +2059,16 @@ declare module '@react-navigation/drawer' {\nDrawerOptions,\n>;\n- declare export type DrawerItemListBaseOptions = $Partial<{|\n- +activeTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveTintColor: string,\n- +inactiveBackgroundColor: string,\n- +itemStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- |}>;\n-\n- declare export type DrawerContentOptions = $Partial<{|\n- ...DrawerItemListBaseOptions,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type DrawerNavigationBuilderResult = {|\n+state: DrawerNavigationState,\n+navigation: DrawerNavigationHelpers<>,\n+descriptors: {| +[key: string]: DrawerDescriptor |},\n|};\n- declare export type DrawerContentProps = {|\n- ...DrawerContentOptions,\n- ...DrawerNavigationBuilderResult,\n- +progress: any, // Reanimated.Node<number>\n- |};\n-\ndeclare export type DrawerNavigationConfig = {|\n- +drawerPosition?: 'left' | 'right',\n- +drawerType?: 'front' | 'back' | 'slide' | 'permanent',\n- +edgeWidth?: number,\n- +hideStatusBar?: boolean,\n- +keyboardDismissMode?: 'on-drag' | 'none',\n- +minSwipeDistance?: number,\n- +overlayColor?: string,\n- +statusBarAnimation?: 'slide' | 'none' | 'fade',\n- +gestureHandlerProps?: PanGestureHandlerProps,\n- +lazy?: boolean,\n- +drawerContent?: DrawerContentProps => React$Node,\n- +drawerContentOptions?: DrawerContentOptions,\n- +sceneContainerStyle?: ViewStyleProp,\n- +drawerStyle?: ViewStyleProp,\n+ +drawerContent?: DrawerNavigationBuilderResult => React$Node,\n+detachInactiveScreens?: boolean,\n+ +useLegacyImplementation?: boolean,\n|};\ndeclare export type ExtraDrawerNavigatorProps = {|\n@@ -2276,17 +2260,17 @@ declare module '@react-navigation/drawer' {\n* DrawerItemList\n*/\n- declare export type DrawerItemListProps = {|\n- ...DrawerItemListBaseOptions,\n- ...DrawerNavigationBuilderResult,\n- |};\n- declare export var DrawerItemList: React$ComponentType<DrawerItemListProps>;\n+ declare export var DrawerItemList: React$ComponentType<\n+ DrawerNavigationBuilderResult,\n+ >;\n/**\n* DrawerContent\n*/\n- declare export var DrawerContent: React$ComponentType<DrawerContentProps>;\n+ declare export var DrawerContent: React$ComponentType<\n+ DrawerNavigationBuilderResult,\n+ >;\n/**\n* DrawerContentScrollView\n@@ -2310,6 +2294,6 @@ declare module '@react-navigation/drawer' {\n* useIsDrawerOpen\n*/\n- declare export function useIsDrawerOpen(): boolean;\n+ declare export function useDrawerStatus(): 'open' | 'closed';\n}\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/elements_v1.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/elements_v1.x.x.js", "diff": "@@ -739,7 +739,7 @@ declare module '@react-navigation/elements' {\ndeclare export type DrawerRouterOptions = {|\n...TabRouterOptions,\n- +openByDefault?: boolean,\n+ +defaultStatus?: 'open' | 'closed',\n|};\n/**\n@@ -1968,29 +1968,46 @@ declare module '@react-navigation/elements' {\n*/\ndeclare export type DrawerOptions = $Partial<{|\n- title: string,\n- drawerLabel:\n+ +title: string,\n+ +lazy: boolean,\n+ +drawerLabel:\n| string\n| ({| +color: string, +focused: boolean |}) => React$Node,\n- drawerIcon: ({|\n+ +drawerIcon: ({|\n+color: string,\n+size: number,\n+focused: boolean,\n|}) => React$Node,\n- gestureEnabled: boolean,\n- swipeEnabled: boolean,\n- unmountOnBlur: boolean,\n+ +drawerActiveTintColor: string,\n+ +drawerActiveBackgroundColor: string,\n+ +drawerInactiveTintColor: string,\n+ +drawerInactiveBackgroundColor: string,\n+ +drawerItemStyle: ViewStyleProp,\n+ +drawerLabelStyle: TextStyleProp,\n+ +drawerContentContainerStyle: ViewStyleProp,\n+ +drawerContentStyle: ViewStyleProp,\n+ +drawerStyle: ViewStyleProp,\n+ +drawerPosition: 'left' | 'right',\n+ +drawerType: 'front' | 'back' | 'slide' | 'permanent',\n+ +drawerHideStatusBarOnOpen: boolean,\n+ +drawerStatusBarAnimation: 'slide' | 'none' | 'fade',\n+ +overlayColor: string,\n+ +sceneContainerStyle: ViewStyleProp,\n+ +gestureHandlerProps: PanGestureHandlerProps,\n+ +swipeEnabled: boolean,\n+ +swipeEdgeWidth: number,\n+ +swipeMinDistance: number,\n+ +keyboardDismissMode: 'on-drag' | 'none',\n+ +unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n* Drawer navigation prop\n*/\n- declare export type DrawerNavigationEventMap = {|\n- ...EventMapCore<DrawerNavigationState>,\n- +drawerOpen: {| +data: void, +canPreventDefault: false |},\n- +drawerClose: {| +data: void, +canPreventDefault: false |},\n- |};\n+ declare export type DrawerNavigationEventMap =\n+ EventMapCore<DrawerNavigationState>;\ndeclare type DrawerExtraNavigationHelpers<\nParamList: ParamListBase = ParamListBase,\n@@ -2039,49 +2056,16 @@ declare module '@react-navigation/elements' {\nDrawerOptions,\n>;\n- declare export type DrawerItemListBaseOptions = $Partial<{|\n- +activeTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveTintColor: string,\n- +inactiveBackgroundColor: string,\n- +itemStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- |}>;\n-\n- declare export type DrawerContentOptions = $Partial<{|\n- ...DrawerItemListBaseOptions,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type DrawerNavigationBuilderResult = {|\n+state: DrawerNavigationState,\n+navigation: DrawerNavigationHelpers<>,\n+descriptors: {| +[key: string]: DrawerDescriptor |},\n|};\n- declare export type DrawerContentProps = {|\n- ...DrawerContentOptions,\n- ...DrawerNavigationBuilderResult,\n- +progress: any, // Reanimated.Node<number>\n- |};\n-\ndeclare export type DrawerNavigationConfig = {|\n- +drawerPosition?: 'left' | 'right',\n- +drawerType?: 'front' | 'back' | 'slide' | 'permanent',\n- +edgeWidth?: number,\n- +hideStatusBar?: boolean,\n- +keyboardDismissMode?: 'on-drag' | 'none',\n- +minSwipeDistance?: number,\n- +overlayColor?: string,\n- +statusBarAnimation?: 'slide' | 'none' | 'fade',\n- +gestureHandlerProps?: PanGestureHandlerProps,\n- +lazy?: boolean,\n- +drawerContent?: DrawerContentProps => React$Node,\n- +drawerContentOptions?: DrawerContentOptions,\n- +sceneContainerStyle?: ViewStyleProp,\n- +drawerStyle?: ViewStyleProp,\n+ +drawerContent?: DrawerNavigationBuilderResult => React$Node,\n+detachInactiveScreens?: boolean,\n+ +useLegacyImplementation?: boolean,\n|};\ndeclare export type ExtraDrawerNavigatorProps = {|\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v6.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/material-top-tabs_v6.x.x.js", "diff": "@@ -742,7 +742,7 @@ declare module '@react-navigation/material-top-tabs' {\ndeclare export type DrawerRouterOptions = {|\n...TabRouterOptions,\n- +openByDefault?: boolean,\n+ +defaultStatus?: 'open' | 'closed',\n|};\n/**\n@@ -1971,29 +1971,46 @@ declare module '@react-navigation/material-top-tabs' {\n*/\ndeclare export type DrawerOptions = $Partial<{|\n- title: string,\n- drawerLabel:\n+ +title: string,\n+ +lazy: boolean,\n+ +drawerLabel:\n| string\n| ({| +color: string, +focused: boolean |}) => React$Node,\n- drawerIcon: ({|\n+ +drawerIcon: ({|\n+color: string,\n+size: number,\n+focused: boolean,\n|}) => React$Node,\n- gestureEnabled: boolean,\n- swipeEnabled: boolean,\n- unmountOnBlur: boolean,\n+ +drawerActiveTintColor: string,\n+ +drawerActiveBackgroundColor: string,\n+ +drawerInactiveTintColor: string,\n+ +drawerInactiveBackgroundColor: string,\n+ +drawerItemStyle: ViewStyleProp,\n+ +drawerLabelStyle: TextStyleProp,\n+ +drawerContentContainerStyle: ViewStyleProp,\n+ +drawerContentStyle: ViewStyleProp,\n+ +drawerStyle: ViewStyleProp,\n+ +drawerPosition: 'left' | 'right',\n+ +drawerType: 'front' | 'back' | 'slide' | 'permanent',\n+ +drawerHideStatusBarOnOpen: boolean,\n+ +drawerStatusBarAnimation: 'slide' | 'none' | 'fade',\n+ +overlayColor: string,\n+ +sceneContainerStyle: ViewStyleProp,\n+ +gestureHandlerProps: PanGestureHandlerProps,\n+ +swipeEnabled: boolean,\n+ +swipeEdgeWidth: number,\n+ +swipeMinDistance: number,\n+ +keyboardDismissMode: 'on-drag' | 'none',\n+ +unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n* Drawer navigation prop\n*/\n- declare export type DrawerNavigationEventMap = {|\n- ...EventMapCore<DrawerNavigationState>,\n- +drawerOpen: {| +data: void, +canPreventDefault: false |},\n- +drawerClose: {| +data: void, +canPreventDefault: false |},\n- |};\n+ declare export type DrawerNavigationEventMap =\n+ EventMapCore<DrawerNavigationState>;\ndeclare type DrawerExtraNavigationHelpers<\nParamList: ParamListBase = ParamListBase,\n@@ -2042,49 +2059,16 @@ declare module '@react-navigation/material-top-tabs' {\nDrawerOptions,\n>;\n- declare export type DrawerItemListBaseOptions = $Partial<{|\n- +activeTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveTintColor: string,\n- +inactiveBackgroundColor: string,\n- +itemStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- |}>;\n-\n- declare export type DrawerContentOptions = $Partial<{|\n- ...DrawerItemListBaseOptions,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type DrawerNavigationBuilderResult = {|\n+state: DrawerNavigationState,\n+navigation: DrawerNavigationHelpers<>,\n+descriptors: {| +[key: string]: DrawerDescriptor |},\n|};\n- declare export type DrawerContentProps = {|\n- ...DrawerContentOptions,\n- ...DrawerNavigationBuilderResult,\n- +progress: any, // Reanimated.Node<number>\n- |};\n-\ndeclare export type DrawerNavigationConfig = {|\n- +drawerPosition?: 'left' | 'right',\n- +drawerType?: 'front' | 'back' | 'slide' | 'permanent',\n- +edgeWidth?: number,\n- +hideStatusBar?: boolean,\n- +keyboardDismissMode?: 'on-drag' | 'none',\n- +minSwipeDistance?: number,\n- +overlayColor?: string,\n- +statusBarAnimation?: 'slide' | 'none' | 'fade',\n- +gestureHandlerProps?: PanGestureHandlerProps,\n- +lazy?: boolean,\n- +drawerContent?: DrawerContentProps => React$Node,\n- +drawerContentOptions?: DrawerContentOptions,\n- +sceneContainerStyle?: ViewStyleProp,\n- +drawerStyle?: ViewStyleProp,\n+ +drawerContent?: DrawerNavigationBuilderResult => React$Node,\n+detachInactiveScreens?: boolean,\n+ +useLegacyImplementation?: boolean,\n|};\ndeclare export type ExtraDrawerNavigatorProps = {|\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/native_v6.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/native_v6.x.x.js", "diff": "@@ -742,7 +742,7 @@ declare module '@react-navigation/native' {\ndeclare export type DrawerRouterOptions = {|\n...TabRouterOptions,\n- +openByDefault?: boolean,\n+ +defaultStatus?: 'open' | 'closed',\n|};\n/**\n@@ -1971,29 +1971,46 @@ declare module '@react-navigation/native' {\n*/\ndeclare export type DrawerOptions = $Partial<{|\n- title: string,\n- drawerLabel:\n+ +title: string,\n+ +lazy: boolean,\n+ +drawerLabel:\n| string\n| ({| +color: string, +focused: boolean |}) => React$Node,\n- drawerIcon: ({|\n+ +drawerIcon: ({|\n+color: string,\n+size: number,\n+focused: boolean,\n|}) => React$Node,\n- gestureEnabled: boolean,\n- swipeEnabled: boolean,\n- unmountOnBlur: boolean,\n+ +drawerActiveTintColor: string,\n+ +drawerActiveBackgroundColor: string,\n+ +drawerInactiveTintColor: string,\n+ +drawerInactiveBackgroundColor: string,\n+ +drawerItemStyle: ViewStyleProp,\n+ +drawerLabelStyle: TextStyleProp,\n+ +drawerContentContainerStyle: ViewStyleProp,\n+ +drawerContentStyle: ViewStyleProp,\n+ +drawerStyle: ViewStyleProp,\n+ +drawerPosition: 'left' | 'right',\n+ +drawerType: 'front' | 'back' | 'slide' | 'permanent',\n+ +drawerHideStatusBarOnOpen: boolean,\n+ +drawerStatusBarAnimation: 'slide' | 'none' | 'fade',\n+ +overlayColor: string,\n+ +sceneContainerStyle: ViewStyleProp,\n+ +gestureHandlerProps: PanGestureHandlerProps,\n+ +swipeEnabled: boolean,\n+ +swipeEdgeWidth: number,\n+ +swipeMinDistance: number,\n+ +keyboardDismissMode: 'on-drag' | 'none',\n+ +unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n* Drawer navigation prop\n*/\n- declare export type DrawerNavigationEventMap = {|\n- ...EventMapCore<DrawerNavigationState>,\n- +drawerOpen: {| +data: void, +canPreventDefault: false |},\n- +drawerClose: {| +data: void, +canPreventDefault: false |},\n- |};\n+ declare export type DrawerNavigationEventMap =\n+ EventMapCore<DrawerNavigationState>;\ndeclare type DrawerExtraNavigationHelpers<\nParamList: ParamListBase = ParamListBase,\n@@ -2042,49 +2059,16 @@ declare module '@react-navigation/native' {\nDrawerOptions,\n>;\n- declare export type DrawerItemListBaseOptions = $Partial<{|\n- +activeTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveTintColor: string,\n- +inactiveBackgroundColor: string,\n- +itemStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- |}>;\n-\n- declare export type DrawerContentOptions = $Partial<{|\n- ...DrawerItemListBaseOptions,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type DrawerNavigationBuilderResult = {|\n+state: DrawerNavigationState,\n+navigation: DrawerNavigationHelpers<>,\n+descriptors: {| +[key: string]: DrawerDescriptor |},\n|};\n- declare export type DrawerContentProps = {|\n- ...DrawerContentOptions,\n- ...DrawerNavigationBuilderResult,\n- +progress: any, // Reanimated.Node<number>\n- |};\n-\ndeclare export type DrawerNavigationConfig = {|\n- +drawerPosition?: 'left' | 'right',\n- +drawerType?: 'front' | 'back' | 'slide' | 'permanent',\n- +edgeWidth?: number,\n- +hideStatusBar?: boolean,\n- +keyboardDismissMode?: 'on-drag' | 'none',\n- +minSwipeDistance?: number,\n- +overlayColor?: string,\n- +statusBarAnimation?: 'slide' | 'none' | 'fade',\n- +gestureHandlerProps?: PanGestureHandlerProps,\n- +lazy?: boolean,\n- +drawerContent?: DrawerContentProps => React$Node,\n- +drawerContentOptions?: DrawerContentOptions,\n- +sceneContainerStyle?: ViewStyleProp,\n- +drawerStyle?: ViewStyleProp,\n+ +drawerContent?: DrawerNavigationBuilderResult => React$Node,\n+detachInactiveScreens?: boolean,\n+ +useLegacyImplementation?: boolean,\n|};\ndeclare export type ExtraDrawerNavigatorProps = {|\n" }, { "change_type": "MODIFY", "old_path": "native/flow-typed/npm/@react-navigation/stack_v6.x.x.js", "new_path": "native/flow-typed/npm/@react-navigation/stack_v6.x.x.js", "diff": "@@ -742,7 +742,7 @@ declare module '@react-navigation/stack' {\ndeclare export type DrawerRouterOptions = {|\n...TabRouterOptions,\n- +openByDefault?: boolean,\n+ +defaultStatus?: 'open' | 'closed',\n|};\n/**\n@@ -1971,29 +1971,46 @@ declare module '@react-navigation/stack' {\n*/\ndeclare export type DrawerOptions = $Partial<{|\n- title: string,\n- drawerLabel:\n+ +title: string,\n+ +lazy: boolean,\n+ +drawerLabel:\n| string\n| ({| +color: string, +focused: boolean |}) => React$Node,\n- drawerIcon: ({|\n+ +drawerIcon: ({|\n+color: string,\n+size: number,\n+focused: boolean,\n|}) => React$Node,\n- gestureEnabled: boolean,\n- swipeEnabled: boolean,\n- unmountOnBlur: boolean,\n+ +drawerActiveTintColor: string,\n+ +drawerActiveBackgroundColor: string,\n+ +drawerInactiveTintColor: string,\n+ +drawerInactiveBackgroundColor: string,\n+ +drawerItemStyle: ViewStyleProp,\n+ +drawerLabelStyle: TextStyleProp,\n+ +drawerContentContainerStyle: ViewStyleProp,\n+ +drawerContentStyle: ViewStyleProp,\n+ +drawerStyle: ViewStyleProp,\n+ +drawerPosition: 'left' | 'right',\n+ +drawerType: 'front' | 'back' | 'slide' | 'permanent',\n+ +drawerHideStatusBarOnOpen: boolean,\n+ +drawerStatusBarAnimation: 'slide' | 'none' | 'fade',\n+ +overlayColor: string,\n+ +sceneContainerStyle: ViewStyleProp,\n+ +gestureHandlerProps: PanGestureHandlerProps,\n+ +swipeEnabled: boolean,\n+ +swipeEdgeWidth: number,\n+ +swipeMinDistance: number,\n+ +keyboardDismissMode: 'on-drag' | 'none',\n+ +unmountOnBlur: boolean,\n+ +headerShown: boolean,\n|}>;\n/**\n* Drawer navigation prop\n*/\n- declare export type DrawerNavigationEventMap = {|\n- ...EventMapCore<DrawerNavigationState>,\n- +drawerOpen: {| +data: void, +canPreventDefault: false |},\n- +drawerClose: {| +data: void, +canPreventDefault: false |},\n- |};\n+ declare export type DrawerNavigationEventMap =\n+ EventMapCore<DrawerNavigationState>;\ndeclare type DrawerExtraNavigationHelpers<\nParamList: ParamListBase = ParamListBase,\n@@ -2042,49 +2059,16 @@ declare module '@react-navigation/stack' {\nDrawerOptions,\n>;\n- declare export type DrawerItemListBaseOptions = $Partial<{|\n- +activeTintColor: string,\n- +activeBackgroundColor: string,\n- +inactiveTintColor: string,\n- +inactiveBackgroundColor: string,\n- +itemStyle: ViewStyleProp,\n- +labelStyle: TextStyleProp,\n- |}>;\n-\n- declare export type DrawerContentOptions = $Partial<{|\n- ...DrawerItemListBaseOptions,\n- +contentContainerStyle: ViewStyleProp,\n- +style: ViewStyleProp,\n- |}>;\n-\ndeclare type DrawerNavigationBuilderResult = {|\n+state: DrawerNavigationState,\n+navigation: DrawerNavigationHelpers<>,\n+descriptors: {| +[key: string]: DrawerDescriptor |},\n|};\n- declare export type DrawerContentProps = {|\n- ...DrawerContentOptions,\n- ...DrawerNavigationBuilderResult,\n- +progress: any, // Reanimated.Node<number>\n- |};\n-\ndeclare export type DrawerNavigationConfig = {|\n- +drawerPosition?: 'left' | 'right',\n- +drawerType?: 'front' | 'back' | 'slide' | 'permanent',\n- +edgeWidth?: number,\n- +hideStatusBar?: boolean,\n- +keyboardDismissMode?: 'on-drag' | 'none',\n- +minSwipeDistance?: number,\n- +overlayColor?: string,\n- +statusBarAnimation?: 'slide' | 'none' | 'fade',\n- +gestureHandlerProps?: PanGestureHandlerProps,\n- +lazy?: boolean,\n- +drawerContent?: DrawerContentProps => React$Node,\n- +drawerContentOptions?: DrawerContentOptions,\n- +sceneContainerStyle?: ViewStyleProp,\n- +drawerStyle?: ViewStyleProp,\n+ +drawerContent?: DrawerNavigationBuilderResult => React$Node,\n+detachInactiveScreens?: boolean,\n+ +useLegacyImplementation?: boolean,\n|};\ndeclare export type ExtraDrawerNavigatorProps = {|\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Update @react-navigation/drawer libdef for React Nav 6 Summary: See D5537 and [ENG-2175](https://linear.app/comm/issue/ENG-2175/add-and-update-react-navigation-libdef-for-react-navigationdrawer) for context. Will describe changes and where they came from inline. Depends on D5537 Test Plan: Flow Reviewers: atul, inka, tomek Reviewed By: atul, tomek Subscribers: abosh Differential Revision: https://phab.comm.dev/D5538
129,182
08.11.2022 09:41:20
-3,600
8082920bcab09a88ecbadb7954119a33c155e666
[native] Refactor app-navigator.js Summary: tab navigator and overlay navigator should be in separate files. Linear issue: Test Plan: run ios simulator Reviewers: tomek, atul, ginsu, bartek Subscribers: ashoat, abosh
[ { "change_type": "MODIFY", "old_path": "native/calendar/calendar.react.js", "new_path": "native/calendar/calendar.react.js", "diff": "@@ -53,7 +53,6 @@ import {\naddKeyboardDismissListener,\nremoveKeyboardListener,\n} from '../keyboard/keyboard';\n-import type { TabNavigationProp } from '../navigation/app-navigator.react';\nimport DisconnectedBar from '../navigation/disconnected-bar.react';\nimport {\ncreateIsForegroundSelector,\n@@ -65,6 +64,7 @@ import {\nThreadPickerModalRouteName,\n} from '../navigation/route-names';\nimport type { NavigationRoute } from '../navigation/route-names';\n+import type { TabNavigationProp } from '../navigation/tab-navigator.react';\nimport { useSelector } from '../redux/redux-utils';\nimport { calendarListData } from '../selectors/calendar-selectors';\nimport type {\n" }, { "change_type": "MODIFY", "old_path": "native/calendar/entry.react.js", "new_path": "native/calendar/entry.react.js", "diff": "@@ -63,13 +63,13 @@ import { SingleLine } from '../components/single-line.react';\nimport TextInput from '../components/text-input.react';\nimport Markdown from '../markdown/markdown.react';\nimport { inlineMarkdownRules } from '../markdown/rules.react';\n-import type { TabNavigationProp } from '../navigation/app-navigator.react';\nimport {\ncreateIsForegroundSelector,\nnonThreadCalendarQuery,\n} from '../navigation/nav-selectors';\nimport { NavContext } from '../navigation/navigation-context';\nimport { ThreadPickerModalRouteName } from '../navigation/route-names';\n+import type { TabNavigationProp } from '../navigation/tab-navigator.react';\nimport { useSelector } from '../redux/redux-utils';\nimport { colors, useStyles } from '../themes/colors';\nimport type { LayoutEvent } from '../types/react-native';\n" }, { "change_type": "MODIFY", "old_path": "native/chat/chat-list.react.js", "new_path": "native/chat/chat-list.react.js", "diff": "@@ -18,7 +18,7 @@ import {\ntype KeyboardState,\nKeyboardContext,\n} from '../keyboard/keyboard-state';\n-import type { TabNavigationProp } from '../navigation/app-navigator.react';\n+import type { TabNavigationProp } from '../navigation/tab-navigator.react';\nimport { useSelector } from '../redux/redux-utils';\nimport type { ChatMessageItemWithHeight } from '../types/chat-types';\nimport type { ScrollEvent } from '../types/react-native';\n" }, { "change_type": "MODIFY", "old_path": "native/chat/chat-thread-list.react.js", "new_path": "native/chat/chat-thread-list.react.js", "diff": "@@ -36,13 +36,13 @@ import { useServerCall } from 'lib/utils/action-utils';\nimport Button from '../components/button.react';\nimport Search from '../components/search.react';\n-import type { TabNavigationProp } from '../navigation/app-navigator.react';\nimport {\nSidebarListModalRouteName,\nHomeChatThreadListRouteName,\nBackgroundChatThreadListRouteName,\ntype NavigationRoute,\n} from '../navigation/route-names';\n+import type { TabNavigationProp } from '../navigation/tab-navigator.react';\nimport { useSelector } from '../redux/redux-utils';\nimport {\ntype IndicatorStyle,\n" }, { "change_type": "MODIFY", "old_path": "native/chat/settings/thread-settings.react.js", "new_path": "native/chat/settings/thread-settings.react.js", "diff": "@@ -41,7 +41,6 @@ import {\ntype KeyboardState,\nKeyboardContext,\n} from '../../keyboard/keyboard-state';\n-import type { TabNavigationProp } from '../../navigation/app-navigator.react';\nimport { defaultStackScreenOptions } from '../../navigation/options';\nimport {\nOverlayContext,\n@@ -52,6 +51,7 @@ import {\nAddUsersModalRouteName,\nComposeSubchannelModalRouteName,\n} from '../../navigation/route-names';\n+import type { TabNavigationProp } from '../../navigation/tab-navigator.react';\nimport { useSelector } from '../../redux/redux-utils';\nimport type { AppState } from '../../redux/state-types';\nimport {\n" }, { "change_type": "MODIFY", "old_path": "native/navigation/app-navigator.react.js", "new_path": "native/navigation/app-navigator.react.js", "diff": "// @flow\n-import type {\n- BottomTabNavigationHelpers,\n- BottomTabNavigationProp,\n-} from '@react-navigation/bottom-tabs';\n-import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';\nimport * as SplashScreen from 'expo-splash-screen';\nimport * as React from 'react';\nimport { PersistGate } from 'redux-persist/integration/react';\n-import { unreadCount } from 'lib/selectors/thread-selectors';\n-\n-import AppsDirectory from '../apps/apps-directory.react';\n-import Calendar from '../calendar/calendar.react';\n-import Chat from '../chat/chat.react';\nimport { MultimediaMessageTooltipModal } from '../chat/multimedia-message-tooltip-modal.react';\nimport { RobotextMessageTooltipModal } from '../chat/robotext-message-tooltip-modal.react';\nimport ThreadSettingsMemberTooltipModal from '../chat/settings/thread-settings-member-tooltip-modal.react';\nimport { TextMessageTooltipModal } from '../chat/text-message-tooltip-modal.react';\n-import SWMansionIcon from '../components/swmansion-icon.react';\nimport { type SQLiteContextType, SQLiteContext } from '../data/sqlite-context';\nimport KeyboardStateContainer from '../keyboard/keyboard-state-container.react';\nimport CameraModal from '../media/camera-modal.react';\nimport ImageModal from '../media/image-modal.react';\nimport VideoPlaybackModal from '../media/video-playback-modal.react';\n-import Profile from '../profile/profile.react';\nimport RelationshipListItemTooltipModal from '../profile/relationship-list-item-tooltip-modal.react';\nimport PushHandler from '../push/push-handler.react';\nimport { getPersistor } from '../redux/persist';\n-import { useSelector } from '../redux/redux-utils';\nimport { RootContext } from '../root-context';\nimport { waitForInteractions } from '../utils/timers';\nimport ActionResultModal from './action-result-modal.react';\n@@ -39,9 +26,6 @@ import type {\n} from './overlay-navigator.react';\nimport type { RootNavigationProp } from './root-navigator.react';\nimport {\n- CalendarRouteName,\n- ChatRouteName,\n- ProfileRouteName,\nTabNavigatorRouteName,\nImageModalRouteName,\nMultimediaMessageTooltipModalRouteName,\n@@ -52,106 +36,13 @@ import {\nRobotextMessageTooltipModalRouteName,\nCameraModalRouteName,\nVideoPlaybackModalRouteName,\n- AppsRouteName,\ntype ScreenParamList,\n- type TabParamList,\ntype OverlayParamList,\n} from './route-names';\n-import { tabBar } from './tab-bar.react';\n+import TabNavigator from './tab-navigator.react';\nlet splashScreenHasHidden = false;\n-const calendarTabOptions = {\n- tabBarLabel: 'Calendar',\n- // eslint-disable-next-line react/display-name\n- tabBarIcon: ({ color }) => (\n- <SWMansionIcon name=\"calendar\" style={[styles.icon, { color }]} />\n- ),\n-};\n-const getChatTabOptions = (badge: number) => ({\n- tabBarLabel: 'Inbox',\n- // eslint-disable-next-line react/display-name\n- tabBarIcon: ({ color }) => (\n- <SWMansionIcon name=\"message-square\" style={[styles.icon, { color }]} />\n- ),\n- tabBarBadge: badge ? badge : undefined,\n-});\n-const profileTabOptions = {\n- tabBarLabel: 'Profile',\n- // eslint-disable-next-line react/display-name\n- tabBarIcon: ({ color }) => (\n- <SWMansionIcon name=\"user-2\" style={[styles.icon, { color }]} />\n- ),\n-};\n-const appsTabOptions = {\n- tabBarLabel: 'Apps',\n- // eslint-disable-next-line react/display-name\n- tabBarIcon: ({ color }) => (\n- <SWMansionIcon name=\"globe-1\" style={[styles.icon, { color }]} />\n- ),\n-};\n-\n-export type TabNavigationProp<\n- RouteName: $Keys<TabParamList> = $Keys<TabParamList>,\n-> = BottomTabNavigationProp<ScreenParamList, RouteName>;\n-\n-const Tab = createBottomTabNavigator<\n- ScreenParamList,\n- TabParamList,\n- BottomTabNavigationHelpers<ScreenParamList>,\n->();\n-const tabBarScreenOptions = {\n- headerShown: false,\n- tabBarHideOnKeyboard: false,\n- tabBarActiveTintColor: '#AE94DB',\n- tabBarStyle: {\n- backgroundColor: '#0A0A0A',\n- borderTopWidth: 1,\n- },\n- lazy: false,\n-};\n-function TabNavigator() {\n- const chatBadge = useSelector(unreadCount);\n- const isCalendarEnabled = useSelector(state => state.enabledApps.calendar);\n-\n- let calendarTab;\n- if (isCalendarEnabled) {\n- calendarTab = (\n- <Tab.Screen\n- name={CalendarRouteName}\n- component={Calendar}\n- options={calendarTabOptions}\n- />\n- );\n- }\n-\n- return (\n- <Tab.Navigator\n- initialRouteName={ChatRouteName}\n- tabBar={tabBar}\n- backBehavior=\"none\"\n- screenOptions={tabBarScreenOptions}\n- >\n- {calendarTab}\n- <Tab.Screen\n- name={ChatRouteName}\n- component={Chat}\n- options={getChatTabOptions(chatBadge)}\n- />\n- <Tab.Screen\n- name={ProfileRouteName}\n- component={Profile}\n- options={profileTabOptions}\n- />\n- <Tab.Screen\n- name={AppsRouteName}\n- component={AppsDirectory}\n- options={appsTabOptions}\n- />\n- </Tab.Navigator>\n- );\n-}\n-\nexport type AppNavigationProp<\nRouteName: $Keys<OverlayParamList> = $Keys<OverlayParamList>,\n> = OverlayNavigationProp<ScreenParamList, RouteName>;\n@@ -250,10 +141,4 @@ function AppNavigator(props: AppNavigatorProps): React.Node {\n);\n}\n-const styles = {\n- icon: {\n- fontSize: 28,\n- },\n-};\n-\nexport default AppNavigator;\n" }, { "change_type": "ADD", "old_path": null, "new_path": "native/navigation/tab-navigator.react.js", "diff": "+// @flow\n+\n+import type {\n+ BottomTabNavigationHelpers,\n+ BottomTabNavigationProp,\n+} from '@react-navigation/bottom-tabs';\n+import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';\n+import * as React from 'react';\n+\n+import { unreadCount } from 'lib/selectors/thread-selectors';\n+\n+import AppsDirectory from '../apps/apps-directory.react';\n+import Calendar from '../calendar/calendar.react';\n+import Chat from '../chat/chat.react';\n+import SWMansionIcon from '../components/swmansion-icon.react';\n+import Profile from '../profile/profile.react';\n+import { useSelector } from '../redux/redux-utils';\n+import {\n+ CalendarRouteName,\n+ ChatRouteName,\n+ ProfileRouteName,\n+ AppsRouteName,\n+ type ScreenParamList,\n+ type TabParamList,\n+} from './route-names';\n+import type { NavigationRoute } from './route-names';\n+import { tabBar } from './tab-bar.react';\n+\n+const calendarTabOptions = {\n+ tabBarLabel: 'Calendar',\n+ // eslint-disable-next-line react/display-name\n+ tabBarIcon: ({ color }) => (\n+ <SWMansionIcon name=\"calendar\" style={[styles.icon, { color }]} />\n+ ),\n+};\n+const getChatTabOptions = (badge: number) => ({\n+ tabBarLabel: 'Inbox',\n+ // eslint-disable-next-line react/display-name\n+ tabBarIcon: ({ color }) => (\n+ <SWMansionIcon name=\"message-square\" style={[styles.icon, { color }]} />\n+ ),\n+ tabBarBadge: badge ? badge : undefined,\n+});\n+const profileTabOptions = {\n+ tabBarLabel: 'Profile',\n+ // eslint-disable-next-line react/display-name\n+ tabBarIcon: ({ color }) => (\n+ <SWMansionIcon name=\"user-2\" style={[styles.icon, { color }]} />\n+ ),\n+};\n+const appsTabOptions = {\n+ tabBarLabel: 'Apps',\n+ // eslint-disable-next-line react/display-name\n+ tabBarIcon: ({ color }) => (\n+ <SWMansionIcon name=\"globe-1\" style={[styles.icon, { color }]} />\n+ ),\n+};\n+\n+export type TabNavigationProp<\n+ RouteName: $Keys<TabParamList> = $Keys<TabParamList>,\n+> = BottomTabNavigationProp<ScreenParamList, RouteName>;\n+\n+const Tab = createBottomTabNavigator<\n+ ScreenParamList,\n+ TabParamList,\n+ BottomTabNavigationHelpers<ScreenParamList>,\n+>();\n+const tabBarScreenOptions = {\n+ headerShown: false,\n+ tabBarHideOnKeyboard: false,\n+ tabBarActiveTintColor: '#AE94DB',\n+ tabBarStyle: {\n+ backgroundColor: '#0A0A0A',\n+ borderTopWidth: 1,\n+ },\n+ lazy: false,\n+};\n+type Props = {\n+ +navigation: TabNavigationProp<'TabNavigator'>,\n+ +route: NavigationRoute<'TabNavigator'>,\n+};\n+// eslint-disable-next-line no-unused-vars\n+function TabNavigator(props: Props): React.Node {\n+ const chatBadge = useSelector(unreadCount);\n+ const isCalendarEnabled = useSelector(state => state.enabledApps.calendar);\n+\n+ let calendarTab;\n+ if (isCalendarEnabled) {\n+ calendarTab = (\n+ <Tab.Screen\n+ name={CalendarRouteName}\n+ component={Calendar}\n+ options={calendarTabOptions}\n+ />\n+ );\n+ }\n+\n+ return (\n+ <Tab.Navigator\n+ initialRouteName={ChatRouteName}\n+ tabBar={tabBar}\n+ backBehavior=\"none\"\n+ screenOptions={tabBarScreenOptions}\n+ >\n+ {calendarTab}\n+ <Tab.Screen\n+ name={ChatRouteName}\n+ component={Chat}\n+ options={getChatTabOptions(chatBadge)}\n+ />\n+ <Tab.Screen\n+ name={ProfileRouteName}\n+ component={Profile}\n+ options={profileTabOptions}\n+ />\n+ <Tab.Screen\n+ name={AppsRouteName}\n+ component={AppsDirectory}\n+ options={appsTabOptions}\n+ />\n+ </Tab.Navigator>\n+ );\n+}\n+\n+const styles = {\n+ icon: {\n+ fontSize: 28,\n+ },\n+};\n+\n+export default TabNavigator;\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] Refactor app-navigator.js Summary: tab navigator and overlay navigator should be in separate files. Linear issue: https://linear.app/comm/issue/ENG-1883/refactor-app-navigatorjs-so-each-navigator-has-its-own-file Test Plan: run ios simulator Reviewers: tomek, atul, ginsu, bartek Reviewed By: tomek, ginsu, bartek Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5533
129,184
08.11.2022 10:24:09
18,000
5b72c8d08824c512a39d222ed9b04ce7b972f005
Temporary changes for staff release Includes: Previous changes for release (https://github.com/CommE2E/comm/commit/ca20b607a2ca7126d16896d6e806aa923006a726) D5377: Refactor code to perform migration inside one transaction D5378: Introduce function to create database D5379: Introduce function to set up database
[ { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp", "new_path": "native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp", "diff": "@@ -308,6 +308,88 @@ bool add_not_null_constraint_to_metadata(sqlite3 *db) {\nreturn false;\n}\n+bool create_schema(sqlite3 *db) {\n+ char *error;\n+ sqlite3_exec(\n+ db,\n+ \"CREATE TABLE IF NOT EXISTS drafts (\"\n+ \" key TEXT UNIQUE PRIMARY KEY NOT NULL,\"\n+ \" text TEXT NOT NULL\"\n+ \");\"\n+\n+ \"CREATE TABLE IF NOT EXISTS messages (\"\n+ \" id TEXT UNIQUE PRIMARY KEY NOT NULL,\"\n+ \" local_id TEXT,\"\n+ \" thread TEXT NOT NULL,\"\n+ \" user TEXT NOT NULL,\"\n+ \" type INTEGER NOT NULL,\"\n+ \" future_type INTEGER,\"\n+ \" content TEXT,\"\n+ \" time INTEGER NOT NULL\"\n+ \");\"\n+\n+ \"CREATE TABLE IF NOT EXISTS olm_persist_account (\"\n+ \" id INTEGER UNIQUE PRIMARY KEY NOT NULL,\"\n+ \" account_data TEXT NOT NULL\"\n+ \");\"\n+\n+ \"CREATE TABLE IF NOT EXISTS olm_persist_sessions (\"\n+ \" target_user_id TEXT UNIQUE PRIMARY KEY NOT NULL,\"\n+ \" session_data TEXT NOT NULL\"\n+ \");\"\n+\n+ \"CREATE TABLE IF NOT EXISTS media (\"\n+ \" id TEXT UNIQUE PRIMARY KEY NOT NULL,\"\n+ \" container TEXT NOT NULL,\"\n+ \" thread TEXT NOT NULL,\"\n+ \" uri TEXT NOT NULL,\"\n+ \" type TEXT NOT NULL,\"\n+ \" extras TEXT NOT NULL\"\n+ \");\"\n+\n+ \"CREATE TABLE IF NOT EXISTS threads (\"\n+ \" id TEXT UNIQUE PRIMARY KEY NOT NULL,\"\n+ \" type INTEGER NOT NULL,\"\n+ \" name TEXT,\"\n+ \" description TEXT,\"\n+ \" color TEXT NOT NULL,\"\n+ \" creation_time BIGINT NOT NULL,\"\n+ \" parent_thread_id TEXT,\"\n+ \" containing_thread_id TEXT,\"\n+ \" community TEXT,\"\n+ \" members TEXT NOT NULL,\"\n+ \" roles TEXT NOT NULL,\"\n+ \" current_user TEXT NOT NULL,\"\n+ \" source_message_id TEXT,\"\n+ \" replies_count INTEGER NOT NULL\"\n+ \");\"\n+\n+ \"CREATE TABLE IF NOT EXISTS metadata (\"\n+ \" name TEXT UNIQUE PRIMARY KEY NOT NULL,\"\n+ \" data TEXT NOT NULL\"\n+ \");\"\n+\n+ \"CREATE INDEX IF NOT EXISTS media_idx_container\"\n+ \" ON media (container);\"\n+\n+ \"CREATE INDEX IF NOT EXISTS messages_idx_thread_time\"\n+ \" ON messages (thread, time);\",\n+ nullptr,\n+ nullptr,\n+ &error);\n+\n+ if (!error) {\n+ return true;\n+ }\n+\n+ std::ostringstream stringStream;\n+ stringStream << \"Error creating tables: \" << error;\n+ Logger::log(stringStream.str());\n+\n+ sqlite3_free(error);\n+ return false;\n+}\n+\nvoid set_encryption_key(sqlite3 *db) {\nstd::string set_encryption_key_query =\n\"PRAGMA key = \\\"x'\" + SQLiteQueryExecutor::encryptionKey + \"'\\\";\";\n@@ -517,8 +599,8 @@ void validate_encryption() {\n}\ntypedef bool ShouldBeInTransaction;\n-typedef std::pair<std::function<bool(sqlite3 *)>, ShouldBeInTransaction>\n- SQLiteMigration;\n+typedef std::function<bool(sqlite3 *)> MigrateFunction;\n+typedef std::pair<MigrateFunction, ShouldBeInTransaction> SQLiteMigration;\nstd::vector<std::pair<uint, SQLiteMigration>> migrations{\n{{1, {create_drafts_table, true}},\n{2, {rename_threadID_to_key, true}},\n@@ -536,6 +618,81 @@ std::vector<std::pair<uint, SQLiteMigration>> migrations{\n{24, {add_not_null_constraint_to_drafts, true}},\n{25, {add_not_null_constraint_to_metadata, true}}}};\n+enum class MigrationResult { SUCCESS, FAILURE, NOT_APPLIED };\n+\n+MigrationResult applyMigrationWithTransaction(\n+ sqlite3 *db,\n+ const MigrateFunction &migrate,\n+ int index) {\n+ sqlite3_exec(db, \"BEGIN TRANSACTION;\", nullptr, nullptr, nullptr);\n+ auto db_version = get_database_version(db);\n+ if (index <= db_version) {\n+ sqlite3_exec(db, \"ROLLBACK;\", nullptr, nullptr, nullptr);\n+ return MigrationResult::NOT_APPLIED;\n+ }\n+ auto rc = migrate(db);\n+ if (!rc) {\n+ sqlite3_exec(db, \"ROLLBACK;\", nullptr, nullptr, nullptr);\n+ return MigrationResult::FAILURE;\n+ }\n+ auto database_version_set = set_database_version(db, index);\n+ if (!database_version_set) {\n+ sqlite3_exec(db, \"ROLLBACK;\", nullptr, nullptr, nullptr);\n+ return MigrationResult::FAILURE;\n+ }\n+ sqlite3_exec(db, \"END TRANSACTION;\", nullptr, nullptr, nullptr);\n+ return MigrationResult::SUCCESS;\n+}\n+\n+MigrationResult applyMigrationWithoutTransaction(\n+ sqlite3 *db,\n+ const MigrateFunction &migrate,\n+ int index) {\n+ auto db_version = get_database_version(db);\n+ if (index <= db_version) {\n+ return MigrationResult::NOT_APPLIED;\n+ }\n+ auto rc = migrate(db);\n+ if (!rc) {\n+ return MigrationResult::FAILURE;\n+ }\n+ sqlite3_exec(db, \"BEGIN TRANSACTION;\", nullptr, nullptr, nullptr);\n+ auto inner_db_version = get_database_version(db);\n+ if (index <= inner_db_version) {\n+ sqlite3_exec(db, \"ROLLBACK;\", nullptr, nullptr, nullptr);\n+ return MigrationResult::NOT_APPLIED;\n+ }\n+ auto database_version_set = set_database_version(db, index);\n+ if (!database_version_set) {\n+ sqlite3_exec(db, \"ROLLBACK;\", nullptr, nullptr, nullptr);\n+ return MigrationResult::FAILURE;\n+ }\n+ sqlite3_exec(db, \"END TRANSACTION;\", nullptr, nullptr, nullptr);\n+ return MigrationResult::SUCCESS;\n+}\n+\n+bool set_up_database(sqlite3 *db) {\n+ auto write_ahead_enabled = enable_write_ahead_logging_mode(db);\n+ if (!write_ahead_enabled) {\n+ return false;\n+ }\n+\n+ sqlite3_exec(db, \"BEGIN TRANSACTION;\", nullptr, nullptr, nullptr);\n+ auto db_version = get_database_version(db);\n+ auto latest_version = migrations.back().first;\n+ if (db_version == latest_version) {\n+ sqlite3_exec(db, \"ROLLBACK;\", nullptr, nullptr, nullptr);\n+ return true;\n+ }\n+ if (db_version != 0 || !create_schema(db) ||\n+ !set_database_version(db, latest_version)) {\n+ sqlite3_exec(db, \"ROLLBACK;\", nullptr, nullptr, nullptr);\n+ return false;\n+ }\n+ sqlite3_exec(db, \"END TRANSACTION;\", nullptr, nullptr, nullptr);\n+ return true;\n+}\n+\nvoid SQLiteQueryExecutor::migrate() const {\nvalidate_encryption();\n@@ -553,33 +710,40 @@ void SQLiteQueryExecutor::migrate() const {\nversion_msg << \"db version: \" << db_version << std::endl;\nLogger::log(version_msg.str());\n- for (const auto &[idx, migration] : migrations) {\n- if (idx <= db_version) {\n- continue;\n+ if (db_version == 0) {\n+ set_up_database(db);\n+ Logger::log(\"Database structure created.\");\n+\n+ sqlite3_close(db);\n+ return;\n}\n- const auto &[applyMigration, shouldBeInTransaction] = migration;\n- std::stringstream migration_msg;\n+ for (const auto &[idx, migration] : migrations) {\n+ const auto &[applyMigration, shouldBeInTransaction] = migration;\n+ MigrationResult migrationResult;\nif (shouldBeInTransaction) {\n- sqlite3_exec(db, \"BEGIN TRANSACTION;\", nullptr, nullptr, nullptr);\n+ migrationResult = applyMigrationWithTransaction(db, applyMigration, idx);\n+ } else {\n+ migrationResult =\n+ applyMigrationWithoutTransaction(db, applyMigration, idx);\n}\n- auto rc = applyMigration(db);\n- if (!rc) {\n+ if (migrationResult == MigrationResult::NOT_APPLIED) {\n+ continue;\n+ }\n+\n+ std::stringstream migration_msg;\n+ if (migrationResult == MigrationResult::FAILURE) {\nmigration_msg << \"migration \" << idx << \" failed.\" << std::endl;\nLogger::log(migration_msg.str());\nbreak;\n}\n-\n- set_database_version(db, idx);\n-\n- if (shouldBeInTransaction) {\n- sqlite3_exec(db, \"END TRANSACTION;\", nullptr, nullptr, nullptr);\n- }\n+ if (migrationResult == MigrationResult::SUCCESS) {\nmigration_msg << \"migration \" << idx << \" succeeded.\" << std::endl;\nLogger::log(migration_msg.str());\n}\n+ }\nsqlite3_close(db);\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h", "new_path": "native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h", "diff": "@@ -19,12 +19,13 @@ class SQLiteQueryExecutor : public DatabaseQueryExecutor {\nstatic std::once_flag initialized;\nstatic int sqlcipherEncryptionKeySize;\n- static std::string secureStoreEncryptionKeyID;\npublic:\nstatic std::string sqliteFilePath;\nstatic std::string encryptionKey;\n+ static std::string secureStoreEncryptionKeyID;\n+\nSQLiteQueryExecutor();\nstatic void initialize(std::string &databasePath);\nstd::unique_ptr<Thread> getThread(std::string threadID) const override;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/AppDelegate.mm", "new_path": "native/ios/Comm/AppDelegate.mm", "diff": "#import <reacthermes/HermesExecutorFactory.h>\n#import \"CommCoreModule.h\"\n+#import \"CommSecureStoreIOSWrapper.h\"\n#import \"GlobalDBSingleton.h\"\n#import \"GlobalNetworkSingleton.h\"\n#import \"Logger.h\"\n@@ -69,6 +70,12 @@ NSString *const setUnreadStatusKey = @\"setUnreadStatus\";\n- (BOOL)application:(UIApplication *)application\nwillFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n+ NSString *secureStoreEncryptionKeyID = [NSString\n+ stringWithUTF8String:\n+ (comm::SQLiteQueryExecutor::secureStoreEncryptionKeyID.c_str())];\n+ [[CommSecureStoreIOSWrapper sharedInstance]\n+ migrateOptionsForKey:secureStoreEncryptionKeyID\n+ withVersion:@\"0\"];\n[self attemptDatabaseInitialization];\nreturn YES;\n}\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/CommSecureStoreIOSWrapper.h", "new_path": "native/ios/Comm/CommSecureStoreIOSWrapper.h", "diff": "- (void)set:(NSString *)key value:(NSString *)value;\n- (NSString *)get:(NSString *)key;\n+- (void)migrateOptionsForKey:(NSString *)key withVersion:(NSString *)version;\n@end\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/CommSecureStoreIOSWrapper.mm", "new_path": "native/ios/Comm/CommSecureStoreIOSWrapper.mm", "diff": "- (NSString *)_getValueWithKey:(NSString *)key\nwithOptions:(NSDictionary *)options\nerror:(NSError **)error;\n+- (void)_deleteValueWithKey:(NSString *)key withOptions:(NSDictionary *)options;\n@end\n@implementation CommSecureStoreIOSWrapper\n(EXSecureStore *)[[moduleRegistryProvider moduleRegistry]\ngetExportedModuleOfClass:EXSecureStore.class];\nshared.secureStore = secureStore;\n+ shared.options =\n+ @{@\"keychainAccessible\" : @(EXSecureStoreAccessibleAfterFirstUnlock)};\n});\nreturn shared;\n}\nerror:&error];\n}\n+- (void)migrateOptionsForKey:(NSString *)key withVersion:(NSString *)version {\n+ NSString *secureStoreKeyVersionID = [key stringByAppendingString:@\".version\"];\n+ NSString *failureProtectionCopyKey = [key stringByAppendingString:@\".copy\"];\n+\n+ NSString *secureStoreKeyVersion = [self get:secureStoreKeyVersionID];\n+ if (secureStoreKeyVersion &&\n+ [secureStoreKeyVersion isEqualToString:version]) {\n+ return;\n+ }\n+\n+ NSString *value = [self get:key];\n+ NSString *valueCopy = [self get:failureProtectionCopyKey];\n+\n+ if (value) {\n+ [self set:failureProtectionCopyKey value:value];\n+ [[self secureStore] _deleteValueWithKey:key withOptions:[self options]];\n+ } else if (valueCopy) {\n+ value = valueCopy;\n+ } else {\n+ [self set:secureStoreKeyVersionID value:version];\n+ return;\n+ }\n+\n+ [self set:key value:value];\n+ [self set:secureStoreKeyVersionID value:version];\n+ [[self secureStore] _deleteValueWithKey:failureProtectionCopyKey\n+ withOptions:[self options]];\n+}\n+\n@end\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Temporary changes for staff release Includes: - Previous changes for release (https://github.com/CommE2E/comm/commit/ca20b607a2ca7126d16896d6e806aa923006a726) - D5377: Refactor code to perform migration inside one transaction - D5378: Introduce function to create database - D5379: Introduce function to set up database
129,184
08.11.2022 10:26:30
18,000
06cadf6e8b30dfabdbe83e6473370a5f3a37b757
[native] `codeVersion` -> 153
[ { "change_type": "MODIFY", "old_path": "native/android/app/build.gradle", "new_path": "native/android/app/build.gradle", "diff": "@@ -444,8 +444,8 @@ android {\napplicationId 'app.comm.android'\nminSdkVersion rootProject.ext.minSdkVersion\ntargetSdkVersion rootProject.ext.targetSdkVersion\n- versionCode 152\n- versionName '1.0.152'\n+ versionCode 153\n+ versionName '1.0.153'\nmissingDimensionStrategy 'react-native-camera', 'general'\nmultiDexEnabled true\n}\n" }, { "change_type": "MODIFY", "old_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "new_path": "native/cpp/CommonCpp/NativeModules/CommCoreModule.h", "diff": "@@ -13,7 +13,7 @@ namespace comm {\nnamespace jsi = facebook::jsi;\nclass CommCoreModule : public facebook::react::CommCoreModuleSchemaCxxSpecJSI {\n- const int codeVersion{152};\n+ const int codeVersion{153};\nstd::unique_ptr<WorkerThread> cryptoThread;\nCommSecureStore secureStore;\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm.xcodeproj/project.pbxproj", "new_path": "native/ios/Comm.xcodeproj/project.pbxproj", "diff": "CODE_SIGN_IDENTITY = \"Apple Development\";\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\n- CURRENT_PROJECT_VERSION = 152;\n+ CURRENT_PROJECT_VERSION = 153;\nDEBUG_INFORMATION_FORMAT = dwarf;\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.152;\n+ MARKETING_VERSION = 1.0.153;\nMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\nMTL_FAST_MATH = YES;\nOTHER_CFLAGS = (\n\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\";\nCODE_SIGN_STYLE = Automatic;\nCOPY_PHASE_STRIP = NO;\n- CURRENT_PROJECT_VERSION = 152;\n+ CURRENT_PROJECT_VERSION = 153;\nDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\nDEVELOPMENT_TEAM = H98Y8MH53M;\n\"EXCLUDED_ARCHS[sdk=iphonesimulator*]\" = arm64;\n\"@executable_path/Frameworks\",\n\"@executable_path/../../Frameworks\",\n);\n- MARKETING_VERSION = 1.0.152;\n+ MARKETING_VERSION = 1.0.153;\nMTL_FAST_MATH = YES;\nONLY_ACTIVE_ARCH = YES;\nOTHER_CFLAGS = (\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.debug.plist", "new_path": "native/ios/Comm/Info.debug.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.152</string>\n+ <string>1.0.153</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>152</string>\n+ <string>153</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" }, { "change_type": "MODIFY", "old_path": "native/ios/Comm/Info.release.plist", "new_path": "native/ios/Comm/Info.release.plist", "diff": "<key>CFBundlePackageType</key>\n<string>APPL</string>\n<key>CFBundleShortVersionString</key>\n- <string>1.0.152</string>\n+ <string>1.0.153</string>\n<key>CFBundleSignature</key>\n<string>????</string>\n<key>CFBundleVersion</key>\n- <string>152</string>\n+ <string>153</string>\n<key>LSApplicationQueriesSchemes</key>\n<array>\n<string>org-appextension-feature-password-management</string>\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[native] `codeVersion` -> 153
129,200
08.11.2022 15:50:03
18,000
e3931957ac95583bd2d42e68f41769c79a97eaf5
[services][identity] new constant Summary: this is really just for clean error handling. Test Plan: this is dead code so nothing really to test. you can run `cargo build` in the identity cargo project root to confirm this. Reviewers: atul, jon Subscribers: ashoat, tomek, abosh
[ { "change_type": "MODIFY", "old_path": "services/identity/src/constants.rs", "new_path": "services/identity/src/constants.rs", "diff": "@@ -11,6 +11,7 @@ pub const USERS_TABLE_PARTITION_KEY: &str = \"userID\";\npub const USERS_TABLE_REGISTRATION_ATTRIBUTE: &str = \"pakeRegistrationData\";\npub const USERS_TABLE_USERNAME_ATTRIBUTE: &str = \"username\";\npub const USERS_TABLE_USER_PUBLIC_KEY_ATTRIBUTE: &str = \"userPublicKey\";\n+pub const USERS_TABLE_DEVICE_ATTRIBUTE: &str = \"device\";\npub const USERS_TABLE_DEVICES_ATTRIBUTE: &str = \"devices\";\npub const USERS_TABLE_DEVICES_MAP_ATTRIBUTE_NAME: &str = \"deviceID\";\npub const USERS_TABLE_WALLET_ADDRESS_ATTRIBUTE: &str = \"walletAddress\";\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
[services][identity] new constant Summary: this is really just for clean error handling. Test Plan: this is dead code so nothing really to test. you can run `cargo build` in the identity cargo project root to confirm this. Reviewers: atul, jon Reviewed By: atul Subscribers: ashoat, tomek, abosh Differential Revision: https://phab.comm.dev/D5567
129,196
07.11.2022 17:25:48
-3,600
47d92cee06af46d634a0e7306688a40ec0ccb739
Run SQLite queries in parallel in SQLiteContextProvider Summary: This differential enables SQLite queries to run in parallel. Test Plan: Build app and launch it. Reviewers: atul, tomek, ashoat Subscribers: ashoat, abosh
[ { "change_type": "MODIFY", "old_path": "native/data/sqlite-context-provider.js", "new_path": "native/data/sqlite-context-provider.js", "diff": "@@ -38,7 +38,10 @@ function SQLiteContextProvider(props: Props): React.Node {\n}\n(async () => {\ntry {\n- const threads = await commCoreModule.getAllThreads();\n+ const [threads, messages] = await Promise.all([\n+ commCoreModule.getAllThreads(),\n+ commCoreModule.getAllMessages(),\n+ ]);\nconst threadInfosFromDB = convertClientDBThreadInfosToRawThreadInfos(\nthreads,\n);\n@@ -46,7 +49,6 @@ function SQLiteContextProvider(props: Props): React.Node {\ntype: setThreadStoreActionType,\npayload: { threadInfos: threadInfosFromDB },\n});\n- const messages = await commCoreModule.getAllMessages();\ndispatch({\ntype: setMessageStoreMessages,\npayload: messages,\n" } ]
JavaScript
BSD 3-Clause New or Revised License
comme2e/comm
Run SQLite queries in parallel in SQLiteContextProvider Summary: This differential enables SQLite queries to run in parallel. Test Plan: Build app and launch it. Reviewers: atul, tomek, ashoat Reviewed By: ashoat Subscribers: ashoat, abosh Differential Revision: https://phab.comm.dev/D5543