microsoft / DevHomeAzureExtension

Dev Home Azure Extension
MIT License
70 stars 15 forks source link

Fixing loading state when widget is first pinned #5

Closed guimafelipe closed 8 months ago

guimafelipe commented 8 months ago

Summary of the pull request

When the widget is first pinned, there is an error message appearing briefly. This now was changed to show a message to the user informing them that the data is loading.

image

References and relevant issues

Detailed description of the pull request / Additional comments

In this change, the LoadContentData() method was changed to have a try catch wrapping its content. Now, the method does not early return when the items/pull request is not loaded yet. Instead, it uses an empty list of data and uses the DataState variable to know if the data is being loaded or not.

The templates were changed to use the is_loading_data variable to show the correct message to the user on the widget.

Validation steps performed

PR checklist