Commit e128c178 authored by GitLab Bot's avatar GitLab Bot Committed by Enrique Alcantara

Upgrade GitLab UI to v17.8.1

Updates all gl-toggle instances that use outdated attributes.
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34660
parent 4f81918a
<script> <script>
import { GlToggle, GlSprintf } from '@gitlab/ui'; import { GlToggle } from '@gitlab/ui';
import AccessorUtilities from '~/lib/utils/accessor'; import AccessorUtilities from '~/lib/utils/accessor';
import { disableShortcuts, enableShortcuts, shouldDisableShortcuts } from './shortcuts_toggle'; import { disableShortcuts, enableShortcuts, shouldDisableShortcuts } from './shortcuts_toggle';
export default { export default {
components: { components: {
GlSprintf,
GlToggle, GlToggle,
}, },
data() { data() {
...@@ -32,29 +31,10 @@ export default { ...@@ -32,29 +31,10 @@ export default {
<gl-toggle <gl-toggle
v-model="shortcutsEnabled" v-model="shortcutsEnabled"
aria-describedby="shortcutsToggle" aria-describedby="shortcutsToggle"
class="prepend-left-10 mb-0" label="Keyboard shortcuts"
label-position="right" label-position="left"
@change="onChange" @change="onChange"
> />
<template #labelOn>
<gl-sprintf
:message="__('%{screenreaderOnlyStart}Keyboard shorcuts%{screenreaderOnlyEnd} Enabled')"
>
<template #screenreaderOnly="{ content }">
<span class="sr-only">{{ content }}</span>
</template>
</gl-sprintf>
</template>
<template #labelOff>
<gl-sprintf
:message="__('%{screenreaderOnlyStart}Keyboard shorcuts%{screenreaderOnlyEnd} Disabled')"
>
<template #screenreaderOnly="{ content }">
<span class="sr-only">{{ content }}</span>
</template>
</gl-sprintf>
</template>
</gl-toggle>
<div id="shortcutsToggle" class="sr-only">{{ __('Enable or disable keyboard shortcuts') }}</div> <div id="shortcutsToggle" class="sr-only">{{ __('Enable or disable keyboard shortcuts') }}</div>
</div> </div>
</template> </template>
...@@ -198,13 +198,7 @@ export default { ...@@ -198,13 +198,7 @@ export default {
</strong> </strong>
</p> </p>
<div class="form-check form-check-inline mt-3"> <div class="form-check form-check-inline mt-3">
<gl-toggle <gl-toggle v-model="modSecurityEnabled" :disabled="saveButtonDisabled" />
v-model="modSecurityEnabled"
:label-on="__('Enabled')"
:label-off="__('Disabled')"
:disabled="saveButtonDisabled"
label-position="right"
/>
</div> </div>
<div <div
v-if="ingress.modsecurity_enabled" v-if="ingress.modsecurity_enabled"
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
.modal-dialog.modal-lg.modal-1040 .modal-dialog.modal-lg.modal-1040
.modal-content .modal-content
.modal-header .modal-header
%h4.modal-title
= _('Keyboard Shortcuts')
%small
= link_to _('(Show all)'), '#', class: 'js-more-help-button'
.js-toggle-shortcuts .js-toggle-shortcuts
%button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') }
%span{ "aria-hidden": true } &times; %span{ "aria-hidden": true } &times;
......
---
title: Update gl-toggles with deprecated attributes
merge_request: 34660
author:
type: changed
import Vue from 'vue'; import Vue from 'vue';
import { mapState, mapGetters, mapActions } from 'vuex'; import { mapState, mapGetters, mapActions } from 'vuex';
import { GlToggle } from '@gitlab/ui'; import { GlToggle } from '@gitlab/ui';
import { __ } from '~/locale';
import Tracking from '~/tracking'; import Tracking from '~/tracking';
import store from '~/boards/stores'; import store from '~/boards/stores';
...@@ -15,13 +14,6 @@ export default () => ...@@ -15,13 +14,6 @@ export default () =>
computed: { computed: {
...mapState(['isShowingLabels']), ...mapState(['isShowingLabels']),
...mapGetters(['getLabelToggleState']), ...mapGetters(['getLabelToggleState']),
toggleOnLabel() {
return __('Showing all labels');
},
toggleOffLabel() {
return __('Hiding all labels');
},
}, },
methods: { methods: {
...mapActions(['toggleShowLabels']), ...mapActions(['toggleShowLabels']),
...@@ -37,14 +29,10 @@ export default () => ...@@ -37,14 +29,10 @@ export default () =>
}, },
template: ` template: `
<div class="board-labels-toggle-wrapper d-flex align-items-center prepend-left-10"> <div class="board-labels-toggle-wrapper d-flex align-items-center prepend-left-10">
<span id="board-labels-toggle-text" class="text-nowrap">
{{ __('Show labels') }}
</span>
<gl-toggle <gl-toggle
:value="isShowingLabels" :value="isShowingLabels"
class="prepend-left-10 mb-0" label="Show labels"
:label-on="toggleOnLabel" label-position="left"
:label-off="toggleOffLabel"
aria-describedby="board-labels-toggle-text" aria-describedby="board-labels-toggle-text"
data-qa-selector="show_labels_toggle" data-qa-selector="show_labels_toggle"
@change="onToggle" @change="onToggle"
......
...@@ -91,8 +91,8 @@ export default { ...@@ -91,8 +91,8 @@ export default {
id="service-desk-checkbox" id="service-desk-checkbox"
:value="isEnabled" :value="isEnabled"
class="d-inline-block align-middle mr-1" class="d-inline-block align-middle mr-1"
:label-on="__('Service Desk is on')" label="Service desk"
:label-off="__('Service Desk is off')" label-position="left"
@change="onCheckboxToggle" @change="onCheckboxToggle"
/> />
<label class="align-middle" for="service-desk-checkbox"> <label class="align-middle" for="service-desk-checkbox">
......
...@@ -215,13 +215,7 @@ export default { ...@@ -215,13 +215,7 @@ export default {
<h5 class="mt-4">{{ s__('NetworkPolicies|Enforcement status') }}</h5> <h5 class="mt-4">{{ s__('NetworkPolicies|Enforcement status') }}</h5>
<p>{{ s__('NetworkPolicies|Choose whether to enforce this policy.') }}</p> <p>{{ s__('NetworkPolicies|Choose whether to enforce this policy.') }}</p>
<gl-toggle <gl-toggle v-model="selectedPolicy.isEnabled" data-testid="policyToggle" />
v-model="selectedPolicy.isEnabled"
:label-on="__('Enabled')"
:label-off="__('Disabled')"
label-position="right"
data-testid="policyToggle"
/>
</div> </div>
</template> </template>
</gl-drawer> </gl-drawer>
......
...@@ -567,12 +567,6 @@ msgstr "" ...@@ -567,12 +567,6 @@ msgstr ""
msgid "%{retryButtonStart}Try again%{retryButtonEnd} or %{newFileButtonStart}attach a new file%{newFileButtonEnd}" msgid "%{retryButtonStart}Try again%{retryButtonEnd} or %{newFileButtonStart}attach a new file%{newFileButtonEnd}"
msgstr "" msgstr ""
msgid "%{screenreaderOnlyStart}Keyboard shorcuts%{screenreaderOnlyEnd} Disabled"
msgstr ""
msgid "%{screenreaderOnlyStart}Keyboard shorcuts%{screenreaderOnlyEnd} Enabled"
msgstr ""
msgid "%{service_title} %{message}." msgid "%{service_title} %{message}."
msgstr "" msgstr ""
...@@ -735,9 +729,6 @@ msgstr "" ...@@ -735,9 +729,6 @@ msgstr ""
msgid "(No changes)" msgid "(No changes)"
msgstr "" msgstr ""
msgid "(Show all)"
msgstr ""
msgid "(check progress)" msgid "(check progress)"
msgstr "" msgstr ""
...@@ -11778,9 +11769,6 @@ msgstr[1] "" ...@@ -11778,9 +11769,6 @@ msgstr[1] ""
msgid "Hide values" msgid "Hide values"
msgstr "" msgstr ""
msgid "Hiding all labels"
msgstr ""
msgid "High or unknown vulnerabilities present" msgid "High or unknown vulnerabilities present"
msgstr "" msgstr ""
...@@ -12941,9 +12929,6 @@ msgstr "" ...@@ -12941,9 +12929,6 @@ msgstr ""
msgid "Key: %{key}" msgid "Key: %{key}"
msgstr "" msgstr ""
msgid "Keyboard Shortcuts"
msgstr ""
msgid "Keyboard shortcuts" msgid "Keyboard shortcuts"
msgstr "" msgstr ""
...@@ -20565,12 +20550,6 @@ msgstr "" ...@@ -20565,12 +20550,6 @@ msgstr ""
msgid "Service Desk is enabled but not yet active" msgid "Service Desk is enabled but not yet active"
msgstr "" msgstr ""
msgid "Service Desk is off"
msgstr ""
msgid "Service Desk is on"
msgstr ""
msgid "Service Templates" msgid "Service Templates"
msgstr "" msgstr ""
...@@ -20893,9 +20872,6 @@ msgstr "" ...@@ -20893,9 +20872,6 @@ msgstr ""
msgid "Showing all issues" msgid "Showing all issues"
msgstr "" msgstr ""
msgid "Showing all labels"
msgstr ""
msgid "Showing last %{size} of log -" msgid "Showing last %{size} of log -"
msgstr "" msgstr ""
......
...@@ -16,9 +16,7 @@ exports[`Expiration Policy Form renders 1`] = ` ...@@ -16,9 +16,7 @@ exports[`Expiration Policy Form renders 1`] = `
> >
<gl-toggle-stub <gl-toggle-stub
id="expiration-policy-toggle" id="expiration-policy-toggle"
labeloff="Toggle Status: OFF" labelposition="top"
labelon="Toggle Status: ON"
labelposition="hidden"
/> />
<span <span
......
...@@ -47,9 +47,7 @@ exports[`self monitor component When the self monitor project has not been creat ...@@ -47,9 +47,7 @@ exports[`self monitor component When the self monitor project has not been creat
label-for="self-monitor-toggle" label-for="self-monitor-toggle"
> >
<gl-toggle-stub <gl-toggle-stub
labeloff="Toggle Status: OFF" labelposition="top"
labelon="Toggle Status: ON"
labelposition="hidden"
name="self-monitor-toggle" name="self-monitor-toggle"
/> />
</gl-form-group-stub> </gl-form-group-stub>
......
...@@ -843,15 +843,15 @@ ...@@ -843,15 +843,15 @@
eslint-plugin-vue "^6.2.1" eslint-plugin-vue "^6.2.1"
vue-eslint-parser "^7.0.0" vue-eslint-parser "^7.0.0"
"@gitlab/svgs@1.144.0": "@gitlab/svgs@1.139.0":
version "1.144.0" version "1.139.0"
resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.144.0.tgz#ee0ec58516405391cbaef00f5a660da6edf27538" resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.139.0.tgz#8a4874e76000e2dd7d3ed3a8967d62bed47d7ea7"
integrity sha512-ejcsxoyfYwXyG8naOnn7QnY0oxrRNcWRBuH9VHrGL9/FXBJWq2NLXENi+v0TjcWvSsc2fBx/nk5V8Au96g0yEg== integrity sha512-o1KAmQLYL727HodlPHkmj+d+Kdw8OIgHzlKmmPYMzeE+As2l1oz6CTilca56KqXGklOgrouC9P2puMwyX8e/6g==
"@gitlab/ui@17.8.0": "@gitlab/ui@17.8.1":
version "17.8.0" version "17.8.1"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-17.8.0.tgz#187b92634d3b034f036d96238a7c39a5e7f1606b" resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-17.8.1.tgz#78c177f925a1bee97cf891093c0f2e606bbd7c4e"
integrity sha512-BwZY5D6zUilCj9Uh1nhB3VQMHsSwYxMHpz/t4qu1URIwWLeyDuEMxx6CEMT4p1Cir2eWxwxh9AauduPcmRTJPw== integrity sha512-WzJKbX9PgdlbXEVboz1OQ30eLx9/1bOtFCIbZ9/dHEpmRu7sNK/+NlxLnQO+Ls5byAo4xk26Ykv8HDm888J7Vw==
dependencies: dependencies:
"@babel/standalone" "^7.0.0" "@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0" "@gitlab/vue-toasted" "^1.3.0"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment