Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • W waterdataui
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Water Mission Area
  • Internet of Water
  • waterdataui
  • Merge requests
  • !707

WDFN-885 - Part 1, refactor to save the cursor x position rather than time offset in the Redux store

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Bucknell, Mary S. requested to merge mbucknell/waterdataui:wdfn-885 into main Jan 25, 2023
  • Overview 1
  • Commits 7
  • Changes 38

Before making a pull request

  • Put the appropriate EXEMPT flag if needed in the MR label (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

As a first step in removing the graph brush and implementing zoom on the time series graph, we decided that the current focus behavior on the time series graph was inconsistent and confusing, particularly when zooming or panning. We had been saving the cursor time offset which is really a calculated value in the store. Rather than do this, we decided to save the X position of the cursor in the Redux store. The behavior is now that when focus is removed from a time series graph, the focus line physically stays in place, regardless of whether the graph is panned or zoomed.

The most substantive changes were in the src/scripts/vue-components which implement the time series tooltips and graph. In some cases, by using the X position, the xScale no longer needed to be passed as a property to the components. I also took this opportunity to but the styling for tooltip focus line and circles directly in the components and removed from the implementation specific vue components.

There will be a second part of this ticket to remove the brush from desktop and implement zoom on all browser widths.

Please note that this MR took out the zoom on mobile temporarily to make this refactor easier to work on. The next MR will put it back in.

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 Jan 25, 2023 by Bucknell, Mary S.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wdfn-885