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: Add loading state for MetricsViewTimerange query #6759

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AdityaHegde
Copy link
Collaborator

@AdityaHegde AdityaHegde commented Feb 25, 2025

closes #6646

We make a call to MetricsViewTimerange API in loader functions. The problem with this is we cannot add a loader state without moving the fetching out of it. While we can handle navigation from non-dashboard to dashboard page a direct visit of a dashboard doesnt start rendering until all layout and page loader functions are run.

Converting the data to promises and awaiting in page component. This also means we dont have to set runtime in layout page.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@AdityaHegde AdityaHegde changed the title fix: Add loading state for MetricsViewTimeange query fix: Add loading state for MetricsViewTimerange query Feb 25, 2025
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.

MetricsViewTimeRange request needs a loading state
1 participant