Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hierarchical dataset select UI #276

Closed
wants to merge 21 commits into from
Closed

Hierarchical dataset select UI #276

wants to merge 21 commits into from

Conversation

eharkins
Copy link
Contributor

starting to try to make @jameshadfield's sketch (#62 (comment)) a reality

creates an augmented version of
static-site/content/allSARS-CoV-2Builds.yaml
by fetching the actual datasets
to get information about them such
as date updated and number of
tips to be displayed on the build
listing and map.
building on:
081bd55633133e586a3dae86617564e1f2854418
, which fetched community datasets listed
in static-site/content/allSARS-CoV-2Builds.yaml
in order to augment that list with metadata.
This takes the fetched community datasets
and includes them in the sarscov2 search
results database file. Still to-do is testing
this on the front end.
scripts/collect-search-results.js reads in a
list of builds in a manually maintained pathogen
build catalogue yaml file such as
static-site/content/allSARS-CoV-2Builds.yaml
and produces an augmented version with metadata
from each corresponding dataset.
(see 82e072d).
That augmented yaml file is stored on s3 and
fetched here to populate e.g the build-map
(front-end manisfestation of that pathogen build
catalogue on the page) with metadata about each
dataset (e.g. date updated).
this makes this component more
generally applicable for when we
want to have similar build catalogues
for other pathogens
we have a couple of scripts that are
utilities for creating and checking the
format of data resources behind pages
like nextstrain.org/sars-cov-2. This
generalizes the code in those scripts
so that they make sense when we
apply them to other pathogens in
the future
also update the github action using
scripts/collect-pathogen-resources.js

also note that upon merging this we
will need to update a link in the following
doc:
https://docs.nextstrain.org/en/latest/guides/share/sars-cov-2.html ;
the link points to:
scripts/check-sars-cov-2-builds-yaml.js
which is now called:
scripts/check-build-catalogue-yaml.js
this takes the augmenting of the build
catalogue and abstracts it into a function
fixes bug when running for seasonal-flu
introduced by work on this script. Better
logic overall for writing outputs and
printing messages
this directory contains components
which are now generally applicable
to any page that wants to display a
collection of info about any grouping
of builds (e.g. flu, groups, commeunity),
not just for sars-cov-2.
in anticipation of using it for any listing of
builds, not specific to sars-cov-2. This
picks up where that left off in
anticipation of using it for a flu builds
page. Specifically this commit allows
the build hierarchy to be defined by custom
field names in a build catalogue yaml (e.g.
static-site/content/allSARS-CoV-2Builds.yaml)
. These field names are passed to the builds
component so it can create the hierarchy
according to them.
This creates a page at /influenza
analogous to /sars-cov-2 but for flu.
Note that this page isn't called /flu
because of conflict with existing redirects.
In addition to creating a useful hub for
gathering resources about flu, this can
serve as an example of how it should
hopefully now be easier to create more
pages like this that show off all that
Nextstrain has to offer on a particular
pathogen or topic spanning pathogens
(e.g.  a /groups page that lists all
nextstrain groups and links to docs
about groups etc). In many cases
these pages can serve as a way to
dedicate more UI real estate to some
things or sections we show off on the
splash page and offer a more customized
landing page for a particular topic.
Decouple build map from build dropdown
menu. Remove spacers and non-specific
stuff from specific components like
hierarchical dropdown menu and sit-rep
listing. Decouple fetching of build
catalogue from dropdown menu.
@tsibley tsibley temporarily deployed to nextstrain-s-flexible-d-pldawb February 18, 2021 23:29 Inactive
@eharkins eharkins temporarily deployed to nextstrain-s-flexible-d-pldawb February 18, 2021 23:55 Inactive
@eharkins
Copy link
Contributor Author

Will want to allow custom variable names if we go with this implementation and we want to display the key and value in a filtering component like in auspice:
Screen Shot 2021-02-18 at 4 42 35 PM

since having variable1 -> h3n2 would be better as pathogen -> h3n2 or something more descriptive.

@eharkins eharkins changed the title Flexible dataset UI Hierarchical dataset select UI Feb 26, 2021
@jameshadfield jameshadfield temporarily deployed to nextstrain-s-flexible-d-teb5ks March 4, 2021 01:39 Inactive
Base automatically changed from influenza-page to master March 11, 2021 23:55
@eharkins eharkins closed this Apr 8, 2021
@eharkins eharkins deleted the flexible-dataset-ui branch April 8, 2021 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants