microsoft / DevHomeAzureExtension

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

Removing last tile from data string when remove action is invoked #77

Closed guimafelipe closed 6 months ago

guimafelipe commented 7 months ago

Summary of the pull request

This PR fixes a bug in the Azure Query Tiles widget where the ConfigurationData string was inconsistent with the actual state of the widget when the user clicks the remove tile button.

References and relevant issues

65

Detailed description of the pull request / Additional comments

Before

When the user clicks the "Remove tile" button, the data string the widget receives still contains information from the removed form. This resulted in a configuration being saved with a ghost tile if the remove action was the last one invoked before pinning or saving.

This resulted in the widget showing this ghost tile whenever it needed to reload all the tiles from the ConfigurationData string, as this string is mirroring the data received from the forms. This happens when the widget service is restarted or when the user cancels a customization action.

Currently

Now, invoking the remove widget action will remove the information from the last form from the data string accordingly, as this tile should not exist anymore. This way, the data will stay consistent with the intended behaviour of the widget, and will not have ghost tiles on the next restorations.

Validation steps performed

PR checklist