mirror of
https://github.com/mudita/mudita-center.git
synced 2025-12-23 22:28:03 -05:00
[CP-XXX] Review and cleanup of pending TODOs (#2766)
This commit is contained in:
2
.github/workflows/nexus-development.yml
vendored
2
.github/workflows/nexus-development.yml
vendored
@@ -113,7 +113,7 @@ jobs:
|
||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
||||
npx nx build:linux app --publish never --output-style stream --no-cloud
|
||||
#
|
||||
# (see TODO: BEFORE PROD RELEASE (NOTARIZATION/STABILITY) in electron-builder.yml)
|
||||
# (see TODO: https://appnroll.atlassian.net/browse/CP-3938 in electron-builder.yml)
|
||||
# - name: Verify apple sign
|
||||
# if: matrix.runner_label == 'macos-nexus'
|
||||
# run: |
|
||||
|
||||
@@ -40,7 +40,7 @@ mac:
|
||||
entitlements: ./entitlements.mac.plist
|
||||
|
||||
# == NOTARIZATION AND CODE SIGNING ==
|
||||
# TODO: BEFORE PROD RELEASE (NOTARIZATION/STABILITY)
|
||||
# TODO: https://appnroll.atlassian.net/browse/CP-3938 - NOTARIZATION/STABILITY
|
||||
# Re-enable notarization and code signing verification in CI.
|
||||
# Currently works locally but fails in CI (environment differences), so:
|
||||
# 1) notarize is disabled (see 'notarize: false' below)
|
||||
|
||||
@@ -9,7 +9,7 @@ import { AnalyticsEvent } from "app-utils/models"
|
||||
import { analyticsMutationKeys } from "./analytics-mutation-keys"
|
||||
import { track, uniqueTrack } from "./analytics"
|
||||
|
||||
// TODO: BEFORE PROD RELEASE – migrate ALL events from the old project!
|
||||
// TODO: https://appnroll.atlassian.net/browse/CP-3939 - migrate ALL events from the old project
|
||||
|
||||
export const useTrack = () => {
|
||||
const { mutate } = useMutation({
|
||||
|
||||
@@ -112,6 +112,7 @@ const mapToCreateTicketRequestPayload = (
|
||||
}
|
||||
|
||||
const saveAppDeviceLogs = async (deviceId: string, destinationPath: string) => {
|
||||
// TODO: https://appnroll.atlassian.net/browse/CP-3941 - implement saving device logs
|
||||
logger.warn(
|
||||
`save app device logs for deviceId: ${deviceId} to path: ${destinationPath} is not implemented yet`
|
||||
)
|
||||
|
||||
@@ -198,7 +198,6 @@ export const DeviceManageFilesScreen: FunctionComponent<{
|
||||
|
||||
let lastTransferProgress = 0
|
||||
|
||||
// TODO: filePath from appToInstall [FileManagerFile]
|
||||
const filePath = `${targetDirectoryPath}${appToInstall.name}`
|
||||
const files = [{ ...appToInstall, filePath }]
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ export const RestoreBackupFeaturesSelectModal: FunctionComponent<Props> = ({
|
||||
key={feature.feature}
|
||||
{...register("features")}
|
||||
value={feature.feature}
|
||||
defaultChecked={false}
|
||||
defaultChecked={true}
|
||||
>
|
||||
{feature.label}{" "}
|
||||
<Typography.P1 color={"grey2"} as={"span"}>
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface FileManagerFileCategory {
|
||||
}
|
||||
|
||||
export type FileManagerFile = {
|
||||
id: string // refactor to path property?
|
||||
id: string // TODO: https://appnroll.atlassian.net/browse/CP-3940 - Separate file identifier from path
|
||||
name: string
|
||||
type: string
|
||||
size: number
|
||||
|
||||
@@ -29,7 +29,7 @@ export type HarmonyMscResponse<
|
||||
body: HarmonyMscResponseBody<E, M>
|
||||
}
|
||||
| {
|
||||
status: number // TODO
|
||||
status: number
|
||||
endpoint: E
|
||||
body?: unknown
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
HarmonyUpdateInstallingModal,
|
||||
HarmonyUpdateNotAvailableModal,
|
||||
} from "devices/harmony/ui"
|
||||
import { useHelpShortcut } from "help/feature"
|
||||
import { setContactSupportModalVisible } from "contact-support/feature"
|
||||
import {
|
||||
harmonyForceUpdateAvailableModalMessages,
|
||||
@@ -61,6 +62,7 @@ export const HarmonyOverviewOsSection: FunctionComponent<Props> = ({
|
||||
batteryLevel,
|
||||
}) => {
|
||||
const dispatch = useAppDispatch()
|
||||
const helpShortcut = useHelpShortcut()
|
||||
const queryClient = useQueryClient()
|
||||
const [updateStatus, setUpdateStatus] = useState<UpdateStatus>(
|
||||
UpdateStatus.Idle
|
||||
@@ -238,8 +240,8 @@ export const HarmonyOverviewOsSection: FunctionComponent<Props> = ({
|
||||
}, [dispatch])
|
||||
|
||||
const handleGoToHelp = useCallback(() => {
|
||||
// TODO: Implement navigation to help page if needed
|
||||
}, [])
|
||||
helpShortcut("harmony-os-update-fail")
|
||||
}, [helpShortcut])
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
|
||||
@@ -3,17 +3,18 @@
|
||||
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import { Article } from "help/ui"
|
||||
import { FunctionComponent } from "react"
|
||||
import { FunctionComponent, useCallback } from "react"
|
||||
import { useSelector } from "react-redux"
|
||||
import { AnalyticsEventCategory } from "app-utils/models"
|
||||
import { useTrack } from "app-utils/renderer"
|
||||
import { useAppDispatch } from "app-store/utils"
|
||||
import { setContactSupportModalVisible } from "contact-support/feature"
|
||||
import { Article } from "help/ui"
|
||||
import {
|
||||
selectHelpArticles,
|
||||
selectRatedArticles,
|
||||
} from "../store/help.selectors"
|
||||
import { useAppDispatch } from "app-store/utils"
|
||||
import { useTrack } from "app-utils/renderer"
|
||||
import { setArticleRated } from "../store/help.actions"
|
||||
import { AnalyticsEventCategory } from "app-utils/models"
|
||||
|
||||
export const ArticlePage: FunctionComponent = () => {
|
||||
const articles = useSelector(selectHelpArticles)
|
||||
@@ -36,11 +37,16 @@ export const ArticlePage: FunctionComponent = () => {
|
||||
dispatch(setArticleRated(articleId))
|
||||
}
|
||||
|
||||
const openContactSupportFlow = useCallback(() => {
|
||||
dispatch(setContactSupportModalVisible(true))
|
||||
}, [dispatch])
|
||||
|
||||
return (
|
||||
<Article
|
||||
articles={articles}
|
||||
ratedArticles={ratedArticles}
|
||||
rateArticle={rateCurrentArticle}
|
||||
onContactSupport={openContactSupportFlow}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -11,25 +11,21 @@ import {
|
||||
} from "@contentful/rich-text-react-renderer"
|
||||
import { BLOCKS, Document, INLINES, MARKS } from "@contentful/rich-text-types"
|
||||
import { NavLink } from "react-router"
|
||||
import { HelpArticle, HelpTestId, HelpPaths } from "help/models"
|
||||
import { HelpArticle, HelpPaths, HelpTestId } from "help/models"
|
||||
import { Button, Typography } from "app-theme/ui"
|
||||
import { ButtonSize, ButtonTextModifier, ButtonType } from "app-theme/models"
|
||||
|
||||
interface ArticleContentProps {
|
||||
article: HelpArticle | undefined
|
||||
onContactSupport: VoidFunction
|
||||
}
|
||||
|
||||
export const ArticleContent: FunctionComponent<ArticleContentProps> = ({
|
||||
article,
|
||||
onContactSupport,
|
||||
}) => {
|
||||
const blocks = splitContentToBlocks(article!.content as Document)
|
||||
|
||||
// TODO: will be added later
|
||||
const openContactSupportFlow = () => {
|
||||
console.log("Open Contact Support")
|
||||
// return dispatch(showModal(ModalStateKey.ContactSupportFlow))
|
||||
}
|
||||
|
||||
const options: Options = {
|
||||
renderNode: {
|
||||
[BLOCKS.HEADING_1]: (_, children) => (
|
||||
@@ -67,7 +63,7 @@ export const ArticleContent: FunctionComponent<ArticleContentProps> = ({
|
||||
}
|
||||
return (
|
||||
<Button
|
||||
onClick={openContactSupportFlow}
|
||||
onClick={onContactSupport}
|
||||
type={ButtonType.Text}
|
||||
size={ButtonSize.AutoMin}
|
||||
modifiers={[ButtonTextModifier.Link, ButtonTextModifier.Inline]}
|
||||
@@ -165,6 +161,7 @@ const Article = styled.article`
|
||||
ul {
|
||||
margin: 0 0 1em;
|
||||
padding-left: 1.8rem;
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-left: 2.5rem;
|
||||
|
||||
@@ -16,7 +16,7 @@ export const ArticleTracker: FunctionComponent<ArticleTrackerProps> = ({
|
||||
}) => {
|
||||
useEffect(() => {
|
||||
if (!article) return
|
||||
// TODO: for analitycs, will be implemented later
|
||||
// TODO: https://appnroll.atlassian.net/browse/CP-3939 - migrate ALL events from the old project
|
||||
// const startTime = Date.now()
|
||||
|
||||
return () => {
|
||||
|
||||
@@ -25,12 +25,14 @@ interface ArticleProps {
|
||||
articleId: string
|
||||
positive: boolean
|
||||
}) => void
|
||||
onContactSupport: VoidFunction
|
||||
}
|
||||
|
||||
export const Article: FunctionComponent<ArticleProps> = ({
|
||||
articles,
|
||||
ratedArticles,
|
||||
rateArticle,
|
||||
onContactSupport,
|
||||
}) => {
|
||||
const navigate = useNavigate()
|
||||
const { articleId } = useParams<{ articleId: string }>()
|
||||
@@ -49,7 +51,10 @@ export const Article: FunctionComponent<ArticleProps> = ({
|
||||
<ScrollArea>
|
||||
<ArticleWrapper>
|
||||
<ArticleWarning article={article} />
|
||||
<ArticleContent article={article} />
|
||||
<ArticleContent
|
||||
article={article}
|
||||
onContactSupport={onContactSupport}
|
||||
/>
|
||||
<ArticleFeedback
|
||||
ratedArticles={ratedArticles}
|
||||
rateArticle={rateArticle}
|
||||
|
||||
@@ -35,7 +35,7 @@ export const HelpFooter: FunctionComponent<Props> = ({ onContactSupport }) => {
|
||||
const intl = useIntl()
|
||||
|
||||
const handleContactSupport: MouseEventHandler = (e) => {
|
||||
e.preventDefault() // TODO: handle workaround for the app reloading when clicking the button
|
||||
e.preventDefault() // Prevent default navigation to avoid app reload on click
|
||||
onContactSupport()
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ export const getBase64 = async (url: string): Promise<string> => {
|
||||
Buffer.from(response.data, "binary").toString("base64")
|
||||
)
|
||||
} catch {
|
||||
// TODO: Return value to trigger placeholder gradient on image
|
||||
// TODO: https://appnroll.atlassian.net/browse/CP-3937 - Add image placeholder fallback to News view
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user