MagDur Loading - #42
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 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/magDurStatusis'loading'(instead of any non-'idle'state). - Add a conditional danger
Alertto 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 (
useGetContainerPositionref).
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.
elwills
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix condition for loading icon
Add error alert when MagDur requests fail