-
Notifications
You must be signed in to change notification settings - Fork 242
Info messages about previous submissions in create submission side panel #5513
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
base: unstable
Are you sure you want to change the base?
Info messages about previous submissions in create submission side panel #5513
Conversation
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.
Thanks @taoerman!! This is looking :chefs-kiss:. I've found a couple of minor issues that can be improved, but overall, this looks great!!
| .box { | ||
| padding: 8px; | ||
| color: v-bind('boxTextColor'); | ||
| padding: 12px 16px; |
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.
Here, the box should have a vertical and horizontal padding of 10px to match the specs styles.
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!
| class="box-content" | ||
| > | ||
| <div class="box-icon"> | ||
| <KIcon :icon="icon" /> |
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.
Could we set the font-size of this icon to 18px? Right now, it feels a bit small compared to the spec.
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 it! Thanks!
| v-else-if="latestSubmissionIsFinished" | ||
| class="info-section" | ||
| > | ||
| <div class="info-text"> |
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.
Could we set the color of this node to gray.v_700 to match the specs? Thanks!
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 it! Thanks!
| <div | ||
| class="more-details-link" | ||
| data-test="more-details-button" | ||
| @click="showingMoreDetails = true" | ||
| > | ||
| {{ moreDetailsButton$() }} | ||
| </div> |
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.
Could we use the KButton component with the appearance set to basic-link? That'd work fine, although the specs do not look as a link, but it's okay.
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 it! Thanks!
| <div class="info-text"> | ||
| <template v-if="latestSubmissionStatus === null"> | ||
| <template v-if="showingMoreDetails"> | ||
| <div>{{ infoBoxPrimaryText }} {{ moreDetails$() }}</div> |
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.
Could we show the moreDetails$ in a different paragraph? Rather than having it next to the primary text, separated by a space.
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 it! Thanks!
| <div class="channel-title">{{ channel.name }}</div> | ||
| <div> | ||
| <div class="field-annotation">{{ languagesDetected$() }}</div> | ||
| <div class="channel-title">{{ channel.name }} v{{ channel.version }}</div> |
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.
Having the title string composed by
{{ channel.name }} v{{ channel.version }} is not internationalizable, because if in any other languages a different character is used to separate text, or a different character is used to display versions, then this structure won't apply.
I think we can perhaps create a new "channelVersion$" string that receives the channel name and its version, so it can be translated properly.
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.
Thanks Alex, I created a placeholders {name} and {version} in communityChannelsStrings.js.
| ); | ||
| const canBeEdited = computed(() => { | ||
| if (!isPublished.value || isPublic.value) return false; | ||
| return !isCurrentVersionAlreadySubmitted.value || needsReplacementConfirmation.value; |
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.
Here, I think we can allow editing the form, but prevent the user from submitting it, so they don't have to check this first before editing anything else in the modal.
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 it, Thanks!
| replacementConfirmed.value = false; | ||
| description.value = ''; |
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.
I don't think we need to clear these values here. Because by this point, the modal was already unmounted, it doesn't make any difference.
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 it, Thanks!
| color: #4368f5; | ||
| cursor: pointer; | ||
| } | ||
| .more-details-link:hover { | ||
| color: #4368f5; |
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.
I think these styles will be removed because we may use KButton instead, but just as a general note: Something very weird should happen for us to use burned colors, in the vast majority of cases, we will always use the themeTokens or themePalette colors.
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 it, Thanks!
| constraints = [ | ||
| models.UniqueConstraint( | ||
| fields=["channel", "channel_version"], | ||
| name="unique_channel_with_channel_version", | ||
| ), | ||
| ] |
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.
Whoops, it seems I didn't explain this well 😅. Apologies. This constraint still applies; we should not allow creating multiple submissions of the same channel version. If the user wants to create a new submission for the same channel, they must publish a new version first.
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.
Ah, I see. There is little issue I found if we still use props.channel.version to get channel version, it would get the previous channel version. So I used a computed property of currentChannel to instead of. It works much better than props.channel.version.
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.
Hi Alex, I have fixed the logic of checkbox. Only show checkbox if there's a pending submission AND the version has changed.
Summary
References
Fixes #5450
Reviewer guidance
run new unit tests;
test the updated UI manually.