feedbackListPage.tsx 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import {RouteComponentProps} from 'react-router';
  2. import styled from '@emotion/styled';
  3. import ErrorBoundary from 'sentry/components/errorBoundary';
  4. import FeedbackFilters from 'sentry/components/feedback/feedbackFilters';
  5. import FeedbackItemLoader from 'sentry/components/feedback/feedbackItem/feedbackItemLoader';
  6. import FeedbackSetupBanner from 'sentry/components/feedback/feedbackSetupBanner';
  7. import FeedbackList from 'sentry/components/feedback/list/feedbackList';
  8. import {FeedbackQueryKeys} from 'sentry/components/feedback/useFeedbackQueryKeys';
  9. import FullViewport from 'sentry/components/layouts/fullViewport';
  10. import * as Layout from 'sentry/components/layouts/thirds';
  11. import PageFiltersContainer from 'sentry/components/organizations/pageFilters/container';
  12. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  13. import {t} from 'sentry/locale';
  14. import {space} from 'sentry/styles/space';
  15. import useOrganization from 'sentry/utils/useOrganization';
  16. import FluidHeight from 'sentry/views/replays/detail/layout/fluidHeight';
  17. interface Props extends RouteComponentProps<{}, {}, {}> {}
  18. export default function FeedbackListPage({}: Props) {
  19. const organization = useOrganization();
  20. return (
  21. <SentryDocumentTitle title={t('User Feedback')} orgSlug={organization.slug}>
  22. <FullViewport>
  23. <FeedbackQueryKeys organization={organization}>
  24. <Layout.Header>
  25. <Layout.HeaderContent>
  26. <Layout.Title>{t('User Feedback')}</Layout.Title>
  27. </Layout.HeaderContent>
  28. </Layout.Header>
  29. <PageFiltersContainer>
  30. <ErrorBoundary>
  31. <LayoutGrid>
  32. <FeedbackSetupBanner style={{gridArea: 'banner', marginTop: '16px'}} />
  33. <FeedbackFilters style={{gridArea: 'filters'}} />
  34. <Container style={{gridArea: 'list'}}>
  35. <FeedbackList />
  36. </Container>
  37. <Container style={{gridArea: 'details'}}>
  38. <FeedbackItemLoader />
  39. </Container>
  40. </LayoutGrid>
  41. </ErrorBoundary>
  42. </PageFiltersContainer>
  43. </FeedbackQueryKeys>
  44. </FullViewport>
  45. </SentryDocumentTitle>
  46. );
  47. }
  48. const LayoutGrid = styled('div')`
  49. background: ${p => p.theme.background};
  50. height: 100%;
  51. width: 100%;
  52. padding: 0 ${space(4)} ${space(2)} ${space(4)};
  53. overflow: hidden;
  54. display: grid;
  55. grid-template-columns: minmax(390px, 1fr) 2fr;
  56. grid-template-rows: max-content max-content 1fr;
  57. grid-template-areas:
  58. 'banner banner'
  59. 'filters details'
  60. 'list details';
  61. gap: ${space(2)};
  62. place-items: stretch;
  63. `;
  64. const Container = styled(FluidHeight)`
  65. border: 1px solid ${p => p.theme.border};
  66. border-radius: ${p => p.theme.borderRadius};
  67. `;