Skip to content

Commit

Permalink
110889: Fixed searchevents request containing the query params in the…
Browse files Browse the repository at this point in the history
… clickedObject

Also fixed minor CSS issue in mobile mode where sidebar is still visible

(cherry picked from commit cbe3f2f)
  • Loading branch information
alexandrevryghem committed May 9, 2024
1 parent 0aadcdf commit ae8e0f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/app/shared/sidebar/page-with-sidebar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
<div class="row-with-sidebar row-offcanvas row-offcanvas-left"
[@pushInOut]="(isSidebarCollapsed$ | async) ? 'collapsed' : 'expanded'">
<div id="{{id}}-sidebar-content"
[class.invisible]="(isSidebarCollapsed$ | async) === true && (isXsOrSm$ | async) === true"
class="col-12 col-md-{{sideBarWidth}} sidebar-content {{sidebarClasses | async}}">
<ng-container *ngTemplateOutlet="sidebarContent"></ng-container>
</div>
<div class="col-12 col-md-{{12 - sideBarWidth}}">
<div class="col-12 col-md-{{12 - sideBarWidth}}"
[class.invisible]="(isSidebarCollapsed$ | async) === false && (isXsOrSm$ | async) === true">
<ng-content></ng-content>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/app/statistics/angulartics/dspace-provider.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
import { Angulartics2 } from 'angulartics2';
import { Angulartics2, EventTrack } from 'angulartics2';
import { StatisticsService } from '../statistics.service';

/**
Expand All @@ -23,7 +23,7 @@ export class Angulartics2DSpace {
.subscribe((event) => this.eventTrack(event));
}

private eventTrack(event) {
private eventTrack(event: Partial<EventTrack>): void {
if (event.action === 'page_view') {
this.statisticsService.trackViewEvent(event.properties.object, event.properties.referrer);
} else if (event.action === 'search') {
Expand All @@ -32,7 +32,7 @@ export class Angulartics2DSpace {
event.properties.page,
event.properties.sort,
event.properties.filters,
event.properties.clickedObject,
event.properties.clickedObject?.split('?')[0],
);
}
}
Expand Down

0 comments on commit ae8e0f9

Please sign in to comment.