Skip to content

Commit

Permalink
wc: Add grid notifications in variant browser #TASK-7216 #TASK-7100
Browse files Browse the repository at this point in the history
  • Loading branch information
jmjuanes committed Jan 8, 2025
1 parent 60011fc commit 0269765
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/webcomponents/variant/variant-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ import UtilsNew from "../../core/utils-new.js";
import VariantUtils from "./variant-utils.js";
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-grid.js";
import "./variant-browser-detail.js";
import "../commons/opencb-facet-results.js";
import "../commons/facet-filter.js";
import "../commons/opencga-active-filters.js";
import "../commons/tool-header.js";
import "../commons/grid-notifications.js";
import "./annotation/cellbase-variant-annotation-summary.js";
import "./annotation/variant-consequence-type-view.js";
import "./annotation/cellbase-population-frequency-grid.js";
Expand Down Expand Up @@ -96,6 +98,7 @@ export default class VariantBrowser extends LitElement {
this.preparedFacetQueryFormatted = {};
this.errorState = false;
this.variant = null;
this.notifications = [];

this.activeTab = "table-tab";
this._config = this.getDefaultConfig();
Expand Down Expand Up @@ -197,6 +200,7 @@ export default class VariantBrowser extends LitElement {
onRun() {
this.executedQuery = {...this.preparedQuery};
this.searchActive = false;
this.notifications = [];
this.variant = null;
this.notifySearch(this.preparedQuery);

Expand Down Expand Up @@ -272,7 +276,8 @@ export default class VariantBrowser extends LitElement {
this.onRun();
}

onQueryComplete() {
onQueryComplete(event) {
this.notifications = WebUtils.getResponseEvents(event.detail.response);
this.searchActive = true;
this.requestUpdate();
}
Expand Down Expand Up @@ -313,11 +318,11 @@ export default class VariantBrowser extends LitElement {
</button>
`)}
<div class="w-px bg-gray-200"></div>
<grid-notifications
.notifications="${this.notifications || []}">
</grid-notifications>
<button class="btn btn-light">
<i class="fa fa-bell"></i>
</button>
<button class="btn btn-light">
<i class="fa fa-help-circle"></i>
<i class="fa fa-question-circle"></i>
</button>
</div>
`;
Expand Down

0 comments on commit 0269765

Please sign in to comment.