Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP-2000] [Messages] Search results seems to be in random order. #1408

Merged
merged 17 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions packages/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions packages/app/src/__deprecated__/main/utils/github-instance.ts

This file was deleted.

43 changes: 26 additions & 17 deletions packages/app/src/__deprecated__/renderer/locales/default/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"component.contactModalSuccessBody": "We will contact you as soon as the problem is resolved",
"component.contactModalSuccessBodyWithoutEmail": "We will check the issue as soon as possible.",
"component.contactModalSuccessTitle": "Message sent",
"component.contactModalTitle": "Mudita Center Support",
"component.contactSupportModalActionButton": "Send",
"component.contactSupportModalActionButtonProgress": "Sending",
"component.contactSupportModalDescription": "Contact Mudita support team and we will do our best to help you resolve your issues.",
Expand Down Expand Up @@ -153,6 +154,7 @@
"component.supportModalSuccessBody": "We will contact you as soon as the problem is resolved",
"component.supportModalSuccessBodyWithoutEmail": "We will check the issue as soon as possible.",
"component.supportModalSuccessTitle": "Message sent",
"component.supportModalTitle": "Mudita Center Support",
"component.table.close": "Close",
"component.textEditorCancelButton": "Reject changes",
"component.textEditorSaveButton": "Save to phone",
Expand All @@ -178,7 +180,7 @@
"component.updateDownloadedModalDescription": "Do you want to update app now or during next launch?",
"component.updateDownloadedModalMessage": "Update is ready to install",
"component.updateDownloadedModalWarning": "Note that update process will require app {osxPlatform, select, false {restart} true {quit}}.\nMake sure you saved all data you're currently working on.",
"component.updateErrorModalDescription": "Please download the latest Mudita Center version from {link}",
"component.updateErrorModalDescription": "Please restart the app or update it manually.",
"component.updateErrorModalMessage": "Error",
"component.updateForcedModalButton": "Download",
"component.updateForcedModalCurrentVersion": "Your current version: v.{version}",
Expand Down Expand Up @@ -259,10 +261,10 @@
"module.connecting.criticalBatteryLevelModalDescription": "Charge your Pure, then disconnect and reconnect your phone to use Mudita Center.",
"module.connecting.criticalBatteryLevelModalHeaderTitle": "MuditaOS",
"module.connecting.criticalBatteryLevelModalTitle": "The battery in your Pure is flat.",
"module.connecting.errorConnectingDescription": "Please restart your device and try again",
"module.connecting.errorConnectingModalHeaderTitle": "Connecting Error",
"module.connecting.errorConnectingDescription": "If you still have problems connecting to your device, have a look at our {link}",
"module.connecting.errorConnectingModalHeaderTitle": "We couldn't connect to your device...",
"module.connecting.errorConnectingModalSecondaryButton": "Cancel",
"module.connecting.errorConnectingModalTitle": "Your device is not responding",
"module.connecting.errorConnectingModalTitle": "Make sure your device is plugged in using a USB C cable and <b>restart Mudita Center or your computer</b> to try again",
"module.connecting.errorSyncModalButton": "Try again",
"module.connecting.errorSyncModalDescription": "Please try to reconnect your device",
"module.connecting.errorSyncModalHeaderTitle": "Error",
Expand Down Expand Up @@ -331,7 +333,7 @@
"module.contacts.firstName": "First name",
"module.contacts.forwardNamecard": "Forward namecard",
"module.contacts.forwardTooltipDescription": "Forward namecard",
"module.contacts.googleButtonText": "Continue with Google",
"module.contacts.googleButtonText": "Log in to Google",
"module.contacts.ice": "ICE",
"module.contacts.iceContact": "ICE contact",
"module.contacts.importBody": "Select the contacts you want to save on your Pure",
Expand All @@ -354,7 +356,7 @@
"module.contacts.information": "Information",
"module.contacts.listFavourites": "Favorites",
"module.contacts.listUnnamedContact": "No name",
"module.contacts.manualImportText": "Import from vcf file",
"module.contacts.manualImportText": "Import vCard",
"module.contacts.newContactCallLabel": "Add contact",
"module.contacts.newTitle": "New contact",
"module.contacts.noAddress": "No address",
Expand All @@ -364,7 +366,7 @@
"module.contacts.noNotes": "No notes",
"module.contacts.noPhoneNumber": "No phone number",
"module.contacts.notes": "Note",
"module.contacts.outlookButtonText": "continue with outlook",
"module.contacts.outlookButtonText": "Log in to Outlook",
"module.contacts.panelManageButton": "Manage",
"module.contacts.panelNewContactButton": "New contact",
"module.contacts.panelSearchListNoData": "No data provided",
Expand All @@ -391,7 +393,8 @@
"module.contacts.speedDialTitle": "Speed dial settings",
"module.contacts.synchronizingModalBody": "This might take a few minutes, please wait.",
"module.contacts.synchronizingModalTitle": "Synchronising contacts…",
"module.contacts.syncModalText": "Log in to allow Mudita Center to synchronize contacts between your device and Google or iCloud accounts",
"module.contacts.syncModalHelpText": "For Apple Devices, you'll need to <link>create a vCard (VFC file)</link>, then import it.",
"module.contacts.syncModalText": "To start importing contacts to and from your Google or Outlook accounts, simply log in to your account.",
"module.contacts.syncModalTitle": "Import contacts",
"module.contacts.unblock": "Unblock",
"module.contacts.unblockTooltipDescription": "Unblock contact",
Expand All @@ -417,11 +420,17 @@
"module.filesManager.duplicatedFilesUploadModalPendingFilesTextInfo": "Of the {uploadFilesCount} files you selected, {duplicatedFilesCount} {duplicatedFilesCount, plural, one {file} other {files}} with that name\nalready exist on your device. Change the name and try again.",
"module.filesManager.duplicatedFilesUploadModalTextInfo": "The file with this name already exists on the device. Change the name and try again.",
"module.filesManager.duplicatedFilesUploadModalTitle": "Upload files",
"module.filesManager.invalidFiledModalFilesInfo": "We found some files which wouldn't work on your device. To avoid problems we only uploaded the files that will work.",
"module.filesManager.invalidFiledModalHelpInfo": "To find out more about which files work on your device, visit our {link}.",
"module.filesManager.invalidFiledModalTitle": "File upload complete",
"module.filesManager.invalidFiledModalUploadInfo": "To avoid problems we only uploaded the files that will work.",
"module.filesManager.panelSearchPlaceholder": "Search music files",
"module.filesManager.pendingUploadModalAbortButtonText": "Abort",
"module.filesManager.pendingUploadModalActionButton": "Ok",
"module.filesManager.pendingUploadModalHeader": "Files uploading",
"module.filesManager.pendingUploadModalTextDetailsInfo": "The file limit has almost been reached. You can upload only {count} {count, plural, one {file} other {files}}",
"module.filesManager.pendingUploadModalTextInfo": "Mudita Center cannot load all selected files.",
"module.filesManager.pendingUploadModalTextDetailsInfo": "The first {count, plural, one {file} other {# files}} will be uploaded to the device.",
"module.filesManager.pendingUploadModalTextInfo": "Mudita Center cannot load all files.\nThe number of selected files exceeds the limit.",
"module.filesManager.pendingUploadModalAbortButtonText": "Abort",
"module.filesManager.pendingUploadModalTitle": "Upload files",
"module.filesManager.selectionNumber": "{num, plural, =-1 {All Files} one {# File} other {# Files}} selected",
"module.filesManager.tooManyFilesTooltipDescription": "The maximum number of files has been reached ({filesSlotsHarmonyMaxLimit} files)",
Expand Down Expand Up @@ -787,11 +796,6 @@
"module.settings.aboutLicense": "License",
"module.settings.aboutPrivacyPolicy": "Privacy Policy",
"module.settings.aboutTermsOfService": "Terms of service",
"module.settings.checkForFailedAppUpdateTitle": "Mudita Center",
"module.settings.checkForFailedAppUpdateSubtitle": "Checking failed",
"module.settings.checkForFailedAppUpdateBody": "Opps, something went wrong. \nPlease check your internet connection",
"module.settings.loadingTitle": "Mudita Center",
"module.settings.loadingSubtitle": "Checking for update",
"module.settings.audioConversion": "Audio Conversion",
"module.settings.audioConversionAlwaysAskLabel": "Always ask",
"module.settings.audioConversionConversionFormat": "Conversion format:",
Expand All @@ -808,11 +812,15 @@
"module.settings.backupDescription": " ",
"module.settings.backupLabel": "Backup Location",
"module.settings.backupTetheringLabel": "Start tethering",
"module.settings.systemUpdateCheckFailed": "Checking for update failed",
"module.settings.checkForFailedAppUpdateBody": "Opps, something went wrong. \nPlease check your internet connection",
"module.settings.checkForFailedAppUpdateSubtitle": "Checking failed",
"module.settings.checkForFailedAppUpdateTitle": "Mudita Center",
"module.settings.collectingData": "Send Mudita Center logs to Mudita",
"module.settings.collectingDataTooltip": "Sending logs is completely voluntary. Mudita doesn’t collect nor store any sensitive data - find out more in Mudita Center Privacy Policy (https://mudita.com/legal/privacy-policy/mudita-center/)",
"module.settings.connection": "General",
"module.settings.description": " ",
"module.settings.loadingSubtitle": "Checking for update",
"module.settings.loadingTitle": "Mudita Center",
"module.settings.notifications": "Notifications",
"module.settings.notificationsDescription": "Select which notifications you want to receive while using Mudita Center:",
"module.settings.notificationsIncomingCallsNotificationsLabel": "Incoming calls notifications",
Expand All @@ -826,6 +834,7 @@
"module.settings.privacyPolicyModalHeader": "Read and accept the Privacy policy",
"module.settings.privacyPolicyModalLink": "Read the Privacy Policy",
"module.settings.privacyPolicyModalTitle": "Privacy Policy",
"module.settings.systemUpdateCheckFailed": "Checking for update failed",
"module.settings.tetheringLabel": "Start tethering",
"module.template.dropdownDelete": "Delete Template",
"module.templates": "Templates",
Expand Down Expand Up @@ -855,6 +864,7 @@
"module.templates.emptyTemplate": "Empty template",
"module.templates.modalTitle": "Use Template",
"module.templates.newButton": "New template",
"module.templates.newLine": "The template contains new line character",
"module.templates.newTemplate": "new",
"module.templates.newTitle": "New template",
"module.templates.orderError": "Reordering was not successful",
Expand All @@ -873,7 +883,6 @@
"module.templates.temporary": "New template",
"module.templates.text": "Template...",
"module.templates.tooLong": "The template is too long",
"module.templates.newLine": "The template contains new line character",
"module.templates.unsavedTemplate": "unsaved",
"module.templates.updatingModalErrorSubtitle": "Updating failed",
"module.templates.updatingModalErrorTitle": "Updating Template",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
ModalContentWithoutMargin,
RoundIconWrapper,
ModalMainText,
ModalLink,
} from "App/ui/components/modal-dialog"
import { Size } from "App/__deprecated__/renderer/components/core/button/button.config"
import { AppUpdateStepModalTestIds } from "App/__deprecated__/renderer/wrappers/app-update-step-modal/app-update-step-modal-test-ids.enum"
Expand All @@ -30,7 +31,6 @@ import { useDispatch } from "react-redux"
import { togglePrivacyPolicyAccepted } from "App/settings/actions"
import { Dispatch } from "../../store"
import styled from "styled-components"
import { fontWeight, textColor } from "../../styles/theming/theme-getters"
import { BrowserActions } from "App/__deprecated__/common/enums/browser-actions.enum"

export interface AppUpdateAvailableProps {
Expand Down Expand Up @@ -95,13 +95,8 @@ const messages = defineMessages({
const PrivacyPolicyCheckboxWrapper = styled.div`
display: flex;
`

const StyledLink = styled.a`
text-decoration: underline;
cursor: pointer;
const StyledLink = styled(ModalLink)`
font-size: 1.4rem;
font-weight: ${fontWeight("default")};
color: ${textColor("action")};
`

const AppUpdateModal: FunctionComponent<ComponentProps<typeof ModalDialog>> = ({
Expand Down Expand Up @@ -251,9 +246,7 @@ export const AppUpdateError: FunctionComponent<
message={{
...messages.errorUpdateDescription,
values: {
link: (
<StyledLink onClick={openMuditaWebPage}>mudita.com</StyledLink>
),
link: <ModalLink onClick={openMuditaWebPage}>mudita.com</ModalLink>,
},
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ interface Props {
osVersion: string | undefined
checkingForOsForceUpdate: boolean
shouldCheckForForceUpdateNeed: boolean
initializationFailed: boolean
}

const BaseApp: FunctionComponent<Props> = ({
Expand All @@ -68,6 +69,7 @@ const BaseApp: FunctionComponent<Props> = ({
osVersion,
checkingForOsForceUpdate,
shouldCheckForForceUpdateNeed,
initializationFailed,
}) => {
useRouterListener(history, {
[URL_MAIN.contacts]: [],
Expand All @@ -93,7 +95,12 @@ const BaseApp: FunctionComponent<Props> = ({
return
}

if (deviceConnecting || deviceLocked || checkingForOsForceUpdate) {
if (
deviceConnecting ||
deviceLocked ||
checkingForOsForceUpdate ||
initializationFailed
) {
history.push(URL_ONBOARDING.connecting)
} else if (!deviceFeaturesVisible) {
history.push(URL_ONBOARDING.welcome)
Expand Down Expand Up @@ -154,6 +161,7 @@ const isDeviceRestarting = (state: RootState & ReduxRootState): boolean => {

const mapStateToProps = (state: RootState & ReduxRootState) => {
return {
initializationFailed: !state.dataSync.initialized,
deviceFeaturesVisible:
(state.device.status.connected &&
Boolean(state.device.status.unlocked)) ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { modalsManagerReducer } from "App/modals-manager/reducers"
import { settingsReducer } from "App/settings/reducers"
import { checkUpdateAvailable } from "App/settings/actions/check-update-available.action"
import { updateOsReducer } from "App/update/reducers"
import { dataSyncReducer } from "App/data-sync/reducers"

jest.mock("App/settings/actions/check-update-available.action")

Expand Down Expand Up @@ -109,6 +110,7 @@ const store = init({
modalsManager: modalsManagerReducer,
settings: settingsReducer,
update: updateOsReducer,
dataSync: dataSyncReducer,
},
},
}) as Store
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import Loader from "App/__deprecated__/renderer/components/core/loader/loader.co
import { LoaderType } from "App/__deprecated__/renderer/components/core/loader/loader.interface"
import styled from "styled-components"
import { backgroundColor } from "App/__deprecated__/renderer/styles/theming/theme-getters"
import { useSelector } from "react-redux"
import { ReduxRootState } from "App/__deprecated__/renderer/store"

export const Container = styled.section`
display: grid;
Expand Down Expand Up @@ -47,6 +49,7 @@ interface Props {
}

const ConnectingContent: FunctionComponent<Props> = ({ longerConnection }) => {
const { initialized } = useSelector((state: ReduxRootState) => state.dataSync)
return (
<Container>
<main>
Expand All @@ -56,9 +59,10 @@ const ConnectingContent: FunctionComponent<Props> = ({ longerConnection }) => {
<Text
displayStyle={TextDisplayStyle.Headline3}
message={{
id: longerConnection
? "module.onboarding.connectingLongMessage"
: "module.onboarding.connectingMessage",
id:
longerConnection && initialized
? "module.onboarding.connectingLongMessage"
: "module.onboarding.connectingMessage",
}}
/>
</main>
Expand Down
8 changes: 7 additions & 1 deletion packages/app/src/connecting/components/connecting.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { SynchronizationState } from "App/data-sync/reducers"
import { DeviceType } from "App/device/constants"
import { RequestResponseStatus } from "App/core/types/request-response.interface"
import { CriticalBatteryLevelModalTestIds } from "App/connecting/components/critical-battery-level-modal/critical-battery-level-modal-test-ids.enum"
import { Provider } from "react-redux"
import store from "App/__deprecated__/renderer/store"

jest.mock("App/connecting/requests/register-first-phone-connection")

Expand Down Expand Up @@ -45,7 +47,11 @@ const render = (extraProps?: Partial<Props>) => {
...defaultProps,
...extraProps,
}
const outcome = renderWithThemeAndIntl(<Connecting {...props} />)
const outcome = renderWithThemeAndIntl(
<Provider store={store}>
<Connecting {...props} />
</Provider>
)
return {
...outcome,
}
Expand Down
Loading