Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a846c438
Commit
a846c438
authored
Oct 15, 2020
by
Marvin Karegyeya
Committed by
Brandon Labuschagne
Oct 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gldeprecateddropdown to Gldropdown in timezone_ dropdown.vue
parent
a32b94cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
23 deletions
+21
-23
app/assets/javascripts/vue_shared/components/timezone_dropdown.vue
...s/javascripts/vue_shared/components/timezone_dropdown.vue
+13
-20
changelogs/unreleased/Replace-GlDeprecatedDropdown-with-GlDropdown-timezone-dropdown.yml
...lDeprecatedDropdown-with-GlDropdown-timezone-dropdown.yml
+5
-0
spec/frontend/deploy_freeze/components/timezone_dropdown_spec.js
...ontend/deploy_freeze/components/timezone_dropdown_spec.js
+3
-3
No files found.
app/assets/javascripts/vue_shared/components/timezone_dropdown.vue
View file @
a846c438
<
script
>
import
{
GlDropdown
,
GlD
eprecatedDropdownItem
,
GlSearchBoxByType
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlDropdown
,
GlD
ropdownItem
,
GlSearchBoxByType
}
from
'
@gitlab/ui
'
;
import
{
__
}
from
'
~/locale
'
;
import
autofocusonshow
from
'
~/vue_shared/directives/autofocusonshow
'
;
...
...
@@ -7,9 +7,8 @@ export default {
name
:
'
TimezoneDropdown
'
,
components
:
{
GlDropdown
,
GlD
eprecatedD
ropdownItem
,
GlDropdownItem
,
GlSearchBoxByType
,
GlIcon
,
},
directives
:
{
autofocusonshow
,
...
...
@@ -74,29 +73,23 @@ export default {
};
</
script
>
<
template
>
<gl-dropdown
:text=
"value"
block
lazy
menu-class=
"gl-w-full!"
>
<template
#button-content
>
<span
class=
"gl-flex-grow-1"
:class=
"
{ 'gl-text-gray-300': !value }">
{{
selectedTimezoneLabel
}}
</span>
<gl-icon
name=
"chevron-down"
/>
</
template
>
<gl-dropdown
:text=
"selectedTimezoneLabel"
block
lazy
menu-class=
"gl-w-full!"
>
<gl-search-box-by-type
v-model.trim=
"searchTerm"
v-autofocusonshow
autofocus
/>
<gl-d
eprecated-d
ropdown-item
<gl-dropdown-item
v-for=
"timezone in filteredResults"
:key=
"timezone.formattedTimezone"
:is-checked=
"isSelected(timezone)"
:is-check-item=
"true"
@
click=
"selectTimezone(timezone)"
>
<gl-icon
:class=
"{ invisible: !isSelected(timezone) }"
name=
"mobile-issue-close"
class=
"gl-vertical-align-middle"
/>
{{
timezone
.
formattedTimezone
}}
</gl-deprecated-dropdown-item>
<gl-deprecated-dropdown-item
v-if=
"!filteredResults.length"
data-testid=
"noMatchingResults"
>
</gl-dropdown-item>
<gl-dropdown-item
v-if=
"!filteredResults.length"
class=
"gl-pointer-events-none"
data-testid=
"noMatchingResults"
>
{{
$options
.
tranlations
.
noResultsText
}}
</gl-d
eprecated-d
ropdown-item>
</gl-dropdown-item>
</gl-dropdown>
</
template
>
changelogs/unreleased/Replace-GlDeprecatedDropdown-with-GlDropdown-timezone-dropdown.yml
0 → 100644
View file @
a846c438
---
title
:
Replace GlDeprecatedDropdown with GlDropDown in timezone-dropdown.vue
merge_request
:
41434
author
:
nuwe1
type
:
other
spec/frontend/deploy_freeze/components/timezone_dropdown_spec.js
View file @
a846c438
import
Vuex
from
'
vuex
'
;
import
{
shallowMount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
{
GlD
eprecatedD
ropdownItem
,
GlDropdown
}
from
'
@gitlab/ui
'
;
import
{
GlDropdownItem
,
GlDropdown
}
from
'
@gitlab/ui
'
;
import
TimezoneDropdown
from
'
~/vue_shared/components/timezone_dropdown.vue
'
;
import
createStore
from
'
~/deploy_freeze/store
'
;
...
...
@@ -29,8 +29,8 @@ describe('Deploy freeze timezone dropdown', () => {
wrapper
.
setData
({
searchTerm
});
};
const
findAllDropdownItems
=
()
=>
wrapper
.
findAll
(
GlD
eprecatedD
ropdownItem
);
const
findDropdownItemByIndex
=
index
=>
wrapper
.
findAll
(
GlD
eprecatedD
ropdownItem
).
at
(
index
);
const
findAllDropdownItems
=
()
=>
wrapper
.
findAll
(
GlDropdownItem
);
const
findDropdownItemByIndex
=
index
=>
wrapper
.
findAll
(
GlDropdownItem
).
at
(
index
);
afterEach
(()
=>
{
wrapper
.
destroy
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment