-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(insights): create screen rendering module (#79192)
This PR adds a screen rendering module under the domain view. <img width="1258" alt="image" src="https://github.com/user-attachments/assets/03ee8ea1-4df5-486e-b99d-a8bf7b074458"> This is a temporary change, the mobile screen module will require more work, but we can extract the screen rendering section of it as its own module in the meantime. --------- Co-authored-by: Matt Quinn <matt.quinn@sentry.io>
- Loading branch information
1 parent
eed024e
commit c3c7968
Showing
18 changed files
with
254 additions
and
10 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
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
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
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
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
5 changes: 5 additions & 0 deletions
5
static/app/views/insights/mobile/screenRendering/screenRenderingContent.tsx
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import ScreensOverview from 'sentry/views/insights/mobile/screens/components/screensOverview'; | ||
|
||
export function ScreenRenderingContent() { | ||
return <ScreensOverview />; | ||
} |
76 changes: 76 additions & 0 deletions
76
static/app/views/insights/mobile/screenRendering/screenRenderingLandingPage.tsx
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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
import ErrorBoundary from 'sentry/components/errorBoundary'; | ||
import * as Layout from 'sentry/components/layouts/thirds'; | ||
import {space} from 'sentry/styles/space'; | ||
import {PageAlert, PageAlertProvider} from 'sentry/utils/performance/contexts/pageAlert'; | ||
import {ModulePageFilterBar} from 'sentry/views/insights/common/components/modulePageFilterBar'; | ||
import {ModulePageProviders} from 'sentry/views/insights/common/components/modulePageProviders'; | ||
import {ModulesOnboarding} from 'sentry/views/insights/common/components/modulesOnboarding'; | ||
import {ReleaseComparisonSelector} from 'sentry/views/insights/common/components/releaseSelector'; | ||
import useCrossPlatformProject from 'sentry/views/insights/mobile/common/queries/useCrossPlatformProject'; | ||
import {PlatformSelector} from 'sentry/views/insights/mobile/screenload/components/platformSelector'; | ||
import {ScreenRenderingContent} from 'sentry/views/insights/mobile/screenRendering/screenRenderingContent'; | ||
import {MODULE_TITLE} from 'sentry/views/insights/mobile/screenRendering/settings'; | ||
import {MobileHeader} from 'sentry/views/insights/pages/mobile/mobilePageHeader'; | ||
import {MODULE_FEATURE_MAP} from 'sentry/views/insights/settings'; | ||
import {ModuleName} from 'sentry/views/insights/types'; | ||
|
||
export function ScreenRenderingModule() { | ||
const {isProjectCrossPlatform} = useCrossPlatformProject(); | ||
|
||
return ( | ||
<Layout.Page> | ||
<PageAlertProvider> | ||
<MobileHeader | ||
module={ModuleName.SCREEN_RENDERING} | ||
headerTitle={MODULE_TITLE} | ||
headerActions={isProjectCrossPlatform && <PlatformSelector />} | ||
/> | ||
|
||
<Layout.Body> | ||
<Layout.Main fullWidth> | ||
<Container> | ||
<ModulePageFilterBar | ||
moduleName={ModuleName.SCREEN_LOAD} | ||
extraFilters={<ReleaseComparisonSelector />} | ||
/> | ||
</Container> | ||
<PageAlert /> | ||
<ErrorBoundary mini> | ||
<ModulesOnboarding moduleName={ModuleName.SCREEN_RENDERING}> | ||
<ScreenRenderingContent /> | ||
</ModulesOnboarding> | ||
</ErrorBoundary> | ||
</Layout.Main> | ||
</Layout.Body> | ||
</PageAlertProvider> | ||
</Layout.Page> | ||
); | ||
} | ||
|
||
function PageWithProviders() { | ||
return ( | ||
<ModulePageProviders | ||
moduleName="screen_load" | ||
features={MODULE_FEATURE_MAP[ModuleName.SCREEN_RENDERING]} | ||
analyticEventName="insight.page_loads.screen_load" | ||
> | ||
<ScreenRenderingModule /> | ||
</ModulePageProviders> | ||
); | ||
} | ||
|
||
export default PageWithProviders; | ||
|
||
const Container = styled('div')` | ||
display: grid; | ||
grid-template-rows: auto auto auto; | ||
gap: ${space(2)}; | ||
margin-bottom: ${space(2)}; | ||
|
||
@media (min-width: ${p => p.theme.breakpoints.large}) { | ||
grid-template-rows: auto; | ||
grid-template-columns: auto 1fr auto; | ||
} | ||
`; |
53 changes: 53 additions & 0 deletions
53
static/app/views/insights/mobile/screenRendering/screenRenderingSummaryPage.tsx
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import {Fragment} from 'react'; | ||
|
||
import * as Layout from 'sentry/components/layouts/thirds'; | ||
import {t} from 'sentry/locale'; | ||
import {useLocation} from 'sentry/utils/useLocation'; | ||
import * as ModuleLayout from 'sentry/views/insights/common/components/moduleLayout'; | ||
import {ModulePageProviders} from 'sentry/views/insights/common/components/modulePageProviders'; | ||
import { | ||
DATA_TYPE, | ||
SUMMARY_PAGE_TITLE, | ||
} from 'sentry/views/insights/mobile/screenRendering/settings'; | ||
import {ScreenSummaryContent} from 'sentry/views/insights/mobile/ui/views/screenSummaryPage'; | ||
import {MobileHeader} from 'sentry/views/insights/pages/mobile/mobilePageHeader'; | ||
import {MODULE_FEATURE_MAP} from 'sentry/views/insights/settings'; | ||
import {ModuleName} from 'sentry/views/insights/types'; | ||
|
||
function ScreenRenderingSummary() { | ||
const location = useLocation(); | ||
|
||
const {transaction: transactionName} = location.query; | ||
return ( | ||
<Fragment> | ||
<MobileHeader | ||
headerTitle={transactionName} | ||
module={ModuleName.SCREEN_RENDERING} | ||
breadcrumbs={[{label: SUMMARY_PAGE_TITLE}]} | ||
/> | ||
<Layout.Body> | ||
<Layout.Main fullWidth> | ||
<ModuleLayout.Layout> | ||
<ModuleLayout.Full> | ||
<ScreenSummaryContent /> | ||
</ModuleLayout.Full> | ||
</ModuleLayout.Layout> | ||
</Layout.Main> | ||
</Layout.Body> | ||
</Fragment> | ||
); | ||
} | ||
|
||
function PageWithProviders() { | ||
return ( | ||
<ModulePageProviders | ||
moduleName={ModuleName.SCREEN_RENDERING} | ||
pageTitle={`${DATA_TYPE} ${t('Summary')}`} | ||
features={MODULE_FEATURE_MAP[ModuleName.SCREEN_RENDERING]} | ||
> | ||
<ScreenRenderingSummary /> | ||
</ModulePageProviders> | ||
); | ||
} | ||
|
||
export default PageWithProviders; |
17 changes: 17 additions & 0 deletions
17
static/app/views/insights/mobile/screenRendering/settings.ts
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {t} from 'sentry/locale'; | ||
|
||
export const MODULE_TITLE = t('Screen Rendering'); | ||
export const DATA_TYPE = t('Screen Render'); | ||
export const DATA_TYPE_PLURAL = t('Screen Renders'); | ||
|
||
export const CHART_HEIGHT = 160; | ||
|
||
export const MODULE_DESCRIPTION = t('TODO'); | ||
export const MODULE_DOC_LINK = 'TODO'; | ||
|
||
export const BASE_URL = 'screen-rendering'; | ||
export const SUMMARY_PAGE_BASE_URL = 'details'; | ||
|
||
export const SUMMARY_PAGE_TITLE = t('Render Summary'); | ||
|
||
export const MODULE_FEATURES = ['insights-addon-modules', 'insights-domain-view']; |
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.