Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion static/app/views/releases/detail/header/releaseActions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import {Fragment} from 'react';
import styled from '@emotion/styled';

import {Button} from '@sentry/scraps/button';
import {Container} from '@sentry/scraps/layout/container';

import {archiveRelease, restoreRelease} from 'sentry/actionCreators/release';
import {Client} from 'sentry/api';
import {openConfirmModal} from 'sentry/components/confirm';
Expand All @@ -10,11 +13,12 @@ import {Tooltip} from 'sentry/components/core/tooltip';
import {DropdownMenu} from 'sentry/components/dropdownMenu';
import ProjectBadge from 'sentry/components/idBadge/projectBadge';
import TextOverflow from 'sentry/components/textOverflow';
import {IconEllipsis, IconNext, IconPrevious} from 'sentry/icons';
import {IconEllipsis, IconMegaphone, IconNext, IconPrevious} from 'sentry/icons';
import {t, tct, tn} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import type {Release, ReleaseMeta} from 'sentry/types/release';
import {trackAnalytics} from 'sentry/utils/analytics';
import {useFeedbackForm} from 'sentry/utils/useFeedbackForm';
import {useLocation} from 'sentry/utils/useLocation';
import {useNavigate} from 'sentry/utils/useNavigate';
import useOrganization from 'sentry/utils/useOrganization';
Expand All @@ -33,6 +37,7 @@ function ReleaseActions({projectSlug, release, releaseMeta, refetchData}: Props)
const location = useLocation();
const navigate = useNavigate();
const organization = useOrganization();
const openFeedbackForm = useFeedbackForm();

async function handleArchive() {
try {
Expand Down Expand Up @@ -183,6 +188,24 @@ function ReleaseActions({projectSlug, release, releaseMeta, refetchData}: Props)

return (
<ButtonBar>
{openFeedbackForm ? (
<Container display={{'2xs': 'none', xs: 'block'}}>
<Button
size="sm"
icon={<IconMegaphone />}
onClick={() =>
openFeedbackForm({
messagePlaceholder: t('How can we improve the Releases experience?'),
tags: {
['feedback.source']: 'release-detail',
},
})
}
>
{t('Give Feedback')}
</Button>
</Container>
) : null}
<ButtonBar merged gap="0">
<LinkButton
size="sm"
Expand Down
Loading