Skip to content

Commit

Permalink
merge hotfix-9.8.4 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Feb 20, 2025
2 parents 954f940 + 0203310 commit 7bf5198
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 9 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

## [Unreleased]

## [9.8.3] - 2024-02-17
## [9.8.4] - 2025-02-20

### Fixed

- Error when opening corpus chooser in mode with no corpus time data [#434](https://github.com/spraakbanken/korp-frontend/issues/434)

## [9.8.3] - 2025-02-17

### Fixed

Expand Down Expand Up @@ -367,6 +373,7 @@
- Lots of bug fixes for the sidebar

[unreleased]: https://github.com/spraakbanken/korp-frontend/compare/master...dev
[9.8.4]: https://github.com/spraakbanken/korp-frontend/releases/tag/v9.8.4
[9.8.3]: https://github.com/spraakbanken/korp-frontend/releases/tag/v9.8.3
[9.8.2]: https://github.com/spraakbanken/korp-frontend/releases/tag/v9.8.2
[9.8.1]: https://github.com/spraakbanken/korp-frontend/releases/tag/v9.8.1
Expand Down
2 changes: 1 addition & 1 deletion app/markup/about.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="modal-header">
<h2>Korp version 9.8.3</h2>
<h2>Korp version 9.8.4</h2>
<span ng-click="clickX()" class="close-x">×</span>

</div>
Expand Down
18 changes: 14 additions & 4 deletions app/scripts/components/corpus-chooser/corpus-time-graph.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @format */
import angular from "angular"
import angular, { IScope } from "angular"
import range from "lodash/range"
import { Chart } from "chart.js/auto"
import { loc } from "@/i18n"
Expand All @@ -14,12 +14,22 @@ import {
import { html } from "@/util"
import { RootScope } from "@/root-scope.types"

type CorpusTimeGraphScope = IScope & {
isEmpty: boolean
}

angular.module("korpApp").component("corpusTimeGraph", {
template: html`<canvas id="time-graph-chart" height="80"></canvas>`,
template: html`<canvas ng-show="!isEmpty" id="time-graph-chart" height="80"></canvas>`,
controller: [
"$scope",
"$rootScope",
function ($rootScope: RootScope) {
const { min, max } = getSpan()
function ($scope: CorpusTimeGraphScope, $rootScope: RootScope) {
// Abort and render empty if there is no time data in the current mode's corpora.
const span = getSpan()
if (!span) return
$scope.isEmpty = false

const { min, max } = span

const datasetsDated = [
{
Expand Down
3 changes: 2 additions & 1 deletion app/scripts/timeseries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ export function getCountUndatedSelected() {
}

/** Get first and last year in all available corpora. */
export function getSpan() {
export function getSpan(): { min: number; max: number } | undefined {
const timeData = getTimeDataPairs()
if (!timeData.length) return undefined
return { min: timeData[0][0], max: timeData[timeData.length - 1][0] }
}

Expand Down
2 changes: 1 addition & 1 deletion app/styles/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ time-interval {

.corpus-chooser {
max-height: 80vh;
z-index: 9999;
z-index: 900;
border: solid thin #CCCCCC;
overflow-y: auto;
overflow-x: hidden;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "korp-frontend",
"version": "9.8.3",
"version": "9.8.4",
"dependencies": {
"@fontsource/source-sans-pro": "^5.1.0",
"@fortawesome/fontawesome-free": "6.2.1",
Expand Down

0 comments on commit 7bf5198

Please sign in to comment.