Browse Source

fix(insights): Add Mobile UI module description (#71555)

The module description of the Mobile UI module used the app starts
description, which is confusing. This is fixed now by adding an extra
description.
Philipp Hofmann 9 months ago
parent
commit
148e5e2791

+ 7 - 1
static/app/views/performance/mobile/appStarts/index.tsx

@@ -1,6 +1,10 @@
 import AppStartup from 'sentry/views/performance/mobile/appStarts/screens';
 import {StartTypeSelector} from 'sentry/views/performance/mobile/appStarts/screenSummary/startTypeSelector';
-import {MODULE_TITLE} from 'sentry/views/performance/mobile/appStarts/settings';
+import {
+  MODULE_DESCRIPTION,
+  MODULE_DOC_LINK,
+  MODULE_TITLE,
+} from 'sentry/views/performance/mobile/appStarts/settings';
 import ScreensTemplate from 'sentry/views/performance/mobile/components/screensTemplate';
 import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
 import {ModuleName} from 'sentry/views/starfish/types';
@@ -11,6 +15,8 @@ export function InitializationModule() {
       additionalSelectors={<StartTypeSelector />}
       content={<AppStartup chartHeight={200} />}
       moduleName={ModuleName.APP_START}
+      moduleDescription={MODULE_DESCRIPTION}
+      moduleDocLink={MODULE_DOC_LINK}
       title={MODULE_TITLE}
     />
   );

+ 6 - 6
static/app/views/performance/mobile/components/screensTemplate.tsx

@@ -18,10 +18,6 @@ import {PageAlert, PageAlertProvider} from 'sentry/utils/performance/contexts/pa
 import {useLocation} from 'sentry/utils/useLocation';
 import useOrganization from 'sentry/utils/useOrganization';
 import {useOnboardingProject} from 'sentry/views/performance/browser/webVitals/utils/useOnboardingProject';
-import {
-  MODULE_DESCRIPTION,
-  MODULE_DOC_LINK,
-} from 'sentry/views/performance/mobile/appStarts/settings';
 import {PlatformSelector} from 'sentry/views/performance/mobile/screenload/screens/platformSelector';
 import useCrossPlatformProject from 'sentry/views/performance/mobile/useCrossPlatformProject';
 import Onboarding from 'sentry/views/performance/onboarding';
@@ -31,6 +27,8 @@ import type {ModuleName} from 'sentry/views/starfish/types';
 
 type ScreensTemplateProps = {
   content: ReactNode;
+  moduleDescription: string;
+  moduleDocLink: string;
   moduleName: ModuleName.MOBILE_UI | ModuleName.APP_START;
   title: string;
   additionalSelectors?: ReactNode;
@@ -38,6 +36,8 @@ type ScreensTemplateProps = {
 
 export default function ScreensTemplate({
   moduleName,
+  moduleDocLink,
+  moduleDescription,
   title,
   additionalSelectors,
   content,
@@ -67,8 +67,8 @@ export default function ScreensTemplate({
             <Layout.Title>
               {title}
               <PageHeadingQuestionTooltip
-                docsUrl={MODULE_DOC_LINK}
-                title={MODULE_DESCRIPTION}
+                docsUrl={moduleDocLink}
+                title={moduleDescription}
               />
             </Layout.Title>
           </Layout.HeaderContent>

+ 7 - 1
static/app/views/performance/mobile/ui/index.tsx

@@ -1,6 +1,10 @@
 import ScreensTemplate from 'sentry/views/performance/mobile/components/screensTemplate';
 import {UIScreens} from 'sentry/views/performance/mobile/ui/screens';
-import {MODULE_TITLE} from 'sentry/views/performance/mobile/ui/settings';
+import {
+  MODULE_DESCRIPTION,
+  MODULE_DOC_LINK,
+  MODULE_TITLE,
+} from 'sentry/views/performance/mobile/ui/settings';
 import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
 import {ModuleName} from 'sentry/views/starfish/types';
 
@@ -10,6 +14,8 @@ export function ResponsivenessModule() {
       content={<UIScreens />}
       title={MODULE_TITLE}
       moduleName={ModuleName.MOBILE_UI}
+      moduleDescription={MODULE_DESCRIPTION}
+      moduleDocLink={MODULE_DOC_LINK}
     />
   );
 }

+ 6 - 0
static/app/views/performance/mobile/ui/settings.ts

@@ -2,3 +2,9 @@ import {t} from 'sentry/locale';
 
 export const MODULE_TITLE = t('Mobile UI');
 export const BASE_URL = 'mobile/ui';
+
+export const MODULE_DESCRIPTION = t("Improve your application's responsiveness.");
+
+// TODO: Update this link once we have the proper docs.
+export const MODULE_DOC_LINK =
+  'https://docs.sentry.io/product/performance/mobile-vitals/';