Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #5744
Description
After downloading from the "All Donations" page, the "Export Donations" button stays on "Please wait...".
download_button_toonly uses the backgrounddownloadStimulus controller whenremote: trueis passed (added in #5725). rails-ujs only re-enables a disabled link on the next page load, which a file download never triggers. The donations index called the helper withoutremote: true, so the button was never re-enabled.This opts the Export Donations button in with
remote: true, the same way the annual report views do. The helper's default is unchanged. Diff: 1 line in the view, plus one request spec.Type of change
How Has This Been Tested?
Added a request spec in
spec/requests/donations_requests_spec.rbasserting the export link renders withdata-controller="download"anddata-action="download#download". It fails without the view change (data-controlleris nil) and passes with it.Ran
bundle exec rspec spec/requests/donations_requests_spec.rb spec/helpers/ui_helper_spec.rb: 57 examples, 0 failures. RuboCop/erb_lint run on the changed files (results in the session report).I did not click through the download in a real browser.
AI assistance disclosure
This change was prepared with AI assistance (Claude Code). I reviewed the diff and test results before submitting.