-
Notifications
You must be signed in to change notification settings - Fork 253
Show resubmit channel to community library CTA after channel publish #5541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ece9e9c
4a2948a
305e3e8
98e8115
14a38ff
3890f67
6d943d1
1b6fe94
bd77b0c
d932237
3170f54
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| <template> | ||
|
|
||
| <KModal | ||
| :title="title" | ||
| :submitText="resubmitButtonText" | ||
| :cancelText="dismissButtonText" | ||
| data-test="resubmit-modal" | ||
| @submit="handleResubmit" | ||
| @cancel="handleDismiss" | ||
| > | ||
| <div class="resubmit-modal-content"> | ||
| <p class="resubmit-modal-description">{{ description }}</p> | ||
| <p class="resubmit-modal-question">{{ question }}</p> | ||
| </div> | ||
| </KModal> | ||
|
|
||
| </template> | ||
|
|
||
|
|
||
| <script setup> | ||
|
|
||
| import { computed } from 'vue'; | ||
| import { communityChannelsStrings } from 'shared/strings/communityChannelsStrings'; | ||
|
|
||
| const props = defineProps({ | ||
| channel: { | ||
| type: Object, | ||
| required: true, | ||
| validator(value) { | ||
| return value && typeof value.name === 'string' && typeof value.version === 'number'; | ||
| }, | ||
| }, | ||
| latestSubmissionVersion: { | ||
| type: Number, | ||
| required: true, | ||
| }, | ||
| }); | ||
|
|
||
| const emit = defineEmits(['close', 'resubmit']); | ||
|
|
||
| const title = computed(() => communityChannelsStrings.resubmitModalTitle$()); | ||
|
|
||
| const publishedVersion = computed(() => { | ||
| return props.latestSubmissionVersion != null | ||
| ? props.latestSubmissionVersion | ||
| : props.channel.version; | ||
| }); | ||
|
|
||
| const description = computed(() => | ||
| communityChannelsStrings.resubmitModalBodyFirst$({ | ||
| channelName: props.channel.name, | ||
| version: publishedVersion.value, | ||
| }), | ||
| ); | ||
|
|
||
| const question = computed(() => communityChannelsStrings.resubmitModalBodySecond$()); | ||
|
|
||
| const dismissButtonText = computed(() => communityChannelsStrings.dismissAction$()); | ||
|
|
||
| const resubmitButtonText = computed(() => communityChannelsStrings.resubmitAction$()); | ||
|
|
||
| function handleDismiss() { | ||
| emit('close'); | ||
| } | ||
|
|
||
| function handleResubmit() { | ||
| emit('resubmit'); | ||
| emit('close'); | ||
| } | ||
|
|
||
| </script> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should the resubmit CL modal be checked and triggered by this component? If so, we can show a loader here, until that check finishes, and then we can emit a
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added! But when I tried to test it manually. The process of publishing was so fast. I could not even see the loader. LOL! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also emit the 'close' event when resubmitting, so that the parent component can handle both events separately, without needing to close the modal when the
resubmitevent is emitted.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, Thanks!