Skip to content

feat: show loading spinner and success states on user profile and imp…#1462

Open
Kartikupadhyay44 wants to merge 1 commit into
OpenBeta:developfrom
Kartikupadhyay44:develop
Open

feat: show loading spinner and success states on user profile and imp…#1462
Kartikupadhyay44 wants to merge 1 commit into
OpenBeta:developfrom
Kartikupadhyay44:develop

Conversation

@Kartikupadhyay44

Copy link
Copy Markdown

…ort modal (#590)


name: Pull request
about: Create a pull request
title: ''
labels: ''
assignees: ''


What type of PR is this?(check all applicable)

  • refactor
  • feature
  • bug fix
  • documentation
  • optimization
  • other

Description

Related Issues

Issue #590

What this PR achieves

This PR fixes the abrupt closing behavior of the Mountain Project import modal and provides clear asynchronous feedback to the user during data ingestion.

  • Asynchronous Feedback: Leveraged the internal loading state within getTicks() to trigger an active loading screen.
  • Tailwind Spinner UI: Rendered an animate-spin circle element paired with text ("Fetching ticks from Mountain Project...") while the background network request is active.
  • Stateful Success Layout: Introduced an importedCount state tracker to display a clean completion card inside the modal upon successful data fetching, including explicit navigation links and safe closure handlers.
  • Robust UX Control: Conditionally disabled Escape-key dismissals (closeOnEsc={!loading}) during active network transport to prevent truncated mutations.
  • Test Coverage: Added new test configurations inside ImportFromMtnProj.test.tsx ensuring full mocking validation for both active spinner rendering and final success layouts.

Screenshots, recordings

Notes

All unit tests and ts-standard lint checks pass successfully locally. The Next.js production build compiles perfectly without errors.

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.

1 participant