Skip to content

WDFN-770: Reorganized the monitoring-location/hydrograph to have a single vue-component

Bucknell, Mary S. requested to merge mbucknell/waterdataui:wdfn-770 into main

Before making a pull request

  • Put the appropriate EXEMPT flag if needed in the MR title (see https://practices.wma.chs.usgs.gov/practice/peer_code_review/)
  • Run all linters (make lint)
  • Run all tests (make test)
  • Update the changelog appropriately
  • If making a release, update code.json metadataLastUpdated and bump CHANGELOG.md to next version.

Description

Removed all the separate Vue apps within monitoring-location/hydrograph into one. As a result, the monitoring-location/components/hydrograph/index.js has only the data fetching code and mounts the VUe app. Moved all of the rendering of the hydrograph component to HydrographApp from the TimeSeriesComponent in the components.html macro. This included the no-data-overlay and the loading indicators where added to the HydrographApp. I added a LoadingIndicator component to vue-components. We should be able to reuse this in the dv-hydrograph. Also fixed what is displayed when showOnlyGraph so that only the time series graph and legend are rendered.

When we finish converting the monitoring-location rendering to Vue we will want to reconsider whether we want to continue with this pattern of "attachNode" to these components defined in the macro or whether we want to do something that is more Vue like.

Also reorganized all of the D3 line and tooltip drawing code into a directory, monitoring-location/components/hydrograph/d3.

After making a pull request

  • If appropriate, put the link to the PR in the JIRA ticket
  • Assign someone to review unless the change is trivial
  • Check the accessibility CI step and fix or explain any issues.
Edited by Bucknell, Mary S.

Merge request reports