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

fix(FE): fix the timestamp reduction issue when attempting to reduce the timestamp via drag #6435

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Aarif5435
Copy link

@Aarif5435 Aarif5435 commented Nov 13, 2024

Fix: Timestamp Update on Zoom for Graph Data Refresh

Description

This PR resolves an issue with the timestamp update on zoom for graph data in the application. Previously, when attempting to zoom in on the graph by dragging, the timeRange was not included in the requestedData, causing the useMemo hook to recognize the requestedData as unchanged. As a result, the post-request function to fetch new data was not triggered, and the graph failed to refresh. The graph data would only update when the timestamp was manually adjusted from the dropdown selection.

Changes Made

  • Added timeRange to the requestedData when zooming in on the graph.
  • Ensured that every time the graph is zoomed, the updated timestamp range is dispatched and triggers a re-fetch of data.

Issue

In the attached video, the timestamp reduction on the graph does not refresh correctly upon zoom. The graph only reloads when using the station selection, leading to a poor user experience when trying to zoom. This issue persisted for three days, where initial adjustments worked, but further attempts failed.

Testing

  • Verified that zooming via drag now includes timeRange in requestedData.
  • Confirmed that the graph data refreshes as expected on each zoom action without requiring a dropdown timestamp change.

Screenshot

Screen.Recording.2024-11-13.at.5.mp4

Notes

This fix will improve the responsiveness of the graph by ensuring real-time data updates on zoom, providing a more seamless user experience.


Important

Fixes graph data refresh issue on zoom by adding timeRange to requestedData in NewWidget.

  • Behavior:
    • Fixes issue where graph data did not refresh on zoom by adding timeRange to requestedData in NewWidget.
    • Ensures useMemo triggers data re-fetch on zoom by including minTime and maxTime.
  • Testing:
    • Verified timeRange is included in requestedData on zoom.
    • Confirmed graph refreshes correctly on zoom without dropdown adjustment.

This description was created by Ellipsis for b177594. It will automatically update as commits are pushed.

@CLAassistant
Copy link

CLAassistant commented Nov 13, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to b177594 in 36 seconds

More details
  • Looked at 30 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. frontend/src/container/NewWidget/index.tsx:350
  • Draft comment:
    Consider adding 'selectedGraph' to the dependency array of this useMemo to ensure it updates when 'selectedGraph' changes.
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. frontend/src/container/NewWidget/index.tsx:88
  • Draft comment:
    Avoid using the component/index.tsx file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_0jsQBXB261kpGDoD


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@makeavish makeavish linked an issue Nov 15, 2024 that may be closed by this pull request
@makeavish makeavish requested a review from a team November 15, 2024 08:21
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.

Time zoom in via drag doesn't work in edit mode
2 participants