-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref(insights): Wrap mobile insights module in
ModulePageProviders
(#…
…70771) Preparation for URL and breadcrumb changes. The Mobile modules don't wrap pages in `ModulePageProviders`. I need the wrapper so that I can wholesale change the base URL for all modules at once without doing awkward search-and-replace. Best enjoyed with whitespace off. ## Changes - Fix typing in `ModulePageProviders` Delegate to `Feature` for anything passed through. - Wrap mobile modules in `ModulePageProviders` `ModulePageProviders` includes `Feature`, `SentryDocumentTitle`, and `PageFiltersContainer`, so it's not necessary to wrap in those components manually. --------- Co-authored-by: Nar Saynorath <nar.saynorath@sentry.io>
- Loading branch information
1 parent
3a04d92
commit 91899cc
Showing
9 changed files
with
494 additions
and
451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
import Feature from 'sentry/components/acl/feature'; | ||
import useOrganization from 'sentry/utils/useOrganization'; | ||
import AppStartup from 'sentry/views/performance/mobile/appStarts/screens'; | ||
import {StartTypeSelector} from 'sentry/views/performance/mobile/appStarts/screenSummary/startTypeSelector'; | ||
import ScreensTemplate from 'sentry/views/performance/mobile/components/screensTemplate'; | ||
import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders'; | ||
import {ROUTE_NAMES} from 'sentry/views/starfish/utils/routeNames'; | ||
|
||
export default function InitializationModule() { | ||
const organization = useOrganization(); | ||
export function InitializationModule() { | ||
return ( | ||
<ScreensTemplate | ||
additionalSelectors={<StartTypeSelector />} | ||
content={<AppStartup chartHeight={200} />} | ||
title={ROUTE_NAMES['app-startup']} | ||
/> | ||
); | ||
} | ||
|
||
function PageWithProviders() { | ||
return ( | ||
<Feature features="spans-first-ui" organization={organization}> | ||
<ScreensTemplate | ||
additionalSelectors={<StartTypeSelector />} | ||
content={<AppStartup chartHeight={200} />} | ||
title={ROUTE_NAMES['app-startup']} | ||
/> | ||
</Feature> | ||
<ModulePageProviders | ||
title={ROUTE_NAMES['app-startup']} | ||
baseURL="/performance/mobile/app-startup" | ||
features="spans-first-ui" | ||
> | ||
<InitializationModule /> | ||
</ModulePageProviders> | ||
); | ||
} | ||
|
||
export default PageWithProviders; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.