Fix: Duplicate funding reference add button - #1278
Merged
Merged
Conversation
Show only one "Add Funding Reference" action when the funding section is empty, while keeping the list-level add button for existing entries. The changelog and API/frontend tests were updated to cover the new empty-state and append behavior.
7 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The changelog test newly asserts a release date that is still in the future.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Prevents duplicate funding-reference add actions in the Data Editor and adds regression coverage.
Changes:
- Shows one context-appropriate add button.
- Tests empty, populated, and post-removal states.
- Documents the fix in the changelog.
File summaries
| File | Description |
|---|---|
funding-reference-field.tsx |
Hides the list-level add button when empty. |
funding-reference-field.test.tsx |
Adds regression tests for add-action behavior. |
ChangelogApiTest.php |
Verifies the changelog entry. |
changelog.json |
Documents the UI fix. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
This pull request improves the user experience for adding funding references in the Data Editor by ensuring that only one clear "Add Funding Reference" action is visible at any time, regardless of whether the list is empty or contains items. It also updates and adds comprehensive tests to verify this behavior, and documents the change in the changelog.
User Interface Improvements:
FundingReferenceFieldcomponent now displays a single "Add Funding Reference" button when the funding reference list is empty, and maintains a single list-level add button when references exist. This prevents duplicate prompts and clarifies the add action for users.Testing Enhancements:
funding-reference-field.test.tsxto ensure that:Documentation: