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

Show loading icon on buttons during edit project API requests #4693

Merged
merged 1 commit into from
May 28, 2021
Merged

Show loading icon on buttons during edit project API requests #4693

merged 1 commit into from
May 28, 2021

Conversation

NatashaKSS
Copy link
Contributor

@NatashaKSS NatashaKSS commented May 28, 2021

Description

This adds the loading indicators and disabled button look to the action buttons on the "Edit Project" page. Access this page by navigating from Manage > Select a project > Edit Project > Actions

Resolves #4462

Implementation Details

I closely referred to the code written in the PR here which was very helpful as advised by @willemarcel, and used the useAsync hook to initiate the API calls. Once this was done for 1 button, the others were straightforward to implement.

I also did a minor renaming of some local functions within the Modal components so that the naming follows those useAsync functions in actionSidebars.js.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Get access to edit projects in the staging environment from a member of the HOTOSM team

  • Run yarn start in the ./frontend folder

  • Validate that all button interactions are expected:

    • Message all contributors
    • Map all tasks
    • Invalidate all tasks
    • Validate all tasks
    • Reset all tasks
    • Reset all unavailable tasks
    • Transfer project
  • Run yarn test in the ./frontend folder. There were no unit tests for this file, so I tested each button individually instead after implementation.

Here is a reference screenshot of one of the new enhanced buttons:

image

@NatashaKSS NatashaKSS marked this pull request as ready for review May 28, 2021 15:33
Copy link
Contributor

@willemarcel willemarcel left a comment

Choose a reason for hiding this comment

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

Perfect! Thanks a lot, @NatashaKSS!!

@willemarcel willemarcel added this to the v4.4.8 milestone May 28, 2021
@willemarcel willemarcel added the type: enhancement Improving an existing functionality label May 28, 2021
@willemarcel willemarcel merged commit 93486ce into hotosm:develop May 28, 2021
@NatashaKSS NatashaKSS deleted the feature/4462-add-loading-indicator-project-edit-page branch July 1, 2021 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: frontend type: enhancement Improving an existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add loading indicator to buttons on project edit page
2 participants