Skip to content

Commit

Permalink
Merge pull request #244 from wtsi-npg/devel
Browse files Browse the repository at this point in the history
Merge Release 2.4.0
  • Loading branch information
nerdstrike authored Oct 17, 2024
2 parents 797e5ff + aa2f9fb commit 723b0d8
Show file tree
Hide file tree
Showing 10 changed files with 157 additions and 132 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Referenced from:
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
39 changes: 0 additions & 39 deletions .github/workflows/deploy-pages.yml

This file was deleted.

11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [2.4.0] - 2024-10-17

### Added

* Added .github/dependabot.yml file to auto-update GitHub actions
* Clickable icon next to run names to change to the view of all wells in that run

### Removed

* Retired publishing of OpenAPI docs to Github page. It has been broken for more than a year.

## [2.3.0] - 2024-07-30

### Added
Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "npg-longue-vue",
"version": "2.3.0",
"version": "2.4.0",
"description": "UI for LangQC",
"author": "Kieron Taylor <[email protected]>",
"license": "GPL-3.0-or-later",
Expand Down
10 changes: 6 additions & 4 deletions frontend/src/components/WellTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
* Renders a table for a list of wells and generates buttons for selecting wells
*/
import { combineLabelWithPlate, listStudiesForTooltip } from "../utils/text.js"
import { ElTooltip, ElButton } from "element-plus";
import { ElTooltip, ElButton } from "element-plus"
import { Top } from "@element-plus/icons-vue"
const tooltipDelay = 500
const studyNameHighlight = 'BIOSCAN UK for flying insects'
defineProps({
wellCollection: Object
wellCollection: Object,
allowNav: Boolean,
})
defineEmits(['wellSelected'])
defineEmits(['wellSelected', 'runSelected'])
</script>

<template>
Expand All @@ -30,7 +32,7 @@ defineEmits(['wellSelected'])
<th>Well time complete</th>
</tr>
<tr :key="wellObj.id_product" v-for="wellObj in wellCollection">
<td :id="wellObj.run_name">{{ wellObj.run_name }}</td>
<td :id="wellObj.run_name">{{ wellObj.run_name }}<el-icon v-if="allowNav" :size="10" v-on:click="$emit('runSelected', wellObj.run_name)"><Top /></el-icon></td>
<td class="well_selector">
<el-tooltip placement="top" effect="light" :show-after="tooltipDelay"
:content="'<span>'.concat(listStudiesForTooltip(wellObj.study_names)).concat('</span>')"
Expand Down
11 changes: 11 additions & 0 deletions frontend/src/components/__tests__/WellTable.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,15 @@ describe('Rows of data give rows in the table', () => {
expect(wellButton.classes('el-tooltip__trigger')).toBeTruthy()
expect(wellButton.classes('el-button--warning')).toBeTruthy()
})

test('No run selection icons appear by default', () => {
expect(() => table.get('el-icon')).toThrowError()
})

test('Setting allowNav property causes buttons to appear', async () => {
await table.setProps({'allowNav': true})
let icon = table.get('el-icon')
await icon.trigger('click')
expect(table.emitted().runSelected[0][0]).toEqual('TEST1')
})
})
6 changes: 5 additions & 1 deletion frontend/src/views/WellsByStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ function updateUrlQuery(newParams) {
}
}
function showRun(runName) {
router.push({ name: 'WellsByRun', params: { runName: [runName] } })
}
onMounted(() => {
// If there are no query properties in the URL, we can "redirect" to a
// sensible default
Expand All @@ -141,7 +145,7 @@ onMounted(() => {
<template>
<el-tabs v-model="activeTab" type="border-card" @tab-change="clickTabChange">
<el-tab-pane v-for="tab in appConfig.qc_flow_statuses" :key="tab.param" :label="tab.label" :name="tab.param">
<WellTable :wellCollection="wellCollection" @wellSelected="updateUrlQuery"/>
<WellTable allowNav :wellCollection="wellCollection" @wellSelected="updateUrlQuery" @runSelected="showRun"/>
</el-tab-pane>
<el-pagination v-model:currentPage="activePage" layout="prev, pager, next" v-bind:total="totalNumberOfWells"
background :pager-count="5" :page-size="pageSize" :hide-on-single-page="true"
Expand Down
Loading

0 comments on commit 723b0d8

Please sign in to comment.