Browse Source

chore(app-start): Move module tab out from starfish section (#63273)

Nar Saynorath 1 year ago
parent
commit
8fcc782d3d

+ 10 - 7
static/app/components/sidebar/index.tsx

@@ -278,6 +278,16 @@ function Sidebar({organization}: Props) {
                   icon={<SubitemDot collapsed />}
                 />
               </Feature>
+              <Feature features="starfish-mobile-appstart" organization={organization}>
+                <SidebarItem
+                  {...sidebarItemProps}
+                  label={t('App Startup')}
+                  to={`/organizations/${organization.slug}/performance/mobile/app-startup`}
+                  id="performance-mobile-app-startup"
+                  icon={<SubitemDot collapsed />}
+                  isAlpha
+                />
+              </Feature>
               <Feature features="starfish-browser-resource-module-ui">
                 <SidebarItem
                   {...sidebarItemProps}
@@ -327,13 +337,6 @@ function Sidebar({organization}: Props) {
           id="performance-browser-interactions"
           icon={<SubitemDot collapsed={collapsed} />}
         />
-        <SidebarItem
-          {...sidebarItemProps}
-          label={<GuideAnchor target="starfish">{t('App Startup')}</GuideAnchor>}
-          to={`/organizations/${organization.slug}/starfish/appStartup`}
-          id="performance-mobile-app-startup"
-          icon={<SubitemDot collapsed={collapsed} />}
-        />
       </SidebarAccordion>
     </Feature>
   );

+ 13 - 0
static/app/routes.tsx

@@ -1748,6 +1748,19 @@ function buildRoutes() {
             )}
           />
         </Route>
+        <Route path="app-startup/">
+          <IndexRoute
+            component={make(
+              () => import('sentry/views/starfish/modules/mobile/appStartup')
+            )}
+          />
+          <Route
+            path="spans/"
+            component={make(
+              () => import('sentry/views/starfish/views/appStartup/screenSummary')
+            )}
+          />
+        </Route>
       </Route>
       <Route path="summary/">
         <IndexRoute

+ 1 - 1
static/app/views/starfish/modules/mobile/appStartup.tsx

@@ -23,7 +23,7 @@ export default function InitializationModule() {
   const organization = useOrganization();
 
   return (
-    <Feature features="starfish-view">
+    <Feature features="starfish-mobile-appstart" organization={organization}>
       <SentryDocumentTitle title={ROUTE_NAMES['app-startup']} orgSlug={organization.slug}>
         <Layout.Page>
           <PageErrorProvider>

+ 1 - 1
static/app/views/starfish/views/appStartup/screenSummary/index.tsx

@@ -59,7 +59,7 @@ function ScreenSummary() {
   } = location.query;
 
   const startupModule: LocationDescriptor = {
-    pathname: `/organizations/${organization.slug}/starfish/appStartup/`,
+    pathname: `/organizations/${organization.slug}/performance/mobile/app-startup/`,
     query: {
       ...omit(location.query, [
         QueryParameterNames.SPANS_SORT,

+ 1 - 1
static/app/views/starfish/views/appStartup/screenSummary/spanOperationTable.spec.tsx

@@ -96,7 +96,7 @@ describe('SpanOpSelector', function () {
 
     expect(screen.getByRole('link', {name: 'Application Init'})).toHaveAttribute(
       'href',
-      '/organizations/org-slug/starfish/appStartup/spans/?spanDescription=Application%20Init&spanGroup=7f4be68f08c0455f&spanOp=app.start.warm&transaction=foo-bar'
+      '/organizations/org-slug/performance/mobile/app-startup/spans/?spanDescription=Application%20Init&spanGroup=7f4be68f08c0455f&spanOp=app.start.warm&transaction=foo-bar'
     );
   });
 

+ 1 - 2
static/app/views/starfish/views/appStartup/screenSummary/spanOperationTable.tsx

@@ -147,9 +147,8 @@ export function SpanOperationTable({
     if (column.key === SPAN_DESCRIPTION) {
       const label = row[SpanMetricsField.SPAN_DESCRIPTION];
 
-      // TODO(nar), change out URL when moving tabs
       const pathname = normalizeUrl(
-        `/organizations/${organization.slug}/starfish/appStartup/spans/`
+        `/organizations/${organization.slug}/performance/mobile/app-startup/spans/`
       );
       const query = {
         ...location.query,

+ 1 - 1
static/app/views/starfish/views/appStartup/screensTable.tsx

@@ -87,7 +87,7 @@ export function ScreensTable({data, eventView, isLoading, pageLinks}: Props) {
             to={normalizeUrl(
               `/organizations/${
                 organization.slug
-              }/starfish/appStartup/spans/?${qs.stringify({
+              }/performance/mobile/app-startup/spans/?${qs.stringify({
                 ...location.query,
                 project: row['project.id'],
                 transaction: row.transaction,