Skip to content

Commit

Permalink
Migrate to codex checkbox (#770)
Browse files Browse the repository at this point in the history
Bug: T347200
  • Loading branch information
hasanakg committed Nov 22, 2023
1 parent 94647d7 commit 9eb617f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
23 changes: 14 additions & 9 deletions resources/js/Pages/Results.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,11 @@
<li>{{ $i18n('confirmation-dialog-message-tip-2') }}</li>
<li>{{ $i18n('confirmation-dialog-message-tip-3') }}</li>
</ul>
<checkbox class="disable-confirmation"
:label="$i18n('confirmation-dialog-option-label')"
:checked.sync="disableConfirmation"
/>
<cdx-checkbox class="disable-confirmation"
v-model="disableConfirmation"
>
{{ $i18n('confirmation-dialog-option-label') }}
</cdx-checkbox>
</cdx-dialog>
</div>
</template>
Expand All @@ -136,11 +137,9 @@
import { useStore } from '../store';
import isEmpty from 'lodash/isEmpty';
import { Head as InertiaHead } from '@inertiajs/inertia-vue3';
import {
Link as WikitLink,
Checkbox } from '@wmde/wikit-vue-components';
import { Link as WikitLink } from '@wmde/wikit-vue-components';
import { CdxButton, CdxIcon, CdxDialog, CdxMessage } from "@wikimedia/codex";
import { CdxButton, CdxIcon, CdxDialog, CdxMessage, CdxCheckbox } from "@wikimedia/codex";
import { cdxIconInfo, cdxIconArrowPrevious } from '@wikimedia/codex-icons';
import LoadingOverlay from '../Components/LoadingOverlay.vue';
Expand All @@ -150,6 +149,12 @@
import { defineComponent } from 'vue';
import axios from 'axios';
// Run it with compat mode
// https://v3-migration.vuejs.org/breaking-changes/v-model.html
CdxCheckbox.compatConfig = {
...CdxCheckbox.compatConfig,
COMPONENT_V_MODEL: false,
};
interface MismatchDecision {
id: number,
item_id: string,
Expand Down Expand Up @@ -191,7 +196,7 @@
LoadingOverlay,
MismatchesTable,
WikitLink,
Checkbox,
CdxCheckbox,
CdxDialog,
CdxButton,
CdxIcon,
Expand Down
2 changes: 1 addition & 1 deletion tests/Browser/Pages/ResultsPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function elements()
'@confirmation-dialog' => '#results-confirmation-dialog',
'@disable-confirmation' => '.disable-confirmation',
'@error-section' => '#error-section',
'@disable-confirmation-label' => '.disable-confirmation>.wikit-checkbox__label'
'@disable-confirmation-label' => '.disable-confirmation>.cdx-checkbox__label'
];
}

Expand Down

0 comments on commit 9eb617f

Please sign in to comment.