feedbackListPage.tsx 2.5 KB

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