CIVIMM-444: Hide membership tab on contribution page settings#11
CIVIMM-444: Hide membership tab on contribution page settings#11
Conversation
Summary of ChangesHello @erawat, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the user experience within CiviCRM by removing irrelevant "Memberships" options from the contribution page settings. Since membership integration is not supported on these pages, hiding these UI elements prevents confusion and simplifies the configuration process for administrators. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a clean and effective solution to hide the 'Memberships' tab from CiviCRM contribution page settings. The new ContributionPageTabs class is well-designed to handle the two different contexts where the tabs are rendered. The changes are backed by a comprehensive set of unit tests, ensuring the functionality is robust and doesn't introduce regressions. The implementation in paymentprocessingcore_civicrm_tabset is extensible. I have one suggestion to make the code in ContributionPageTabs slightly more concise using a more functional style.
Overview
Hides the "Memberships" tab/link on all CiviCRM contribution page admin settings as we do not support membeship signup with the contribution form.
This lives in PaymentProcessingCore (not Stripe) because hiding membership configuration is generic platform behavior — it applies regardless of which payment processor is active. PaymentProcessingCore is the shared extension for cross-processor platform logic.
Before
Contribution page settings show a "Memberships" tab in the tab bar and a "Membership Settings" link in the per-page configure dropdown.
After
Both the tab and the configure action link are removed.
Technical Details
Civi\Paymentprocessingcore\Hook\TabSet\ContributionPageTabscivicrm/admin/contributetabsetmembershiptab (fromTabHeader::process())uniqueName === 'membership'(fromContributionPage::configureActionLinks())paymentprocessingcore_civicrm_tabset()inpaymentprocessingcore.phpCore overrides
None.
Comments
4 unit tests: tab removal, action link removal, other tabsets unaffected, missing membership key handled gracefully.