Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Conversation

@guimafelipe
Copy link
Contributor

@guimafelipe guimafelipe commented Jun 6, 2024

Summary of the pull request

When the widget was being saved, we changed the data to include only the main URL, without the query. This created a bug when if the user customized the widget but cancelled the process, the widget would lose track of its query because it was not being saved on the ConfigurationData. With this PR, we never change the actual URL that the user used as input, keeping it consistent.

This PR also fixes the issue where we could save widgets with invalid URLs. This would happen if the user submit a URL, change it for some reason, and then save the widget. As the save action also gets data (important to get the last title input for example), we need to correct it to the URL we are sure is correct.

References and relevant issues

Detailed description of the pull request / Additional comments

Validation steps performed

PR checklist

@guimafelipe guimafelipe requested review from dkbennett and krschau June 6, 2024 22:13

// If the user changed the URL after clicking submit and clicked
// saved just after, we change it back to what was before to not corrupt our saved data.
private void CorrectUrl()
Copy link
Contributor

Choose a reason for hiding this comment

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

The comments sound like a race-condition. What is happening between "Submit" and "Save"?

Copy link
Collaborator

Choose a reason for hiding this comment

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

They are separate buttons in the widget, so unlikely that the user could click them both fast enough to cause an issue.

@guimafelipe guimafelipe merged commit 6072955 into main Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue widget keep forgetting query

4 participants