This removes `HashedModuleIdsPlugin` from the build pipeline as
we use `WebpackChunkHash` to generate contenthash for each chunk.
This caused hard-to-debug bugs in auspice (and nextstrain.org)
where a hash was being generated from the pre-minified (etc)
bundle contents, but different minification resulted in different
bundle contents. As the bundle name was the same, clients could
use their (out-of-date) cached version, which would result in
a variety of errors in auspice.
This trades off less-than ideal appearence in (default) auspice
for a more appealing nextstrain.org version. In future, the
sidebar theme customisation should be able to define this.
The play / pause / reset buttons were originally placed in the upper left corner of the map to highlight this functionality for Zika and Ebola where animation works well. With emphasis on SARS-CoV-2, we should no longer highlight animation. It doesn't work well for the large SARS-CoV-2 trees.
Placing play / pause / reset under the date slider also helps to show what's actually going on with the animation.
Previously the dataset listing had a row of logos at the bottom as seen on nextstrain.org. This commit swaps these logos for the same "Powered by Nextstrain..." fine print used at the bottom of the main Auspice view. This should work better for forks of Auspice.
This splits the Footer component (Description + Filters) from the FinePrint component (Version, Citation, Download).
This allows showOnlyPanels to keep displaying fine print.
Smoke testing works as intended when running locally, however it
is currently broken on GitHub Actions which causes confusion.
https://github.com/nextstrain/auspice/issues/1215 has been created
to fix this.
The improvements to legend-item filtering introduced in PR #1150 treated genotype like a "normal" coloring, however it is not (currently) possible to get the genotype of a node via `getTraitFromNode`. This resulted in empty legends for genotypes. This commit fixes this by adding a check within the `createVisibleLegendValues` function. A future improvement may be to extend `getTraitFromNode` to be able to return the genotype when appropriate.
* pull/1150:
Clean up whitespace and remove unnecesary array copying
Remove trailing space per eslint
Fix visible legend values calculation delay
fix-loading-race-condition
Modify createVisibleLegendValues to handle second tree and fix null visibility on load
prototype of architecture for dynamically computing visible legend labels
This interprets specific lat/long columns in the CSV/TSV as association a strain with a geographic location. As this approach defines lat-longs _per-sample_ it is orthogonal to Nextstrain's approach (where we associate coords to a metadata trait). The approach employed here is to create a new (dummy) trait whose values represent the unique lat/longs provided.
If a JSON does not define any lat/longs then the appropriate additional metadata will trigger the map to become available (and displayed).
Previously only `<trait>__colour` was valid to specify the
colour hexes, which was chosen to maximise compatability with
MicroReact format files. Here we allow `<trait>__color` to be
used as an alternate spelling.
If both are specified, then `__colour` is used.
This makes behavior consistent with the idea that downloaded data represents the current view. It also prevents a bug when trying to download a temporally scaled tree for a non-temporal dataset.
Clicking on the "Zoom to Selected" button will change the root of the
visible tree to the node of the last common ancestor of the selected
tips.
Note: the button is disabled if the the LCA is the current visible root
node since the display will not change.
In preparation for adding the zoom-to button, return the index of the
node that represents the last common ancestor of the filtered nodes.
If we can't find the last common ancestor for some reason (e.g. the LCA
is not within the current view), the function returns null as default.
Adds an additional dropdown box to allow users to change the attribute used as tip labels. This is similar in design to the branch label drop down.
Currently attributes are limited to the colorings. The function which collects these, `collectAvailableTipLabelOptions` could be easily extended to produce further valid attributes.
This should pave the way for smarter and more customisable logic around _when_ labels are displayed, and the dropdown should not be shown in the situation that labels aren't shown.
For a full description, see #1201Closes#1201