responsiveness.tsx 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import styled from '@emotion/styled';
  2. import * as Layout from 'sentry/components/layouts/thirds';
  3. import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
  4. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  5. import {space} from 'sentry/styles/space';
  6. import {PageAlert, PageAlertProvider} from 'sentry/utils/performance/contexts/pageAlert';
  7. import useOrganization from 'sentry/utils/useOrganization';
  8. import StarfishDatePicker from 'sentry/views/starfish/components/datePicker';
  9. import {ReleaseComparisonSelector} from 'sentry/views/starfish/components/releaseSelector';
  10. import {StarfishPageFiltersContainer} from 'sentry/views/starfish/components/starfishPageFiltersContainer';
  11. import {StarfishProjectSelector} from 'sentry/views/starfish/components/starfishProjectSelector';
  12. import {ROUTE_NAMES} from 'sentry/views/starfish/utils/routeNames';
  13. import {ScreensView, YAxis} from 'sentry/views/starfish/views/screens';
  14. export default function ResponsivenessModule() {
  15. const organization = useOrganization();
  16. return (
  17. <SentryDocumentTitle title={ROUTE_NAMES.responsiveness} orgSlug={organization.slug}>
  18. <Layout.Page>
  19. <PageAlertProvider>
  20. <Layout.Header>
  21. <Layout.HeaderContent>
  22. <Layout.Title>{ROUTE_NAMES.responsiveness}</Layout.Title>
  23. </Layout.HeaderContent>
  24. </Layout.Header>
  25. <Layout.Body>
  26. <Layout.Main fullWidth>
  27. <PageAlert />
  28. <StarfishPageFiltersContainer>
  29. <SearchContainerWithFilterAndMetrics>
  30. <PageFilterBar condensed>
  31. <StarfishProjectSelector />
  32. <StarfishDatePicker />
  33. </PageFilterBar>
  34. <ReleaseComparisonSelector />
  35. </SearchContainerWithFilterAndMetrics>
  36. <ScreensView yAxes={[YAxis.SLOW_FRAME_RATE, YAxis.FROZEN_FRAME_RATE]} />
  37. </StarfishPageFiltersContainer>
  38. </Layout.Main>
  39. </Layout.Body>
  40. </PageAlertProvider>
  41. </Layout.Page>
  42. </SentryDocumentTitle>
  43. );
  44. }
  45. const SearchContainerWithFilterAndMetrics = styled('div')`
  46. display: grid;
  47. grid-template-rows: auto auto auto;
  48. gap: ${space(2)};
  49. margin-bottom: ${space(2)};
  50. @media (min-width: ${p => p.theme.breakpoints.small}) {
  51. grid-template-rows: auto;
  52. grid-template-columns: auto 1fr auto;
  53. }
  54. `;