@@ -49,7 +49,6 @@ import {useNavigate} from 'sentry/utils/useNavigate';
49
49
import useOrganization from 'sentry/utils/useOrganization' ;
50
50
import { hasDatasetSelector } from 'sentry/views/dashboards/utils' ;
51
51
import { NewIssueExperienceButton } from 'sentry/views/issueDetails/actions/newIssueExperienceButton' ;
52
- import PublishIssueModal from 'sentry/views/issueDetails/actions/publishModal' ;
53
52
import ShareIssueModal from 'sentry/views/issueDetails/actions/shareModal' ;
54
53
import SubscribeAction from 'sentry/views/issueDetails/actions/subscribeAction' ;
55
54
import { Divider } from 'sentry/views/issueDetails/divider' ;
@@ -96,9 +95,9 @@ export function GroupActions({group, project, disabled, event}: GroupActionsProp
96
95
archiveUntilOccurrence : archiveUntilOccurrenceCap ,
97
96
delete : deleteCap ,
98
97
deleteAndDiscard : deleteDiscardCap ,
99
- share : shareCap ,
100
98
resolve : resolveCap ,
101
99
resolveInRelease : resolveInReleaseCap ,
100
+ share : shareCap ,
102
101
} ,
103
102
customCopy : { resolution : resolvedCopyCap } ,
104
103
discover : discoverCap ,
@@ -216,7 +215,7 @@ export function GroupActions({group, project, disabled, event}: GroupActionsProp
216
215
openReprocessEventModal ( { organization, groupId : group . id } ) ;
217
216
} ;
218
217
219
- const onToggleShare = ( ) => {
218
+ const onTogglePublicShare = ( ) => {
220
219
const newIsPublic = ! group . isPublic ;
221
220
if ( newIsPublic ) {
222
221
trackAnalytics ( 'issue.shared_publicly' , {
@@ -336,23 +335,9 @@ export function GroupActions({group, project, disabled, event}: GroupActionsProp
336
335
organization = { organization }
337
336
groupId = { group . id }
338
337
event = { event }
339
- />
340
- ) ) ;
341
- } ;
342
-
343
- const openPublishModal = ( ) => {
344
- trackAnalytics ( 'issue_details.publish_issue_modal_opened' , {
345
- organization,
346
- streamline : hasStreamlinedUI ,
347
- ...getAnalyticsDataForGroup ( group ) ,
348
- } ) ;
349
- openModal ( modalProps => (
350
- < PublishIssueModal
351
- { ...modalProps }
352
- organization = { organization }
353
- projectSlug = { group . project . slug }
354
- groupId = { group . id }
355
- onToggle = { onToggleShare }
338
+ onToggle = { onTogglePublicShare }
339
+ projectSlug = { project . slug }
340
+ hasIssueShare = { shareCap . enabled }
356
341
/>
357
342
) ) ;
358
343
} ;
@@ -463,6 +448,7 @@ export function GroupActions({group, project, disabled, event}: GroupActionsProp
463
448
icon = { < IconUpload /> }
464
449
aria-label = { t ( 'Share' ) }
465
450
title = { t ( 'Share Issue' ) }
451
+ disabled = { disabled }
466
452
analyticsEventKey = "issue_details.share_action_clicked"
467
453
analyticsEventName = "Issue Details: Share Action Clicked"
468
454
/>
@@ -494,6 +480,12 @@ export function GroupActions({group, project, disabled, event}: GroupActionsProp
494
480
...( hasStreamlinedUI
495
481
? [ ]
496
482
: [
483
+ {
484
+ key : 'share' ,
485
+ label : t ( 'Share' ) ,
486
+ onAction : openShareModal ,
487
+ disabled,
488
+ } ,
497
489
{
498
490
key : group . isSubscribed ? 'unsubscribe' : 'subscribe' ,
499
491
className : 'hidden-sm hidden-md hidden-lg' ,
@@ -516,13 +508,6 @@ export function GroupActions({group, project, disabled, event}: GroupActionsProp
516
508
details : ! group . inbox || disabled ? t ( 'Issue has been reviewed' ) : undefined ,
517
509
onAction : ( ) => onUpdate ( { inbox : false } ) ,
518
510
} ,
519
- {
520
- key : 'publish' ,
521
- label : t ( 'Publish' ) ,
522
- disabled : disabled || ! shareCap . enabled ,
523
- hidden : ! organization . features . includes ( 'shared-issues' ) ,
524
- onAction : openPublishModal ,
525
- } ,
526
511
{
527
512
key : bookmarkKey ,
528
513
label : bookmarkTitle ,
0 commit comments