diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 25ef74e2..8f1db61d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 15 - name: npm install diff --git a/CHANGELOG.md b/CHANGELOG.md index 39a1cce0..14fe05c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) +## [0.4.10] 2023-11-23 + +### Added + +- Added 'disable_header' config option, to hide GeneNotebook links and display on the landing page + +### Fixed + +- Fixed test CI +- Fixed gene list not re-rendering properly when searching +- Fixed search block on the bottom of the landing page + ## [0.4.9] 2023-11-17 ### Fixed diff --git a/config.json.template b/config.json.template index 3e380878..8abc5b85 100644 --- a/config.json.template +++ b/config.json.template @@ -3,6 +3,7 @@ "disable_blast": false, "disable_user_login": false, "disable_user_registration": false, + "disable_header": false, "blast_link": "", "expression_unit": "My unit", "externalSearch": false, diff --git a/imports/ui/genetable/GeneTableBody.jsx b/imports/ui/genetable/GeneTableBody.jsx index 29258bc7..6c6bb0a2 100644 --- a/imports/ui/genetable/GeneTableBody.jsx +++ b/imports/ui/genetable/GeneTableBody.jsx @@ -236,7 +236,7 @@ function GeneTableBody({ return ( {genes.map((gene) => ( - + ))} ); diff --git a/imports/ui/landingpage/LandingPage.jsx b/imports/ui/landingpage/LandingPage.jsx index 63c14f48..d54015f4 100644 --- a/imports/ui/landingpage/LandingPage.jsx +++ b/imports/ui/landingpage/LandingPage.jsx @@ -4,6 +4,7 @@ import { withTracker } from 'meteor/react-meteor-data'; import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; +import SearchBar from '/imports/ui/main/SearchBar.jsx'; import getQueryCount from '/imports/api/methods/getQueryCount.js'; import { genomeCollection } from '/imports/api/genomes/genomeCollection.js'; @@ -14,9 +15,9 @@ import { import './landingpage.scss'; -function GeneNumber({ _id: genomeId }) { +function GeneNumber({ _id: genomeId, annotationName: annotationName }) { const [geneNumber, setGeneNumber] = useState('...'); - getQueryCount.call({ query: { genomeId } }, (err, res) => { + getQueryCount.call({ query: { genomeId, annotationName } }, (err, res) => { setGeneNumber(res); }); return ( @@ -31,8 +32,8 @@ function Stats({ genomes = [] }) { - - + + @@ -40,23 +41,28 @@ function Stats({ genomes = [] }) { { genomes.map(({ - _id, name, organism, isPublic, - }) => ( - - - - - - - )) + _id, name, isPublic, annotationTrack + }) => { + if (typeof annotationTrack === 'undefined'){ + return [] + } + return annotationTrack.map((annotation) => ( + + + + + + + )) + }) }
NameOrganismGenomeAnnotation Status № genes
{name}{ organism } - { - isPublic - ? Public - : Private - } - - -
{name}{ annotation.name } + { + isPublic + ? Public + : Private + } + + +
@@ -84,7 +90,7 @@ function statsDataTracker() { } function hasNoGenomes({ genomes }) { - return typeof genomes === 'undefined' || genomes.length === 0; + return typeof genomes === 'undefined' || genomes.length === 0 || !genomes.some((genome) => typeof genome.annotationTrack !== 'undefined' && genome.annotationTrack.length > 0);; } function NoGenomes() { @@ -93,21 +99,21 @@ function NoGenomes() { ? (
- Currently no genomes are available + Currently no annotated genomes are available
) : (
- No public genomes are available.  + No public annotated genomes are available.  {! Meteor.settings.public.disable_user_login && ( <> Sign in  to access private data. - + )}
@@ -139,14 +145,18 @@ function LandingPage() { ) } - + return ( <>
+ { !Meteor.settings.public.disable_header && ( + <>

GeneNoteBook

A collaborative notebook for genes and genomes

+ + )}

Through this site you can browse and query data for the following genomes: @@ -157,7 +167,7 @@ function LandingPage() { !Meteor.userId() && (

- {! (Meteor.settings.public.disable_user_login === true || Meteor.settings.public.disable_user_registration === true) && ( + {! (Meteor.settings.public.disable_user_login === true || Meteor.settings.public.disable_user_registration === true) && (
) } @@ -233,15 +245,9 @@ function LandingPage() {
- Search genes by their attributes, such as GO-terms, - protein domains or manual annotations. -
-
- -
+ @@ -269,7 +275,7 @@ function LandingPage() {
BLAST your protein or DNA sequence to genome annotations.
-
+
{blastLink}
diff --git a/imports/ui/main/SearchBar.jsx b/imports/ui/main/SearchBar.jsx index 7aeba315..eeda42b0 100644 --- a/imports/ui/main/SearchBar.jsx +++ b/imports/ui/main/SearchBar.jsx @@ -51,6 +51,7 @@ function SearchBar({ searchString: initialSearchString, attributes, highLightSearch, + isBlock }) { const [redirect, setRedirect] = useState(false); const [searchString, setSearchString] = useState(initialSearchString); @@ -128,9 +129,13 @@ function SearchBar({ let label = Meteor.settings.public.externalSearch ? "Select attributes to display" : "Select attributes to search" let display_attr = Meteor.settings.public.redirectSearch ? false : true + const className = isBlock ? "" : "navbar-item is-pulled-right" + const size = isBlock ? "" : "is-small" + const expanded = isBlock ? "is-expanded" : "" + return (
@@ -139,7 +144,7 @@ function SearchBar({
-
} -
+
setSearchString(event.target.value)} @@ -182,7 +187,7 @@ function SearchBar({ />
-
diff --git a/package.json b/package.json index ddeab903..595b0675 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "genoboo", - "version": "0.4.9", + "version": "0.4.10", "repository": "https://github.com/gogepp/genoboo", "description": "A portable website for browsing and querying genome sequences and annotations. Forked from genenotebook", "license": "AGPL-3.0",