Skip to content

Commit

Permalink
wc: Initial implementation of horizontal filters #TASK-7216 #TASK-7100
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjuanes committed Jan 16, 2025
1 parent 6afc3dc commit 02b9bd6
Showing 1 changed file with 35 additions and 18 deletions.
53 changes: 35 additions & 18 deletions src/webcomponents/variant/variant-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {guardPage} from "../commons/html-utils.js";
import LitUtils from "../commons/utils/lit-utils.js";
import WebUtils from "../commons/utils/web-utils.js";
import "./variant-browser-filter.js";
import "./variant-browser-horizontal-filter.js";
import "./variant-browser-grid.js";
import "./variant-browser-detail.js";
import "../commons/opencb-facet-results.js";
Expand Down Expand Up @@ -343,7 +344,7 @@ export default class VariantBrowser extends LitElement {
.rightContent="${this.renderHeaderRightContent()}">
</tool-header>
<div class="row">
<div class="col-2 mb-3">
<div class="col-2 mb-3 d-none">
<div class="d-grid gap-2 mb-3 cy-search-button-wrapper">
<button type="button" class="btn btn-primary btn-block" ?disabled="${!this.searchActive}" @click="${this.onRun}">
<i class="fa fa-search mx-1" aria-hidden="true"></i>
Expand Down Expand Up @@ -383,27 +384,43 @@ export default class VariantBrowser extends LitElement {
</div>
</div>
<div class="col-md-10">
<div class="col-md-12">
<div>
<opencga-active-filters
facetActive
resource="VARIANT"
.toolId="${this.COMPONENT_ID }"
.opencgaSession="${this.opencgaSession}"
.defaultStudy="${this.opencgaSession.study?.fqn}"
<div class="d-none">
<opencga-active-filters
facetActive
resource="VARIANT"
.toolId="${this.COMPONENT_ID }"
.opencgaSession="${this.opencgaSession}"
.defaultStudy="${this.opencgaSession.study?.fqn}"
.query="${this.preparedQuery}"
.executedQuery="${this.executedQuery}"
.facetQuery="${this.preparedFacetQueryFormatted}"
.executedFacetQuery="${this.executedFacetQueryFormatted}"
.alias="${this._config.filter.activeFilters.alias}"
.filters="${this._config.filter.examples}"
.defaultFilter="${this._config.filter.defaultFilter}"
.config="${this._config.filter.activeFilters}"
@activeFacetChange="${this.onActiveFacetChange}"
@activeFacetClear="${this.onActiveFacetClear}"
@activeFilterChange="${this.onActiveFilterChange}"
@activeFilterClear="${this.onActiveFilterClear}">
</opencga-active-filters>
</div>
<variant-browser-horizontal-filter
.resource="${"VARIANT"}"
.toolId="${this.COMPONENT_ID || ""}"
.opencgaSession=${this.opencgaSession}
.query="${this.preparedQuery}"
.executedQuery="${this.executedQuery}"
.facetQuery="${this.preparedFacetQueryFormatted}"
.executedFacetQuery="${this.executedFacetQueryFormatted}"
.alias="${this._config.filter.activeFilters.alias}"
.cellbaseClient="${this.cellbaseClient}"
.filters="${this._config.filter.examples}"
.defaultFilter="${this._config.filter.defaultFilter}"
.config="${this._config.filter.activeFilters}"
@activeFacetChange="${this.onActiveFacetChange}"
@activeFacetClear="${this.onActiveFacetClear}"
@activeFilterChange="${this.onActiveFilterChange}"
@activeFilterClear="${this.onActiveFilterClear}">
</opencga-active-filters>
.searchActive="${this.searchActive}"
.config="${this._config.filter}"
@queryChange="${this.onQueryFilterChange}"
@querySearch="${this.onVariantFilterSearch}">
</variant-browser-horizontal-filter>
<div class="main-view">
<div id="table-tab" class="${this.activeTab === "table-tab" ? "d-block" : "d-none"}">
Expand Down

0 comments on commit 02b9bd6

Please sign in to comment.