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

Upgrade to KDS v3.0.0 and reference npm package #11873

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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#0ed2f274b1bc3808218a4d3f526c181b96b32c6d",
"kolibri-design-system": "~3.0.0",
"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 @@ -86,7 +86,7 @@
<KRadioButton
v-model="selectedQuestionOrder"
:label="randomizedLabel$()"
:value="true"
:buttonValue="true"
:description="randomizedOptionDescription$()"
/>
</KGridItem>
Expand All @@ -98,7 +98,7 @@
<KRadioButton
v-model="selectedQuestionOrder"
:label="fixedLabel$()"
:value="false"
:buttonValue="false"
:description="fixedOptionDescription$()"
/>
</KGridItem>
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 @@ -21,14 +21,14 @@
<KRadioButton
v-model="preset"
class="permission-preset-radio-button"
:value="Presets.NONFORMAL"
:buttonValue="Presets.NONFORMAL"
:label="$tr('nonFormalLabel')"
:description="$tr('nonFormalDescription')"
/>
<KRadioButton
v-model="preset"
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 @@ -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,14 +8,14 @@
<KRadioButton
v-model="selected"
:label="$tr('joinFacilityLabel')"
:value="Options.JOIN"
:buttonValue="Options.JOIN"
class="radio-button"
:autofocus="isJoinSetup"
/>
<KRadioButton
v-model="selected"
:label="$tr('importFromFacilityLabel')"
:value="Options.IMPORT"
:buttonValue="Options.IMPORT"
class="radio-button"
:autofocus="isImportSetup"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
v-model="setting"
class="radio-button"
:label="$tr('yesOptionLabel')"
:value="true"
:buttonValue="true"
:autofocus="setting"
/>
<KRadioButton
ref="noRadio"
v-model="setting"
class="radio-button"
:label="$tr('noOptionLabel')"
:value="false"
:buttonValue="false"
:autofocus="!setting"
/>
<p class="description">
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,14 +7,14 @@
<KRadioButton
v-model="selected"
:label="$tr('fullDeviceLabel')"
:value="Options.FULL"
:buttonValue="Options.FULL"
:description="$tr('fullDeviceDescription')"
:autofocus="isFullSetup"
/>
<KRadioButton
v-model="selected"
:label="$tr('learnOnlyDeviceLabel')"
:value="Options.LOD"
:buttonValue="Options.LOD"
:description="$tr('learnOnlyDeviceDescription')"
:autofocus="isLODSetup"
/>
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
Loading
Loading