feedbackListPage.tsx 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import {RouteComponentProps} from 'react-router';
  2. import styled from '@emotion/styled';
  3. import ErrorBoundary from 'sentry/components/errorBoundary';
  4. import {FeedbackDataContext} from 'sentry/components/feedback/feedbackDataContext';
  5. import FeedbackFilters from 'sentry/components/feedback/feedbackFilters';
  6. import FeedbackItemLoader from 'sentry/components/feedback/feedbackItem/feedbackItemLoader';
  7. import FeedbackSearch from 'sentry/components/feedback/feedbackSearch';
  8. import FeedbackList from 'sentry/components/feedback/list/feedbackList';
  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. <Layout.Header>
  24. <Layout.HeaderContent>
  25. <Layout.Title>{t('User Feedback')}</Layout.Title>
  26. </Layout.HeaderContent>
  27. </Layout.Header>
  28. <PageFiltersContainer>
  29. <ErrorBoundary>
  30. <FeedbackDataContext>
  31. <LayoutGrid>
  32. <FeedbackFilters style={{gridArea: 'filters'}} />
  33. <FeedbackSearch style={{gridArea: 'search'}} />
  34. <Container style={{gridArea: 'list'}}>
  35. <FeedbackList />
  36. </Container>
  37. <Container style={{gridArea: 'details'}}>
  38. <FeedbackItemLoader />
  39. </Container>
  40. </LayoutGrid>
  41. </FeedbackDataContext>
  42. </ErrorBoundary>
  43. </PageFiltersContainer>
  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: ${space(2)} ${space(4)};
  53. overflow: hidden;
  54. display: grid;
  55. grid-template-columns: minmax(390px, 1fr) 2fr;
  56. grid-template-rows: max-content 1fr;
  57. grid-template-areas:
  58. 'filters search'
  59. 'list details';
  60. gap: ${space(2)};
  61. place-items: stretch;
  62. `;
  63. const Container = styled(FluidHeight)`
  64. border: 1px solid ${p => p.theme.border};
  65. border-radius: ${p => p.theme.borderRadius};
  66. `;