Skip to content

Commit 694f0e6

Browse files
authored
Close facet groups on click out instead of hover out. Resolves #1169.
1 parent 95fdc88 commit 694f0e6

19 files changed

+214
-152
lines changed

spa/src/app/files/facet/facet-menu-content/facet-menu-content.component.html

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<ng-content></ng-content>

spa/src/app/files/facet/facet-menu-content/facet-menu-content.component.scss renamed to spa/src/app/files/facet/facet-menu-option-content/facet-menu-option-content.component.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
@import "../../../site/theme/cgl.vars";
99

1010
/* Facet widget wrapper */
11-
.facet-content {
11+
:host {
12+
display: block;
1213
margin: 8px -8px 0;
1314
max-height: 229.5px; /* For display of 8.5 terms at 229.5px total */
1415
-ms-overflow-style: none; // IE 10+, scrollbar hidden

spa/src/app/files/facet/facet-menu-content/facet-menu-content.component.ts renamed to spa/src/app/files/facet/facet-menu-option-content/facet-menu-option-content.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
import { Component } from "@angular/core";
1111

1212
@Component({
13-
selector: "facet-menu-content",
14-
templateUrl: "./facet-menu-content.component.html",
15-
styleUrls: ["./facet-menu-content.component.scss"],
13+
selector: "facet-menu-option-content",
14+
templateUrl: "./facet-menu-option-content.component.html",
15+
styleUrls: ["./facet-menu-option-content.component.scss"],
1616
})
17-
export class FacetMenuContentComponent {
17+
export class FacetMenuOptionContentComponent {
1818
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<ng-content></ng-content>

spa/src/app/files/facet/facet-menu-title/facet-menu-title.component.scss renamed to spa/src/app/files/facet/facet-menu-option-title/facet-menu-option-title.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@import "../../../site/theme/cgl.vars";
88

99
/* Facet menu title */
10-
.facet-menu-title {
10+
:host {
1111
align-items: flex-start;
1212
border-bottom: 1px solid $hca-gray-lightest;
1313
display: flex;

spa/src/app/files/facet/facet-menu-title/facet-menu-title.component.ts renamed to spa/src/app/files/facet/facet-menu-option-title/facet-menu-option-title.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
import { Component } from "@angular/core";
1010

1111
@Component({
12-
selector: "facet-menu-title",
13-
templateUrl: "./facet-menu-title.component.html",
14-
styleUrls: ["./facet-menu-title.component.scss"],
12+
selector: "facet-menu-option-title",
13+
templateUrl: "./facet-menu-option-title.component.html",
14+
styleUrls: ["./facet-menu-option-title.component.scss"],
1515
})
16-
export class FacetMenuTitleComponent {
16+
export class FacetMenuOptionTitleComponent {
1717
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<ng-content></ng-content>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*!
2+
* Human Cell Atlas
3+
* https://www.humancellatlas.org/
4+
*
5+
* Styles or displaying a facet's title and widget (term selector, age range selector) when contained
6+
* inside a menu.
7+
*/
8+
9+
:host {
10+
display: flex; /* Scroll content */
11+
flex-direction: column; /* Scroll content */
12+
padding: 18px;
13+
width: 180px;
14+
}
15+
16+
/* Facet - organism age range */
17+
:host-context(.organism-age-range) {
18+
width: 282px; /* Min width for facet organism age range */
19+
}
20+
21+
/* Double wide facet */
22+
:host-context(.facet-double-wide) {
23+
width: 396px;
24+
}
25+
26+
/**
27+
* HCA specific breakpoint
28+
*/
29+
@media screen and (min-width: 1200px) {
30+
31+
:host {
32+
width: 220px;
33+
}
34+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Human Cell Atlas
3+
* https://www.humancellatlas.org/
4+
*
5+
* Component responsible for displaying a facet's title and widget (term selector, age range selector) when contained
6+
* inside a menu.
7+
*/
8+
9+
// Core dependencies
10+
import { Component } from "@angular/core";
11+
12+
@Component({
13+
selector: "facet-menu-option",
14+
templateUrl: "./facet-menu-option.component.html",
15+
styleUrls: ["./facet-menu-option.component.scss"],
16+
})
17+
export class FacetMenuOptionComponent {
18+
}

0 commit comments

Comments
 (0)