Skip to content

Commit

Permalink
Merge pull request #11929 from MisRob/upgrade-kds
Browse files Browse the repository at this point in the history
Upgrade KDS from v2.0.0 to v3.0.1 on the release branch
  • Loading branch information
rtibbles authored Mar 1, 2024
2 parents a19234a + b3e7aa3 commit 33e4c76
Show file tree
Hide file tree
Showing 32 changed files with 64 additions and 60 deletions.
2 changes: 1 addition & 1 deletion kolibri/core/assets/src/views/UserTable/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<KRadioButton
v-else-if="selectable && !enableMultipleSelection"
:disabled="disabled"
:value="user.id"
:buttonValue="user.id"
:currentValue="firstSelectedUser"
:label="''"
data-test="userRadioButton"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
:key="language.id"
ref="languageItem"
v-model="selectedLanguage"
:value="language.id"
:buttonValue="language.id"
:label="language.lang_name"
:title="language.english_name"
class="language-name"
Expand Down
2 changes: 1 addition & 1 deletion kolibri/core/assets/src/views/sync/RadioButtonGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<KRadioButton
v-for="(item, idx) in items"
:key="idx"
:value="itemValue(item)"
:buttonValue="itemValue(item)"
:currentValue="currentValue"
:label="itemLabel(item)"
:description="description(item)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
:key="idx"
v-model="selectedDeviceId"
class="radio-button"
:value="d.id"
:buttonValue="d.id"
:label="d.nickname"
:description="d.base_url"
:disabled="formDisabled || !isDeviceAvailable(d.id)"
Expand All @@ -65,7 +65,7 @@
:key="d.id"
v-model="selectedDeviceId"
class="radio-button"
:value="d.instance_id"
:buttonValue="d.instance_id"
:label="formatNameAndId(d.device_name, d.id)"
:description="formatBaseDevice(d)"
:disabled="formDisabled || fetchFailed || !isDeviceAvailable(d.id)"
Expand Down
4 changes: 2 additions & 2 deletions kolibri/core/assets/src/views/sync/SelectSyncSourceModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
<KRadioButton
v-model="source"
:label="$tr('dataPortalLabel')"
:value="SyncSources.PORTAL"
:buttonValue="SyncSources.PORTAL"
:disabled="portalIsOffline || formIsDisabled"
:autofocus="!portalIsOffline"
:description="$tr('dataPortalDescription')"
/>
<KRadioButton
v-model="source"
:label="$tr('localNetworkLabel')"
:value="SyncSources.PEER"
:buttonValue="SyncSources.PEER"
:disabled="formIsDisabled"
:description="$tr('localNetworkDescription')"
/>
Expand Down
2 changes: 1 addition & 1 deletion kolibri/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"js-cookie": "^3.0.5",
"knuth-shuffle-seeded": "^1.0.6",
"kolibri-constants": "0.2.0",
"kolibri-design-system": "https://github.com/learningequality/kolibri-design-system#v2.0.0",
"kolibri-design-system": "3.0.1",
"lockr": "0.8.5",
"lodash": "^4.17.21",
"loglevel": "^1.8.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@
v-model="fixedOrder"
:label="coachString('orderRandomLabel')"
:description="coachString('orderRandomDescription')"
:value="false"
:buttonValue="false"
/>
<KRadioButton
v-model="fixedOrder"
:label="coachString('orderFixedLabel')"
:description="coachString('orderFixedDescription')"
:value="true"
:buttonValue="true"
/>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
:key="classroom.id"
v-model="selectedClassroomId"
:label="classroomLabel(classroom)"
:value="classroom.id"
:buttonValue="classroom.id"
data-test="radio-button"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div>
<!-- Entire class -->
<KRadioButton
:value="true"
:buttonValue="true"
:currentValue="entireClassIsSelected"
:disabled="disabled"
@change="selectEntireClass()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
v-for="path in storageLocations"
:key="path.index"
v-model="selectedPath"
:value="path.path"
:buttonValue="path.path"
:label="path.path"
/>
</KModal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
v-for="path in storageLocations"
:key="path.index"
v-model="selectedPath"
:value="path"
:buttonValue="path"
:label="path"
/>
</KModal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ describe('DeviceSettingsPage', () => {
function assertIsSelected(button, expected) {
/*
* HACK(kds-test) The only way to tell it's checked in the DOM
* is to check if "value" and "currentValue" props have the same value
* is to check if "buttonValue" and "currentValue" props have the same value
*/
const buttonProps = button.props();
const checked = buttonProps.value === buttonProps.currentValue;
const checked = buttonProps.buttonValue === buttonProps.currentValue;
expect(checked).toBe(expected);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,38 +70,38 @@
<KRadioButton
data-test="landingPageButton"
:label="$tr('learnerAppPageChoice')"
:value="landingPageChoices.LEARN"
:buttonValue="landingPageChoices.LEARN"
:currentValue="landingPage"
@input="handleLandingPageChange"
/>
<KRadioButton
data-test="signInPageButton"
:label="$tr('signInPageChoice')"
:value="landingPageChoices.SIGN_IN"
:buttonValue="landingPageChoices.SIGN_IN"
:currentValue="landingPage"
@input="handleLandingPageChange"
/>
<div class="fieldset" style="margin-left: 32px">
<KRadioButton
data-test="allowGuestAccessButton"
:label="$tr('allowGuestAccess')"
:value="SignInPageOptions.ALLOW_GUEST_ACCESS"
:buttonValue="SignInPageOptions.ALLOW_GUEST_ACCESS"
:currentValue="signInPageOption"
:disabled="disableSignInPageOptions"
@input="handleSignInPageChange"
/>
<KRadioButton
data-test="disallowGuestAccessButton"
:label="$tr('disallowGuestAccess')"
:value="SignInPageOptions.DISALLOW_GUEST_ACCESS"
:buttonValue="SignInPageOptions.DISALLOW_GUEST_ACCESS"
:currentValue="signInPageOption"
:disabled="disableSignInPageOptions"
@input="handleSignInPageChange"
/>
<KRadioButton
data-test="lockedContentButton"
:label="$tr('lockedContent')"
:value="SignInPageOptions.LOCKED_CONTENT"
:buttonValue="SignInPageOptions.LOCKED_CONTENT"
:currentValue="signInPageOption"
:disabled="disableSignInPageOptions"
@input="handleSignInPageChange"
Expand All @@ -118,13 +118,13 @@
</p>
<KRadioButton
:label="$tr('doNotAllowDownload')"
:value="meteredConnectionDownloadOptions.DISALLOW_DOWNLOAD_ON_METERED_CONNECTION"
:buttonValue="meteredConnectionDownloadOptions.DISALLOW_DOWNLOAD_ON_METERED_CONNECTION"
:currentValue="meteredConnectionDownloadOption"
@input="handleMeteredConnectionDownloadChange"
/>
<KRadioButton
:label="$tr('allowDownload')"
:value="meteredConnectionDownloadOptions.ALLOW_DOWNLOAD_ON_METERED_CONNECTION"
:buttonValue="meteredConnectionDownloadOptions.ALLOW_DOWNLOAD_ON_METERED_CONNECTION"
:currentValue="meteredConnectionDownloadOption"
@input="handleMeteredConnectionDownloadChange"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
v-for="drive in drives"
:key="drive.id"
:label="enabledDriveLabel(drive)"
:value="drive.id"
:buttonValue="drive.id"
:currentValue="value"
@change="$emit('input', drive.id)"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
<KRadioButton
v-model="source"
:label="$tr('network')"
:value="ContentSources.KOLIBRI_STUDIO"
:buttonValue="ContentSources.KOLIBRI_STUDIO"
:disabled="kolibriStudioIsOffline || formIsDisabled"
:autofocus="!kolibriStudioIsOffline"
:description="$tr('studioDescription')"
/>
<KRadioButton
v-model="source"
:label="$tr('localNetworkOrInternet')"
:value="ContentSources.PEER_KOLIBRI_SERVER"
:buttonValue="ContentSources.PEER_KOLIBRI_SERVER"
:disabled="formIsDisabled"
:description="$tr('networkDescription')"
/>
<KRadioButton
v-model="source"
:label="$tr('localDrives')"
:value="ContentSources.LOCAL_DRIVE"
:buttonValue="ContentSources.LOCAL_DRIVE"
:disabled="formIsDisabled"
:description="$tr('localDescription')"
/>
Expand Down
4 changes: 2 additions & 2 deletions kolibri/plugins/facility/assets/src/views/UserCreatePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
:disabled="busy"
:label="coreString('classCoachLabel')"
:description="coreString('classCoachDescription')"
:value="true"
:buttonValue="true"
/>
<KRadioButton
v-model="classCoachIsSelected"
:disabled="busy"
:label="coreString('facilityCoachLabel')"
:description="coreString('facilityCoachDescription')"
:value="false"
:buttonValue="false"
/>
</fieldset>

Expand Down
4 changes: 2 additions & 2 deletions kolibri/plugins/facility/assets/src/views/UserEditPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@
:disabled="formDisabled"
:label="coreString('classCoachLabel')"
:description="coreString('classCoachDescription')"
:value="true"
:buttonValue="true"
/>
<KRadioButton
v-model="classCoachIsSelected"
:disabled="formDisabled"
:label="coreString('facilityCoachLabel')"
:description="coreString('facilityCoachDescription')"
:value="false"
:buttonValue="false"
/>
</fieldset>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
ref="kRadioButton"
name="languages-menu-item"
:label="label"
:value="1"
:buttonValue="1"
:currentValue="selected ? 1 : 0"
@change="setLanguage(value)"
@keydown.enter="setLanguage(value), $emit('hide')"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<KRadioButton
v-model="selected"
:label="$tr('joinFacilityLabel')"
:value="Options.JOIN"
:buttonValue="Options.JOIN"
class="radio-button"
/>
<KRadioButton
v-model="selected"
:label="$tr('importFromFacilityLabel')"
:value="Options.IMPORT"
:buttonValue="Options.IMPORT"
class="radio-button"
/>
<SelectDeviceModalGroup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
v-model="setting"
class="radio-button"
:label="$tr('yesOptionLabel')"
:value="true"
:buttonValue="true"
/>
<KRadioButton
ref="noRadio"
v-model="setting"
class="radio-button"
:label="$tr('noOptionLabel')"
:value="false"
:buttonValue="false"
/>
<p class="description">
{{ getCommonSyncString('changeLater') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ref="first-button"
v-model="selected"
class="permission-preset-radio-button"
:value="Presets.NONFORMAL"
:buttonValue="Presets.NONFORMAL"
:label="$tr('nonFormalLabel')"
:description="$tr('nonFormalDescription')"
/>
Expand All @@ -24,7 +24,7 @@
<KRadioButton
v-model="selected"
class="permission-preset-radio-button"
:value="Presets.FORMAL"
:buttonValue="Presets.FORMAL"
:label="$tr('formalLabel')"
:description="$tr('formalDescription')"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<KRadioButton
v-model="selected"
:label="$tr('fullDeviceLabel')"
:value="Options.FULL"
:buttonValue="Options.FULL"
:description="$tr('fullDeviceDescription')"
/>
<KRadioButton
v-model="selected"
:label="$tr('learnOnlyDeviceLabel')"
:value="Options.LOD"
:buttonValue="Options.LOD"
:description="$tr('learnOnlyDeviceDescription')"
/>
</OnboardingStepBase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
>
<KRadioButton
v-model="selected"
:value="Options.PERSONAL"
:buttonValue="Options.PERSONAL"
:label="$tr('quickStartLabel')"
:description="getCommonSyncString('onMyOwn')"
/>
<KRadioButton
v-model="selected"
:value="Options.PUBLIC"
:buttonValue="Options.PUBLIC"
:label="$tr('advancedSetupLabel')"
:description="$tr('advancedSetupDescription')"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
ref="yesRadio"
v-model="setting"
:label="$tr('yesOptionLabel')"
:value="true"
:buttonValue="true"
/>
<KRadioButton
ref="noRadio"
v-model="setting"
:label="$tr('noOptionLabel')"
:value="false"
:buttonValue="false"
/>
<p class="form">
{{ $tr('changeLater') }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<KRadioButton
v-model="selected"
style="margin-bottom: 1em"
:value="Presets.PERSONAL"
:buttonValue="Presets.PERSONAL"
:label="$tr('onMyOwnLabel')"
:description="getCommonSyncString('onMyOwn')"
/>
<KRadioButton
v-model="selected"
:value="UsePresets.GROUP"
:buttonValue="UsePresets.GROUP"
:label="$tr('groupLearningLabel')"
:description="$tr('groupLearningDescription')"
/>
Expand Down
Loading

0 comments on commit 33e4c76

Please sign in to comment.