Skip to content

Add loading feedback to git changes refresh button #12209

@amanape

Description

@amanape

Problem

When clicking the refresh button in the Changes tab, there is no visual feedback indicating that the git changes API is being called. Users have no way to know if their click was registered or if data is being fetched, which can lead to confusion and repeated clicks.

Expected Behavior

The refresh button should provide clear visual feedback when a refresh is in progress. The button should appear in a loading state and prevent additional clicks until the current fetch completes.

Acceptance Criteria

  • The refresh icon should spin while the git changes API request is in progress.
  • The button should be disabled during loading to prevent multiple simultaneous requests.
  • The button should have a visually distinct appearance when disabled, such as reduced opacity.
  • Consider using isFetching from TanStack Query rather than isLoading, since isLoading only applies to the initial load while isFetching covers refetch scenarios. (see https://stackoverflow.com/questions/75401477/reasons-for-using-isloading-or-isfetching-in-react-query)

Relevant Files

Metadata

Metadata

Assignees

No one assigned

    Labels

    UI/UXRelated to user interface and user experienceenhancementNew feature or requestfrontendgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions