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

Squash a few routing / UI bugs #1957

Merged
merged 2 commits into from
Sep 25, 2024
Merged

Squash a few routing / UI bugs #1957

merged 2 commits into from
Sep 25, 2024

Conversation

whabanks
Copy link
Contributor

Summary | Résumé

This PR fixes a few bugs found during testing on staging for the callbacks changes:

  • The delete button is not longer displayed when there isn't a callback configured
  • Fixed an issue where the delete confirmation banner wasn't displaying in some circumstances
  • Fixed a routing issue where deleting a received-text-messages callback was deleting the delivery status callback
  • Fixed an issue where the Test callback button was not remaining on the same page after clicking

Test instructions | Instructions pour tester la modification

- The delete button is not longer displayed when there isn't a callback configured
- Fixed an issue where the delete confirmation banner wasn't displaying in some circumstances
- Fixed a routing issue where deleting a received-text-messages callback was deleting the delivery status callback
- Fixed an issue where the Test callback button was not remaining on the same page after clicking
app/main/views/api_keys.py Dismissed Show dismissed Hide dismissed
app/main/views/api_keys.py Dismissed Show dismissed Hide dismissed
Copy link

app/main/views/api_keys.py Dismissed Show dismissed Hide dismissed
return redirect(url_for("main.delivery_status_callback", service_id=service_id))

# If the user is just testing their URL, don't send them back to the API Integration page
if request.form.get("button_pressed") == "test_response_time" and g.callback_response_time >= 1:
Copy link
Contributor

Choose a reason for hiding this comment

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

in this case is the callback saved or not? the flash message doesn't indicate that, whereas if it is <1s, it does say the callback is saved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm good catch on this case. Right now, if the url or bearer token have changed it will call the update method, then check if the test button was clicked and display the response time.

I think what we want is to check if the test button was clicked first, and put the url/bearer token check + update call in the else. It would be confusing to perform a save and tell them that after they click the test button.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok we dont need to change this for now, I guess it is saved? but maybe we need stronger language? your callback should respond <1s for us to count it performant or something like that

@whabanks whabanks merged commit 381aac0 into main Sep 25, 2024
10 checks passed
@whabanks whabanks deleted the fix/callbacks-page branch September 25, 2024 15:56
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.

2 participants