Skip to content

Update progress modal#2909

Merged
rtibbles merged 6 commits intolearningequality:hotfixesfrom
marcellamaki:update-progress-modal
Feb 9, 2021
Merged

Update progress modal#2909
rtibbles merged 6 commits intolearningequality:hotfixesfrom
marcellamaki:update-progress-modal

Conversation

@marcellamaki
Copy link
Copy Markdown
Member

@marcellamaki marcellamaki commented Feb 4, 2021

Description

This PR updates the Progress Modal to be used for Sync Resources tasks to provide user feedback - both when there are resources that can be synced, and also when there aren't.

Issue Addressed (if applicable)

Addresses #2555 and #2688

Steps to Test

  • Sync resources for a channel that has imported resources. It should show that it is in progress (if it is a long task) and/or that it is complete, with a prompt to refresh the page.
  • Sync resources for a channel that does not have any imported resources. Rather than nothing happening, you should still get the same prompt that the task is complete and to refresh the page. (This was a more straightforward option than disabling the sync option in the menu for these channels, due to where the validation happens).

Does this introduce any tech-debt items?

I wouldn't say there is new technical debt, but there is still some technical debt in the sense that not all of the tasks are truly managed by the ProgressModal - it's just the foundation that is there. This doesn't really change that, and there will probably have to be more changes that are made in the future based on use cases for different kinds of tasks/feedback.

@marcellamaki marcellamaki force-pushed the update-progress-modal branch from 489f63c to d8fe718 Compare February 8, 2021 19:36
@marcellamaki marcellamaki marked this pull request as ready for review February 8, 2021 19:44
@marcellamaki marcellamaki requested a review from rtibbles February 8, 2021 19:44
@jonboiser jonboiser self-assigned this Feb 8, 2021
@jonboiser
Copy link
Copy Markdown
Contributor

I got this modal when syncing using the "Published channel" created by devsetup (but this channel might be messed up; i'll try with a new channel).

The "Stop" button indicates that the Task is still running and does not match the prompt to click "Refresh". The /api/task poll is returning an [].

image

image

@jonboiser
Copy link
Copy Markdown
Contributor

Oh, this is caused by a different issue. It seems like "Published Channel" has no imported content, yet the "Sync" option is available. So when you click "Sync", the request fails immediately with this validation error

0: "Cannot sync a channel with no imported content

@marcellamaki
Copy link
Copy Markdown
Member Author

Yes, I did chat with Richard about that and we decided that to handle that validation error, the most straightforward way (rather than trying to remove the sync option from the dropdown which would not be very easy) would just be to have the sync "work" (i.e. provide user feedback through the modal, because before nothing was happening and the previous modal just disappeared). But, good catch that it is "Stop" not "Refresh"... I thought I had updated that correctly, but I will take a second look. Thanks!

@marcellamaki marcellamaki force-pushed the update-progress-modal branch from 86a89e8 to bc8c766 Compare February 9, 2021 00:36
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.

Sync content feature shows no error message when syncing with no imported content Progress modal isn't showing for syncing

3 participants