Skip to content

fix: clean component data on close to avoid cache issues#773

Merged
smarcet merged 1 commit intomasterfrom
fix/sponsor-managed-form-template
Feb 4, 2026
Merged

fix: clean component data on close to avoid cache issues#773
smarcet merged 1 commit intomasterfrom
fix/sponsor-managed-form-template

Conversation

@tomrndom
Copy link

@tomrndom tomrndom commented Feb 3, 2026

ref: https://app.clickup.com/t/86b7wuck8

Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com

Summary by CodeRabbit

  • Improvements
    • When saving a sponsor form from a template, the popup now automatically closes and refreshes the form list to show the new entry.
    • Pagination and sorting preferences are preserved during the refresh.
    • Enhanced template popup state management for a more seamless workflow experience.

Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

The AddSponsorFormTemplatePopup component's open prop is removed, making the dialog always display when rendered. The parent component now conditionally renders the popup based on state and passes a new handler that saves the form, refreshes the form list with preserved filters, then closes the popup.

Changes

Cohort / File(s) Summary
Sponsor Form Template Popup
src/pages/sponsors/sponsor-forms-tab/components/add-sponsor-form-template-popup/index.js, src/pages/sponsors/sponsor-forms-tab/index.js
Removed open prop parameter and propTypes from AddSponsorFormTemplatePopup. Updated parent component to conditionally render popup when openPopup === "template" and introduced handleSaveFormFromTemplate handler that chains form save, list refresh with preserved pagination/sorting, and popup closure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A popup once danced on the wind,
Now whispers its state, lean and thin,
Save-refresh-close, a waltz so neat,
Our sponsor forms flow, oh how sweet! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'fix: clean component data on close to avoid cache issues' does not match the actual changes made, which involve removing the open prop from a component and restructuring popup rendering logic. Update the title to accurately reflect the main changes, such as 'fix: make AddSponsorFormTemplatePopup self-managing and add form refresh on save' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/sponsor-managed-form-template

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


Comment @coderabbitai help to get the list of available commands and usage tips.

@tomrndom tomrndom requested a review from smarcet February 4, 2026 14:44
Copy link

@smarcet smarcet left a comment

Choose a reason for hiding this comment

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

LGTM

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