Skip to content

Commit 1db1f89

Browse files
authored
Merge pull request #5856 from rtibbles/show_me_button
Revert "Temporarily hide draft button."
2 parents 0b590c6 + 8a224dd commit 1db1f89

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

contentcuration/contentcuration/frontend/channelEdit/pages/StagingTreePage/index.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const GETTERS = {
2020
global: {
2121
isCompactViewMode: jest.fn(),
2222
appendChannelName: () => () => jest.fn(),
23+
hasFeatureEnabled: () => () => false,
2324
},
2425
currentChannel: {
2526
rootId: () => ROOT_ID,

contentcuration/contentcuration/frontend/channelEdit/pages/StagingTreePage/index.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
</VBtn>
228228

229229
<VBtn
230-
v-if="false"
230+
v-if="showDraftMode"
231231
color="primary"
232232
data-test="display-publish-draft-dialog-btn"
233233
@click="displayPublishDraftDialog = true"
@@ -365,6 +365,7 @@
365365
import MainNavigationDrawer from 'shared/views/MainNavigationDrawer';
366366
import OfflineText from 'shared/views/OfflineText';
367367
import { Channel } from 'shared/data/resources';
368+
import { FeatureFlagKeys } from 'shared/constants';
368369
369370
export default {
370371
name: 'StagingTreePage',
@@ -409,7 +410,7 @@
409410
};
410411
},
411412
computed: {
412-
...mapGetters(['isCompactViewMode']),
413+
...mapGetters(['isCompactViewMode', 'hasFeatureEnabled']),
413414
...mapGetters('currentChannel', [
414415
'currentChannel',
415416
'rootId',
@@ -492,6 +493,9 @@
492493
fileSizeDiff() {
493494
return this.fileSizeStaged - this.fileSizeLive;
494495
},
496+
showDraftMode() {
497+
return this.hasFeatureEnabled(FeatureFlagKeys.draft_channels);
498+
},
495499
},
496500
watch: {
497501
nodeId(newNodeId) {
@@ -648,7 +652,6 @@
648652
this.isPublishingDraft = true;
649653
650654
this.publishStagingChannel()
651-
.then(publishDraftchange => Channel.waitForPublishingDraft(publishDraftchange))
652655
.then(() => {
653656
this.isPublishingDraft = false;
654657
this.showSnackbar({

0 commit comments

Comments
 (0)