Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Frontend
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
402
Merge Requests
55
CI / CD
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Commits
14fa8c1b
Commit
14fa8c1b
authored
39 minutes ago
by
Olivia Madrid
Browse files
Options
Download
(refactor): change dropdownv2 to filter and pass tests
parent
4bcdec41
generic-dropdown-2209
1 merge request
!662
Generic dropdown component
Pipeline
#97746670
running with stages
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
52 additions
and
75 deletions
+52
-75
src/app/common/common.module.ts
View file @
14fa8c1b
...
...
@@ -121,7 +121,7 @@ import { PageLayoutComponent } from './components/page-layout/page-layout.compon
import
{
DashboardLayoutComponent
}
from
'
./components/dashboard-layout/dashboard-layout.component
'
;
import
{
ShadowboxLayoutComponent
}
from
'
./components/shadowbox-layout/shadowbox-layout.component
'
;
import
{
ShadowboxHeaderComponent
}
from
'
./components/shadowbox-header/shadowbox-header.component
'
;
import
{
DropdownV2Component
}
from
'
./components/dropdown-v2/dropdown-v2
.component
'
;
import
{
FilterComponent
}
from
'
./components/filter/filter
.component
'
;
PlotlyModule
.
plotlyjs
=
PlotlyJS
;
...
...
@@ -233,7 +233,7 @@ PlotlyModule.plotlyjs = PlotlyJS;
DashboardLayoutComponent
,
ShadowboxLayoutComponent
,
ShadowboxHeaderComponent
,
DropdownV2
Component
,
Filter
Component
,
],
exports
:
[
MINDS_PIPES
,
...
...
@@ -329,7 +329,7 @@ PlotlyModule.plotlyjs = PlotlyJS;
PageLayoutComponent
,
DashboardLayoutComponent
,
ShadowboxLayoutComponent
,
DropdownV2
Component
,
Filter
Component
,
],
providers
:
[
SiteService
,
...
...
This diff is collapsed.
src/app/common/components/dropdown-v2/dropdown-v2.component.spec.ts
deleted
100644 → 0
View file @
4bcdec41
import
{
async
,
ComponentFixture
,
TestBed
}
from
'
@angular/core/testing
'
;
import
{
DropdownV2Component
}
from
'
./dropdown-v2.component
'
;
describe
(
'
DropdownV2Component
'
,
()
=>
{
let
component
:
DropdownV2Component
;
let
fixture
:
ComponentFixture
<
DropdownV2Component
>
;
beforeEach
(
async
(()
=>
{
TestBed
.
configureTestingModule
({
declarations
:
[
DropdownV2Component
],
}).
compileComponents
();
}));
beforeEach
(()
=>
{
fixture
=
TestBed
.
createComponent
(
DropdownV2Component
);
component
=
fixture
.
componentInstance
;
fixture
.
detectChanges
();
});
it
(
'
should create
'
,
()
=>
{
expect
(
component
).
toBeTruthy
();
});
});
This diff is collapsed.
src/app/common/components/
dropdown-v2/dropdown-v2
.component.html
→
src/app/common/components/
filter/filter
.component.html
View file @
14fa8c1b
<div
class=
"m-
dropdownV2
__labelWrapper"
*ngIf=
"showLabel"
>
<div
class=
"m-
filter
__labelWrapper"
*ngIf=
"showLabel"
>
<span>
{{ filter.label }}
</span>
<m-tooltip
icon=
"help"
>
<div>
{{ filter?.description }}
</div>
...
...
@@ -13,7 +13,7 @@
</m-tooltip>
</div>
<div
class=
"m-
dropdownV2
__wrapper"
class=
"m-
filter
__wrapper"
[ngClass]=
"{
expanded: expanded,
dropUp: dropUp
...
...
@@ -21,17 +21,17 @@
(blur)=
"expanded = false"
tabindex=
"0"
>
<div
class=
"m-
dropdownV2
__header"
(click)=
"expanded = !expanded"
>
<span
class=
"m-
dropdownV2
__option"
>
<div
class=
"m-
filter
__header"
(click)=
"expanded = !expanded"
>
<span
class=
"m-
filter
__option"
>
{{ selectedOption.label }}
</span>
<i
class=
"material-icons"
*ngIf=
"!expanded"
>
keyboard_arrow_down
</i>
<i
class=
"material-icons"
*ngIf=
"expanded"
>
keyboard_arrow_up
</i>
</div>
<div
class=
"m-
dropdownV2
__optionsContainer"
>
<div
class=
"m-
filter
__optionsContainer"
>
<ng-container
*ngFor=
"let option of filter.options"
>
<div
class=
"m-
dropdownV2
__option"
class=
"m-
filter
__option"
(click)=
"updateFilter(option)"
[ngClass]=
"{
unavailable: option.available === false
...
...
This diff is collapsed.
src/app/common/components/
dropdown-v2/dropdown-v2
.component.scss
→
src/app/common/components/
filter/filter
.component.scss
View file @
14fa8c1b
$rounded-top
:
3px
3px
0
0
;
$rounded-bottom
:
0
0
3px
3px
;
m-
dropdownV2
{
m-
filter
{
position
:
relative
;
margin
:
0
24px
36px
0
;
z-index
:
2
;
display
:
block
;
}
.m-
dropdownV2
__labelWrapper
{
.m-
filter
__labelWrapper
{
position
:
absolute
;
bottom
:
115%
;
white-space
:
nowrap
;
...
...
@@ -45,7 +45,7 @@ m-dropdownV2 {
}
}
.m-
dropdownV2
__wrapper
{
.m-
filter
__wrapper
{
cursor
:
pointer
;
&
:focus
{
...
...
@@ -56,31 +56,31 @@ m-dropdownV2 {
@include
m-theme
()
{
box-shadow
:
0px
1px
15px
0
rgba
(
themed
(
$m-black
)
,
0
.15
);
}
.m-
dropdownV2
__header
{
.m-
filter
__header
{
@include
m-theme
()
{
border-color
:
themed
(
$m-blue
);
}
}
.m-
dropdownV2
__optionsContainer
{
.m-
filter
__optionsContainer
{
display
:
block
;
}
&
:not
(
.dropUp
)
{
.m-
dropdownV2
__header
{
.m-
filter
__header
{
@include
m-theme
()
{
border-radius
:
$rounded-top
;
}
}
.m-
dropdownV2
__optionsContainer
{
.m-
filter
__optionsContainer
{
border-top
:
none
;
border-radius
:
$rounded-bottom
;
}
}
&
.dropUp
{
.m-
dropdownV2
__header
{
.m-
filter
__header
{
border-radius
:
$rounded-bottom
;
}
.m-
dropdownV2
__optionsContainer
{
.m-
filter
__optionsContainer
{
bottom
:
100%
;
border-radius
:
$rounded-top
;
border-bottom
:
none
;
...
...
@@ -97,7 +97,7 @@ m-dropdownV2 {
}
}
.m-
dropdownV2
__header
{
.m-
filter
__header
{
position
:
relative
;
border-radius
:
3px
;
transition
:
all
0
.3s
cubic-bezier
(
0
.23
,
1
,
0
.32
,
1
);
...
...
@@ -109,7 +109,7 @@ m-dropdownV2 {
@include
m-theme
()
{
border
:
1px
solid
themed
(
$m-grey-100
);
}
.m-
dropdownV2
__label
{
.m-
filter
__label
{
margin-right
:
10px
;
}
i
{
...
...
@@ -118,14 +118,14 @@ m-dropdownV2 {
height
:
24px
;
padding-top
:
2px
;
}
.m-
dropdownV2
__option
{
.m-
filter
__option
{
@include
m-theme
()
{
color
:
themed
(
$m-grey-500
);
}
}
}
.m-
dropdownV2
__optionsContainer
{
.m-
filter
__optionsContainer
{
box-sizing
:
border-box
;
position
:
absolute
;
display
:
none
;
...
...
@@ -139,7 +139,7 @@ m-dropdownV2 {
box-shadow
:
0px
8px
16px
0px
rgba
(
themed
(
$m-black
)
,
0
.15
);
}
.m-
dropdownV2
__option
{
.m-
filter
__option
{
&
:hover:not
(
.unavailable
)
{
@include
m-theme
()
{
color
:
themed
(
$m-grey-500
);
...
...
@@ -155,13 +155,13 @@ m-dropdownV2 {
}
}
.m-
dropdownV2
__header
{
.m-
filter
__header
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
padding-right
:
10px
;
}
.m-
dropdownV2
__option
{
.m-
filter
__option
{
display
:
inline-block
;
padding
:
10px
20px
;
box-sizing
:
border-box
;
...
...
@@ -184,8 +184,8 @@ m-dropdownV2 {
}
@media
screen
and
(
max-width
:
$min-tablet
)
{
m-
dropdownV2
{
.m-
dropdownV2
__labelWrapper
{
m-
filter
{
.m-
filter
__labelWrapper
{
.m-tooltip--bubble
{
width
:
120px
;
}
...
...
@@ -194,19 +194,19 @@ m-dropdownV2 {
}
@media
screen
and
(
max-width
:
$max-mobile
)
{
m-
dropdownV2
{
.m-
dropdownV2
__wrapper
{
m-
filter
{
.m-
filter
__wrapper
{
>
*
{
width
:
160px
;
}
.m-
dropdownV2
__header
{
.m-
filter
__header
{
padding-right
:
10px
;
i
{
display
:
none
;
}
}
.m-
dropdownV2
__optionsContainer
{
.m-
dropdownV2
__option
{
.m-
filter
__optionsContainer
{
.m-
filter
__option
{
&
:first-child
{
padding-top
:
11px
;
}
...
...
@@ -215,7 +215,7 @@ m-dropdownV2 {
}
}
}
.m-
dropdownV2
__option
{
.m-
filter
__option
{
margin-right
:
0
;
padding
:
8px
18px
;
}
...
...
This diff is collapsed.
src/app/common/components/
dropdown-v2/dropdown-v2
.component.ts
→
src/app/common/components/
filter/filter
.component.ts
View file @
14fa8c1b
...
...
@@ -11,11 +11,11 @@ import { Session } from '../../../services/session';
import
{
Filter
,
Option
}
from
'
../../../interfaces/dashboard
'
;
@
Component
({
selector
:
'
m-
dropdownV2
'
,
templateUrl
:
'
./
dropdown-v2
.component.html
'
,
selector
:
'
m-
filter
'
,
templateUrl
:
'
./
filter
.component.html
'
,
changeDetection
:
ChangeDetectionStrategy
.
OnPush
,
})
export
class
DropdownV2
Component
implements
OnInit
{
export
class
Filter
Component
implements
OnInit
{
@
Input
()
filter
:
Filter
;
@
Input
()
dropUp
:
boolean
=
false
;
@
Input
()
showLabel
:
boolean
=
true
;
...
...
This diff is collapsed.
src/app/modules/analytics/v2/components/filters/filters.component.html
View file @
14fa8c1b
<div
class=
"m-analytics__filtersContainer"
>
<ng-container
*ngFor=
"let filter of filters"
>
<m-dropdownV2
class=
"filter"
<m-filter
[filter]=
"filter"
[dropUp]=
"true"
(selectionMade)=
"selectionMade($event)"
></m-
dropdownV2
>
></m-
filter
>
</ng-container>
</div>
This diff is collapsed.
src/app/modules/analytics/v2/dashboard.component.html
View file @
14fa8c1b
...
...
@@ -16,14 +16,14 @@
<m-analytics__search></m-analytics__search>
</div> -->
<!-- <div class="m-analyticsDashboard__channelFilter" *ngIf="session.isAdmin()">
<m-
dropdownV2 [filter]="channelFilter"></m-dropdownV2
>
<m-
filter [filter]="channelFilter"></m-filter
>
</div> -->
<div
class=
"m-analyticsDashboard__timespanFilter"
>
<m-
dropdownV2
<m-
filter
[filter]=
"timespanFilter"
[showLabel]=
"false"
(selectionMade)=
"filterSelectionMade($event)"
></m-
dropdownV2
>
></m-
filter
>
</div>
</div>
</ng-container>
...
...
This diff is collapsed.
src/app/modules/analytics/v2/dashboard.component.scss
View file @
14fa8c1b
...
...
@@ -30,10 +30,10 @@ m-analytics__dashboard {
}
}
}
m-
dropdownV2
{
m-
filter
{
margin
:
0
;
}
.m-
dropdownV2
__wrapper
{
.m-
filter
__wrapper
{
>
*
{
width
:
180px
;
}
...
...
@@ -56,11 +56,11 @@ m-analytics__dashboard {
@media
screen
and
(
max-width
:
$min-tablet
)
{
.m-dashboardLayout__header
{
m-
dropdownV2
{
m-
filter
{
margin
:
0
16px
8px
0
;
.m-
dropdownV2
__wrapper
{
.m-
filter
__wrapper
{
>
*
{
width
:
1
6
0px
;
width
:
1
8
0px
;
}
}
}
...
...
@@ -72,9 +72,11 @@ m-analytics__dashboard {
@media
screen
and
(
max-width
:
$max-mobile
)
{
.m-dashboardLayout__header
{
.m-dropdownV2__wrapper
{
>
*
{
width
:
140px
;
m-filter
{
.m-filter__wrapper
{
>
*
{
width
:
160px
;
}
}
}
}
...
...
This diff is collapsed.
src/app/modules/payments/btc/settings.component.html
View file @
14fa8c1b
<form
class=
"m-form"
>
<p>
You can receive Bitcoin (BTC) payments via wire by inputing a receiver
You can receive Bitcoin (BTC) payments via wire by input
t
ing a receiver
address below. Note: You may want to rotate this address frequently to avoid
3rd parties tracking your transactions.
</p>
...
...
This diff is collapsed.
Please
register
or
sign in
to comment