Skip to content
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

Disable bulk editing of all new metadata #3779

Merged
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,25 @@
@focus="trackClick('Description')"
/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the computed mdValue on the VFlex below, perhaps move the v-if="oneSelected" on the description field to it's parent VFlex

</VFlex>
<VFlex xs12 md6 :class="{ 'pl-2': $vuetify.breakpoint.mdAndUp }">
<VFlex xs12 :[mdValue]="true" :class="{ 'pl-2': $vuetify.breakpoint.mdAndUp }">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps conditionally apply the pl-2 class on && oneSelected

<!-- Learning activity -->
<LearningActivityOptions
v-if="oneSelected"
ref="learning_activities"
v-model="contentLearningActivities"
:disabled="anyIsTopic"
@focus="trackClick('Learning activities')"
/>
<!-- Level -->
<LevelsOptions
v-if="oneSelected"
ref="contentLevel"
v-model="contentLevel"
@focus="trackClick('Levels dropdown')"
/>
<!-- What you will need -->
<ResourcesNeededOptions
v-if="oneSelected"
ref="resourcesNeeded"
v-model="resourcesNeeded"
@focus="trackClick('What you will need')"
Expand Down Expand Up @@ -104,7 +107,7 @@
</VFlex>
</VLayout>
<!-- Category -->
<CategoryOptions ref="categories" v-model="categories" />
<CategoryOptions v-if="oneSelected" ref="categories" v-model="categories" />
</VFlex>
</VLayout>

Expand Down Expand Up @@ -196,6 +199,7 @@

<!-- For Beginners -->
<KCheckbox
v-if="oneSelected"
id="beginners"
ref="beginners"
:checked="forBeginners"
Expand Down Expand Up @@ -551,8 +555,11 @@
return this.firstNode.original_channel_name;
},
requiresAccessibility() {
return this.nodes.every(
node => node.kind !== ContentKindsNames.AUDIO && node.kind !== ContentKindsNames.TOPIC
return (
this.oneSelected &&
this.nodes.every(
node => node.kind !== ContentKindsNames.AUDIO && node.kind !== ContentKindsNames.TOPIC
)
);
},
audioAccessibility() {
Expand Down Expand Up @@ -719,6 +726,11 @@
videoSelected() {
return this.oneSelected && this.firstNode.kind === ContentKindsNames.VIDEO;
},
// Dynamically compute the size of the VFlex used
/* eslint-disable-next-line kolibri/vue-no-unused-properties */
mdValue() {
return this.oneSelected ? 'md6' : 'md12';
},
},
watch: {
nodes: {
Expand Down