fix: remove archive/unarchive functions for sponsor managed pages#922
fix: remove archive/unarchive functions for sponsor managed pages#922
Conversation
Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
📝 WalkthroughWalkthroughThe managed page archive handler function is removed from the component, along with its corresponding prop wiring to the managed pages table. Archive/unarchive UI functionality for managed pages is no longer active, while customized page archiving remains functional. ChangesManaged Page Archive Handler Removal
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/sponsors/sponsor-page/tabs/sponsor-pages-tab/index.js`:
- Around line 202-215: The toggle logic currently reads item.is_archived but
some managed-page rows lack that flag, causing archive/unarchive to flip
incorrectly; update the data flow so the managed-page list includes is_archived
and that field is mapped into the reducer state before the UI uses it.
Specifically, ensure the API/listing call that builds items includes is_archived
in its selected fields, and modify the mapping function that reduces API results
into managedPages state (where managedPages, term, getSponsorManagedPages are
used) to set item.is_archived on each row; after that the branch using
item.is_archived with archiveManagedPage / unarchiveManagedPage will behave
correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 679d0279-476f-4c0f-9394-4fcdde246916
📒 Files selected for processing (4)
src/actions/sponsor-pages-actions.jssrc/i18n/en.jsonsrc/pages/sponsors/sponsor-page/tabs/sponsor-pages-tab/index.jssrc/reducers/sponsors/sponsor-page-pages-list-reducer.js
Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
Signed-off-by: Tomás Castillo <tcastilloboireau@gmail.com>
ref: https://app.clickup.com/t/86b9tu22h
Signed-off-by: Tomás Castillo tcastilloboireau@gmail.com
Summary by CodeRabbit