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

Influenza page #271

Merged
merged 30 commits into from
Mar 11, 2021
Merged

Influenza page #271

merged 30 commits into from
Mar 11, 2021

Commits on Mar 11, 2021

  1. fetch sars catalogue from s3 & refactor component;

    this fetches the sars-cov-2 build catalogue from
    s3 instead of using a local version.
    
    it also refactors the react components behind
    /sars-cov-2 to be more flexible for other pathogen
    pages like /influenza.
    eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    824978b View commit details
    Browse the repository at this point in the history
  2. rename static-site/src/components/sars-cov-2;

    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.
    eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    4d18952 View commit details
    Browse the repository at this point in the history
  3. generalize builds component;

    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.
    eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    f63ecd7 View commit details
    Browse the repository at this point in the history
  4. create /influenza page;

    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.
    eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    0e9621a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b4648fa View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    433d83a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4373c37 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    59b9f91 View commit details
    Browse the repository at this point in the history
  9. refactor /sars-cov-2 & /influenza components;

    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.
    eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    4eaaa44 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    d4ea065 View commit details
    Browse the repository at this point in the history
  11. restructure influenza build catalogue;

    1: Flatten hierarchy in anticipation of
    flatter UI.
    
    2:
    Manually add properties for easy parsing
    in react. The long-term solution here will
    be to generate things like this by parsing
    build URLs in collect-pathogen-resources.js
    eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    9795c6f View commit details
    Browse the repository at this point in the history
  12. filterable flat build listing;

    this offers an alternative way to
    list builds that is more flexible -
    listing them in a flat (non-hierarchical)
    interface that can be filtered.
    The listing can easily be converted
    into a table or other.
    
    see #62 (comment)
    for more details
    eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    b364c25 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    4e606b2 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    8f79e51 View commit details
    Browse the repository at this point in the history
  15. influenza build catalogue staging url;

    to be changed back. just so we can
    test in dev apps on github PRs etc
    eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    7230959 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    4de28a6 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    fcb0f56 View commit details
    Browse the repository at this point in the history
  18. Select influenza datasets via keywords

    This commit streamlines the dataset selection UI to use generic keywords from filenames. Principally, it:
    1. Creates a new light weight collect-datasets.js script from collect-pathogen-resources.js that provisions datasets_influenza.json
    2. Modifies influenza.jsx to use this dataset listing
    3. Creates a new DatasetSelect component from FilterBuilds that filters by keyword and that implements some row styling
    trvrb authored and eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    20b2193 View commit details
    Browse the repository at this point in the history
  19. Fix dataset listing URL

    trvrb authored and eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    5f8c0c6 View commit details
    Browse the repository at this point in the history
  20. Improve layout of dataset selection

    This uses react-styled-flexboxgrid for a responsive grid layout. We use Bootstrap elsewhere in nextstrain.org to accomplish a similar outcome, however, Bootstrap css and className="col-md-1" don't interact well with the use of styled-components. Here, I've opted for a Flexbox solution. This adds a dependency to package.json, but allows for an easy, expressive grid and I think should be generally useful. I compared a few similar options for this and this one was my favorite.
    trvrb authored and eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    ee8263d View commit details
    Browse the repository at this point in the history
  21. Update dependencies

    trvrb authored and eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    552546b View commit details
    Browse the repository at this point in the history
  22. Improve mobile styling

    trvrb authored and eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    c6742eb View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    fac1875 View commit details
    Browse the repository at this point in the history
  24. flu catalogue cron job;

    update https://data.nextstrain.org/datasets_influenza.json
    every 5 minutes with s3 flu datasets
    eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    763fadc View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    5db2299 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    bba165e View commit details
    Browse the repository at this point in the history
  27. remove manually curated influenza catalogue;

    #279 gives more flexibility by depending
    on the output of scripts/collect-datasets.js
    instead and using a more scalable UI
    eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    087168c View commit details
    Browse the repository at this point in the history
  28. sort dataset filter options

    eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    eee8c82 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    108033f View commit details
    Browse the repository at this point in the history
  30. use local file for sars-cov-2 build list;

    an earlier commit on this branch changed
    this component to fetch the sars-cov-2
    builds catalogue that backs /sars-cov-2
    from s3. This changes back to the original
    way of using a local YAML file instead,
    because we are holding off on the s3
    implementation for now.
    eharkins committed Mar 11, 2021
    Configuration menu
    Copy the full SHA
    4b02212 View commit details
    Browse the repository at this point in the history