From a6f1db824110454a0dbd465133c466b61ddc3ff6 Mon Sep 17 00:00:00 2001 From: MisRob Date: Wed, 14 Feb 2024 09:27:11 +0100 Subject: [PATCH] Upgrade to KDS v3.0.0 and reference npm package - Upgrades KDS from somewhere in the middle of v3.0.0 commits to v3.0.0. Includes Kolibri code updates related to the breaking change in regards to value --> buttonValue renaming. See KDS v3.0.0 release notes https://github.com/learningequality/kolibri-design-system/releases/tag/v3.0.0 - Uses npm package to install KDS --- .../core/assets/src/views/UserTable/index.vue | 2 +- .../LanguageSwitcherModal.vue | 2 +- .../src/views/sync/RadioButtonGroup.vue | 2 +- .../SelectDeviceForm.vue | 4 +- .../src/views/sync/SelectSyncSourceModal.vue | 4 +- kolibri/core/package.json | 2 +- .../plan/CreateExamPage/CreateExamPreview.vue | 4 +- .../plan/CreateExamPage/SectionEditor.vue | 4 +- .../plan/assignments/AssignmentCopyModal.vue | 2 +- .../plan/assignments/RecipientSelector.vue | 2 +- .../PrimaryStorageLocationModal.vue | 2 +- .../RemoveStorageLocationModal.vue | 2 +- .../__test__/DeviceSettingsPage.spec.js | 4 +- .../src/views/DeviceSettingsPage/index.vue | 14 +++---- .../FacilitiesPage/CreateNewFacilityModal.vue | 4 +- .../SelectTransferSourceModal/DriveList.vue | 2 +- .../SelectImportSourceModal.vue | 6 +-- .../assets/src/views/UserCreatePage.vue | 4 +- .../assets/src/views/UserEditPage.vue | 4 +- .../LanguagesMenuItem.vue | 2 +- .../assets/src/views/JoinOrNewLOD.vue | 4 +- .../CreateLearnerAccountForm.vue | 4 +- .../FacilityPermissionsForm.vue | 4 +- .../FullOrLearnOnlyDeviceForm.vue | 4 +- .../onboarding-forms/GettingStartedForm.vue | 4 +- .../onboarding-forms/GuestAccessForm.vue | 4 +- .../HowAreYouUsingKolibri.vue | 4 +- .../RequirePasswordForLearnersForm.vue | 4 +- .../SetUpLearningFacilityForm.vue | 4 +- .../src/views/onboarding-forms/YesNoForm.vue | 4 +- .../views/ChangeFacility/SelectFacility.vue | 2 +- .../MeteredConnectionNotificationModal.vue | 4 +- packages/kolibri-core-for-export/package.json | 2 +- yarn.lock | 37 +++++++++---------- 34 files changed, 77 insertions(+), 80 deletions(-) diff --git a/kolibri/core/assets/src/views/UserTable/index.vue b/kolibri/core/assets/src/views/UserTable/index.vue index d5aca01adff..e50d9bb651c 100644 --- a/kolibri/core/assets/src/views/UserTable/index.vue +++ b/kolibri/core/assets/src/views/UserTable/index.vue @@ -107,7 +107,7 @@ diff --git a/kolibri/core/package.json b/kolibri/core/package.json index f10c6f3ca30..d65362bd81d 100644 --- a/kolibri/core/package.json +++ b/kolibri/core/package.json @@ -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", diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateExamPreview.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateExamPreview.vue index be1d0f70071..dfa62de3be4 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateExamPreview.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/CreateExamPreview.vue @@ -78,13 +78,13 @@ v-model="fixedOrder" :label="coachString('orderRandomLabel')" :description="coachString('orderRandomDescription')" - :value="false" + :buttonValue="false" /> diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionEditor.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionEditor.vue index 1b994ffc582..f3c76ca92a9 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionEditor.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/SectionEditor.vue @@ -86,7 +86,7 @@ @@ -98,7 +98,7 @@ diff --git a/kolibri/plugins/coach/assets/src/views/plan/assignments/AssignmentCopyModal.vue b/kolibri/plugins/coach/assets/src/views/plan/assignments/AssignmentCopyModal.vue index 505673420c1..107a71c4efe 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/assignments/AssignmentCopyModal.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/assignments/AssignmentCopyModal.vue @@ -14,7 +14,7 @@ :key="classroom.id" v-model="selectedClassroomId" :label="classroomLabel(classroom)" - :value="classroom.id" + :buttonValue="classroom.id" data-test="radio-button" /> diff --git a/kolibri/plugins/coach/assets/src/views/plan/assignments/RecipientSelector.vue b/kolibri/plugins/coach/assets/src/views/plan/assignments/RecipientSelector.vue index d959d983680..775c80a6f7c 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/assignments/RecipientSelector.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/assignments/RecipientSelector.vue @@ -3,7 +3,7 @@
diff --git a/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/RemoveStorageLocationModal.vue b/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/RemoveStorageLocationModal.vue index e96fbcb9faa..d4b8d094e70 100644 --- a/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/RemoveStorageLocationModal.vue +++ b/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/RemoveStorageLocationModal.vue @@ -15,7 +15,7 @@ v-for="path in storageLocations" :key="path.index" v-model="selectedPath" - :value="path" + :buttonValue="path" :label="path" /> diff --git a/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/__test__/DeviceSettingsPage.spec.js b/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/__test__/DeviceSettingsPage.spec.js index 50d0e053e17..6db3a810df8 100644 --- a/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/__test__/DeviceSettingsPage.spec.js +++ b/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/__test__/DeviceSettingsPage.spec.js @@ -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); } diff --git a/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/index.vue b/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/index.vue index a556f040411..09cdef63893 100644 --- a/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/index.vue +++ b/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/index.vue @@ -70,14 +70,14 @@ @@ -85,7 +85,7 @@ diff --git a/kolibri/plugins/device/assets/src/views/FacilitiesPage/CreateNewFacilityModal.vue b/kolibri/plugins/device/assets/src/views/FacilitiesPage/CreateNewFacilityModal.vue index ad6a8a394c2..9c9fa3400c8 100644 --- a/kolibri/plugins/device/assets/src/views/FacilitiesPage/CreateNewFacilityModal.vue +++ b/kolibri/plugins/device/assets/src/views/FacilitiesPage/CreateNewFacilityModal.vue @@ -21,14 +21,14 @@ diff --git a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue index b93943f5a0f..2e28604faee 100644 --- a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue +++ b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/DriveList.vue @@ -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)" /> diff --git a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/SelectImportSourceModal.vue b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/SelectImportSourceModal.vue index 5ffdd179f0d..fbc0f737a6c 100644 --- a/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/SelectImportSourceModal.vue +++ b/kolibri/plugins/device/assets/src/views/ManageContentPage/SelectTransferSourceModal/SelectImportSourceModal.vue @@ -9,7 +9,7 @@ diff --git a/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue b/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue index f608b6c1779..f48c3fe6ad7 100644 --- a/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue +++ b/kolibri/plugins/facility/assets/src/views/UserCreatePage.vue @@ -54,14 +54,14 @@ :disabled="busy" :label="coreString('classCoachLabel')" :description="coreString('classCoachDescription')" - :value="true" + :buttonValue="true" /> diff --git a/kolibri/plugins/facility/assets/src/views/UserEditPage.vue b/kolibri/plugins/facility/assets/src/views/UserEditPage.vue index efb7db4dcf4..8c4be5d5d98 100644 --- a/kolibri/plugins/facility/assets/src/views/UserEditPage.vue +++ b/kolibri/plugins/facility/assets/src/views/UserEditPage.vue @@ -64,14 +64,14 @@ :disabled="formDisabled" :label="coreString('classCoachLabel')" :description="coreString('classCoachDescription')" - :value="true" + :buttonValue="true" /> diff --git a/kolibri/plugins/media_player/assets/src/views/MediaPlayerLanguages/LanguagesMenuItem.vue b/kolibri/plugins/media_player/assets/src/views/MediaPlayerLanguages/LanguagesMenuItem.vue index 8fb004c063b..cc690e9d9ac 100644 --- a/kolibri/plugins/media_player/assets/src/views/MediaPlayerLanguages/LanguagesMenuItem.vue +++ b/kolibri/plugins/media_player/assets/src/views/MediaPlayerLanguages/LanguagesMenuItem.vue @@ -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')" diff --git a/kolibri/plugins/setup_wizard/assets/src/views/JoinOrNewLOD.vue b/kolibri/plugins/setup_wizard/assets/src/views/JoinOrNewLOD.vue index 4e0889d05c8..a38a08aa3a4 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/JoinOrNewLOD.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/JoinOrNewLOD.vue @@ -8,14 +8,14 @@ diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/CreateLearnerAccountForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/CreateLearnerAccountForm.vue index 92a32e6753d..de67c7eca29 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/CreateLearnerAccountForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/CreateLearnerAccountForm.vue @@ -14,7 +14,7 @@ v-model="setting" class="radio-button" :label="$tr('yesOptionLabel')" - :value="true" + :buttonValue="true" :autofocus="setting" />

diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FacilityPermissionsForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FacilityPermissionsForm.vue index a88a0e8ac16..65924dfbce2 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FacilityPermissionsForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FacilityPermissionsForm.vue @@ -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')" /> @@ -24,7 +24,7 @@ diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FullOrLearnOnlyDeviceForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FullOrLearnOnlyDeviceForm.vue index 652e0adfa1b..0bc2747d1cd 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FullOrLearnOnlyDeviceForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/FullOrLearnOnlyDeviceForm.vue @@ -7,14 +7,14 @@ diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GettingStartedForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GettingStartedForm.vue index 6d213b07de5..d97fe186200 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GettingStartedForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GettingStartedForm.vue @@ -6,13 +6,13 @@ > diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GuestAccessForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GuestAccessForm.vue index 4cbd0fe69ac..bc9a4268cfc 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GuestAccessForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/GuestAccessForm.vue @@ -14,14 +14,14 @@ ref="yesRadio" v-model="setting" :label="$tr('yesOptionLabel')" - :value="true" + :buttonValue="true" :autofocus="setting" />

diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/HowAreYouUsingKolibri.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/HowAreYouUsingKolibri.vue index 6f58f0f6be0..9e5c3de6dd5 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/HowAreYouUsingKolibri.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/HowAreYouUsingKolibri.vue @@ -9,14 +9,14 @@

diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/SetUpLearningFacilityForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/SetUpLearningFacilityForm.vue index 9552aff93d0..f06a8eeea07 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/SetUpLearningFacilityForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/SetUpLearningFacilityForm.vue @@ -8,14 +8,14 @@ diff --git a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/YesNoForm.vue b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/YesNoForm.vue index f608d5e7eee..1b87a0afe3d 100644 --- a/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/YesNoForm.vue +++ b/kolibri/plugins/setup_wizard/assets/src/views/onboarding-forms/YesNoForm.vue @@ -10,13 +10,13 @@ ref="yesRadio" v-model="setting" :label="yesOptionLabel" - :value="true" + :buttonValue="true" /> diff --git a/kolibri/plugins/user_profile/assets/src/views/ChangeFacility/SelectFacility.vue b/kolibri/plugins/user_profile/assets/src/views/ChangeFacility/SelectFacility.vue index 658616f774d..d3ae9478646 100644 --- a/kolibri/plugins/user_profile/assets/src/views/ChangeFacility/SelectFacility.vue +++ b/kolibri/plugins/user_profile/assets/src/views/ChangeFacility/SelectFacility.vue @@ -23,7 +23,7 @@ diff --git a/packages/kolibri-common/components/MeteredConnectionNotificationModal.vue b/packages/kolibri-common/components/MeteredConnectionNotificationModal.vue index 8465b954c8a..e4d498d0165 100644 --- a/packages/kolibri-common/components/MeteredConnectionNotificationModal.vue +++ b/packages/kolibri-common/components/MeteredConnectionNotificationModal.vue @@ -13,14 +13,14 @@ diff --git a/packages/kolibri-core-for-export/package.json b/packages/kolibri-core-for-export/package.json index 306c5c210b7..27f5c4edd53 100644 --- a/packages/kolibri-core-for-export/package.json +++ b/packages/kolibri-core-for-export/package.json @@ -24,7 +24,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.0", "lockr": "0.8.5", "lodash": "^4.17.21", "loglevel": "^1.8.1", diff --git a/yarn.lock b/yarn.lock index 229180690c9..853040efc97 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2311,6 +2311,15 @@ aphrodite@1.1.0: asap "^2.0.3" inline-style-prefixer "^2.0.0" +"aphrodite@git+https://github.com/learningequality/aphrodite.git": + version "2.2.3" + uid fdc8d7be8912a5cf17f74ff10f124013c52c3e32 + resolved "git+https://github.com/learningequality/aphrodite.git#fdc8d7be8912a5cf17f74ff10f124013c52c3e32" + dependencies: + asap "^2.0.3" + inline-style-prefixer "^4.0.2" + string-hash "^1.1.3" + "aphrodite@https://github.com/learningequality/aphrodite/": version "2.2.3" resolved "https://github.com/learningequality/aphrodite/#fdc8d7be8912a5cf17f74ff10f124013c52c3e32" @@ -4320,7 +4329,7 @@ data-urls@^3.0.2: whatwg-mimetype "^3.0.0" whatwg-url "^11.0.0" -date-fns@^1.28.2: +date-fns@^1.28.2, date-fns@^1.30.1: version "1.30.1" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== @@ -7641,29 +7650,16 @@ kolibri-constants@0.2.0: resolved "https://registry.yarnpkg.com/kolibri-constants/-/kolibri-constants-0.2.0.tgz#47c9d773894e23251ba5ac4db420822e45603142" integrity sha512-WYDMGDzB9gNxRbpX1O2cGe1HrJvLvSZGwMuAv6dqrxJgPf7iO+Hi40/1CXjHM7nk5CRt+hn5bqnMzCBmj1omPA== -"kolibri-design-system@https://github.com/learningequality/kolibri-design-system#0ed2f274b1bc3808218a4d3f526c181b96b32c6d": - version "1.3.0" - resolved "https://github.com/learningequality/kolibri-design-system#0ed2f274b1bc3808218a4d3f526c181b96b32c6d" - dependencies: - aphrodite "https://github.com/learningequality/aphrodite/" - autosize "^3.0.21" - css-element-queries "^1.2.0" - frame-throttle "^3.0.0" - fuzzysearch "^1.0.3" - keen-ui "^1.3.0" - lodash "^4.17.15" - popper.js "^1.14.6" - purecss "^0.6.2" - tippy.js "^4.2.1" - vue-intl "^3.1.0" - -"kolibri-design-system@https://github.com/learningequality/kolibri-design-system#v2.0.0": - version "1.3.0" - resolved "https://github.com/learningequality/kolibri-design-system#13e539592fd87508cd32f60e4ad22c1ec320559b" +kolibri-design-system@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/kolibri-design-system/-/kolibri-design-system-3.0.0.tgz#35b462bbf6a73260efb39651f05ae907b91afad9" + integrity sha512-Q2ma6oZCoPtTHMmi+XkrXdsxEfukG9RLRaTxL1hAyHZLBT359RLX/mg76IcsX1kogxI/Px04NDsMpDeqS9ro3Q== dependencies: + "@vue/composition-api" "^1.7.2" aphrodite "https://github.com/learningequality/aphrodite/" autosize "^3.0.21" css-element-queries "^1.2.0" + date-fns "^1.30.1" frame-throttle "^3.0.0" fuzzysearch "^1.0.3" keen-ui "^1.3.0" @@ -7672,6 +7668,7 @@ kolibri-constants@0.2.0: purecss "^0.6.2" tippy.js "^4.2.1" vue-intl "^3.1.0" + xstate "^4.38.3" launch-editor-middleware@^2.6.1: version "2.6.1"