Skip to content

MagDur Loading - #42

Merged
prestoncraw merged 1 commit into
mainfrom
MagDurChartLoading
Sep 9, 2026
Merged

MagDur Loading#42
prestoncraw merged 1 commit into
mainfrom
MagDurChartLoading

Conversation

@prestoncraw

Copy link
Copy Markdown
Contributor

Fix condition for loading icon
Add error alert when MagDur requests fail

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes are small, consistent with existing component usage patterns (e.g., Alert Class='alert-danger'), and correctly align the UI states with the widget’s fetch status values.

Pull request overview

This PR adjusts the DynamicMagDurChart widget’s request-state UI so the loading indicator only displays during active fetches and the widget surfaces an error alert when either the event-data request or the MagDur-curve request fails.

Changes:

  • Update the loading icon condition to show only when status/magDurStatus is 'loading' (instead of any non-'idle' state).
  • Add a conditional danger Alert to display a clear failure message when event data and/or magnitude-duration curves fail to load.
  • Wrap the chart content in a flex child container used for sizing/layout (useGetContainerPosition ref).
File summaries
File Description
TSX/CollectionWidget/DynamicMagDurChart/DynamicMagDurChart.tsx Fix loading spinner visibility logic and add error alert UI for failed MagDur/event fetches.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@prestoncraw
prestoncraw merged commit abe4bbb into main Sep 9, 2026
1 of 2 checks passed
@prestoncraw
prestoncraw deleted the MagDurChartLoading branch September 9, 2026 14:45
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.

3 participants