Skip to content

Commit

Permalink
feat(issues): Display attachments as view again (#79796)
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper authored Oct 25, 2024
1 parent f1c825f commit 7a9e286
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 319 deletions.

This file was deleted.

This file was deleted.

25 changes: 23 additions & 2 deletions static/app/views/issueDetails/groupEventAttachments/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import {css} from '@emotion/react';
import styled from '@emotion/styled';

import Feature from 'sentry/components/acl/feature';
import FeatureDisabled from 'sentry/components/acl/featureDisabled';
import * as Layout from 'sentry/components/layouts/thirds';
import {t} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import type {Group} from 'sentry/types/group';
import type {RouteComponentProps} from 'sentry/types/legacyReactRouter';
import useOrganization from 'sentry/utils/useOrganization';
import {useHasStreamlinedUI} from 'sentry/views/issueDetails/utils';

import GroupEventAttachments from './groupEventAttachments';

Expand All @@ -14,6 +19,8 @@ type Props = RouteComponentProps<{groupId: string}, {}> & {

function GroupEventAttachmentsContainer({group}: Props) {
const organization = useOrganization();
const hasStreamlinedUI = useHasStreamlinedUI();

return (
<Feature
features="event-attachments"
Expand All @@ -22,13 +29,27 @@ function GroupEventAttachmentsContainer({group}: Props) {
<FeatureDisabled {...props} featureName={t('Event Attachments')} />
)}
>
<Layout.Body>
<StyledLayoutBody hasStreamlinedUI={hasStreamlinedUI}>
<Layout.Main fullWidth>
<GroupEventAttachments project={group.project} groupId={group.id} />
</Layout.Main>
</Layout.Body>
</StyledLayoutBody>
</Feature>
);
}

const StyledLayoutBody = styled(Layout.Body)<{hasStreamlinedUI?: boolean}>`
${p =>
p.hasStreamlinedUI &&
css`
border: 1px solid ${p.theme.border};
border-radius: ${p.theme.borderRadius};
padding: ${space(2)} 0;
@media (min-width: ${p.theme.breakpoints.medium}) {
padding: ${space(2)} ${space(2)};
}
`}
`;

export default GroupEventAttachmentsContainer;

This file was deleted.

0 comments on commit 7a9e286

Please sign in to comment.