Skip to content

fix: move getSponsorships function from sponsor forms into summit file#878

Open
tomrndom wants to merge 1 commit intomasterfrom
fix/summit-sponsorship-types
Open

fix: move getSponsorships function from sponsor forms into summit file#878
tomrndom wants to merge 1 commit intomasterfrom
fix/summit-sponsorship-types

Conversation

@tomrndom
Copy link
Copy Markdown

@tomrndom tomrndom commented Apr 16, 2026

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

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

Summary by CodeRabbit

  • Refactor
    • Reorganized sponsorship data retrieval logic to improve code maintainability and consistency across the application.

…t actions file

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

coderabbitai Bot commented Apr 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a8ababc9-e18c-4ac2-b221-759972c3855d

📥 Commits

Reviewing files that changed from the base of the PR and between 68ac5d1 and bf9afc3.

📒 Files selected for processing (11)
  • src/actions/sponsor-forms-actions.js
  • src/actions/summit-actions.js
  • src/pages/sponsors/show-pages-list-page/__tests__/show-pages-list-page.test.js
  • src/pages/sponsors/show-pages-list-page/index.js
  • src/pages/sponsors/sponsor-forms-list-page/components/form-template/__tests__/form-template-popup.test.js
  • src/pages/sponsors/sponsor-forms-list-page/components/form-template/form-template-popup.js
  • src/pages/sponsors/sponsor-forms-list-page/components/global-template/select-sponsorships-dialog.js
  • src/pages/sponsors/sponsor-page/tabs/sponsor-pages-tab/__tests__/sponsor-pages-tab.test.js
  • src/reducers/sponsors/show-pages-list-reducer.js
  • src/reducers/sponsors/sponsor-forms-list-reducer.js
  • src/reducers/sponsors/sponsor-page-pages-list-reducer.js
💤 Files with no reviewable changes (1)
  • src/actions/sponsor-forms-actions.js

📝 Walkthrough

Walkthrough

This PR relocates the sponsorship-types fetching action from the sponsor-forms-actions module to the summit-actions module, renaming it from getSponsorships to getSummitSponsorshipTypes. All components and reducers that depend on this action are updated to import and invoke the new function from its new location.

Changes

Cohort / File(s) Summary
Action Migration
src/actions/sponsor-forms-actions.js, src/actions/summit-actions.js
Removed getSponsorships thunk and RECEIVE_GLOBAL_SPONSORSHIPS constant from sponsor-forms-actions; added equivalent functionality as getSummitSponsorshipTypes thunk to summit-actions with identical API call and dispatch behavior.
Component Updates
src/pages/sponsors/show-pages-list-page/index.js, src/pages/sponsors/sponsor-forms-list-page/components/form-template/form-template-popup.js, src/pages/sponsors/sponsor-forms-list-page/components/global-template/select-sponsorships-dialog.js
Updated Redux-connected component imports and dispatch calls from getSponsorships to getSummitSponsorshipTypes across initial data fetch and pagination logic.
Test Mocks
src/pages/sponsors/show-pages-list-page/__tests__/show-pages-list-page.test.js, src/pages/sponsors/sponsor-forms-list-page/components/form-template/__tests__/form-template-popup.test.js, src/pages/sponsors/sponsor-page/tabs/sponsor-pages-tab/__tests__/sponsor-pages-tab.test.js
Updated Jest module mocks to replace getSponsorships from sponsor-forms-actions with getSummitSponsorshipTypes from summit-actions, maintaining mock return behavior.
Reducer Imports
src/reducers/sponsors/show-pages-list-reducer.js, src/reducers/sponsors/sponsor-forms-list-reducer.js, src/reducers/sponsors/sponsor-page-pages-list-reducer.js
Updated import statements to source RECEIVE_GLOBAL_SPONSORSHIPS constant from summit-actions instead of sponsor-forms-actions; reducer logic remains unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • romanetar
  • smarcet

Poem

🐰 A thunk hops from forms to summit so grand,
With sponsorships renamed across the land,
Each reducer and component falls in line,
The refactored imports now align—how divine!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: moving the getSponsorships function from sponsor-forms-actions to summit-actions, along with refactoring all related imports and usages throughout the codebase.
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
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/summit-sponsorship-types

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

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.

1 participant