Skip to content

A4A: Remove dead code with hardcoded boolean variables#109224

Merged
jkguidaven merged 3 commits intotrunkfrom
remove/a4a/dead-codes
Mar 12, 2026
Merged

A4A: Remove dead code with hardcoded boolean variables#109224
jkguidaven merged 3 commits intotrunkfrom
remove/a4a/dead-codes

Conversation

@jkguidaven
Copy link
Contributor

Context: pfSQfS-1sJ-p2

Proposed Changes

This pull request primarily removes temporary feature flags and placeholder logic related to program links, license issuing, and "Learn more" links throughout the partner directory and billing UI. The changes simplify the codebase by eliminating unused variables and conditionals, ensuring that program links and license issuing buttons are always shown, and removing placeholder "Learn more" links that were not yet implemented.

Key changes include:

Removal of temporary feature flags and placeholder logic:

  • Removed the displayProgramLinks flag and now always display programLinks in the partner directory dashboard (index.tsx). [1] [2] [3]
  • Removed the partnerCanIssueLicense flag and related conditionals; the "Issue new license" button is now always enabled and links directly to the marketplace in billing and licenses UI components (billing-dashboard.tsx, license-list/empty.tsx, licenses-overview/index.tsx). [1] [2] [3] [4] [5] [6]

Cleanup of placeholder "Learn more" links:

  • Removed unused and placeholder "Learn more" links and associated flags from the license list empty state and revoke license dialog components (empty.tsx, revoke-license-dialog/index.tsx). [1] [2]

Minor code cleanup:

  • Removed unused imports (e.g., Gridicon) from the license list empty state component (empty.tsx).

Why are these changes being made?

Ensures our codebase are maintainable by removing irrelevant codes.

Testing Instructions

  • Use A4A live link and navigate to the Licenses page, Partner Directory Overview page
  • Confirm no regression.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

jkguidaven and others added 3 commits March 12, 2026 14:31
The showLearnMoreLink variable was hardcoded to false with a FIXME
comment in both license-list/empty and revoke-license-dialog. Remove
the unreachable conditional blocks and unused Gridicon import.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The variable was hardcoded to true with a FIXME comment in three
files. Remove it and simplify the Button props accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The variable was hardcoded to true with a TODO comment. Remove it
and render programLinks directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jkguidaven jkguidaven changed the title Remove/a4a/dead codes A4A: Remove dead code with hardcoded boolean variables Mar 12, 2026
@jkguidaven jkguidaven self-assigned this Mar 12, 2026
@jkguidaven jkguidaven added the A4A label Mar 12, 2026
@jkguidaven jkguidaven requested a review from a team March 12, 2026 06:39
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Mar 12, 2026
@jkguidaven jkguidaven marked this pull request as ready for review March 12, 2026 06:39
@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug remove/a4a/dead-codes on your sandbox.

@jkguidaven jkguidaven merged commit 831b2ea into trunk Mar 12, 2026
19 of 20 checks passed
@jkguidaven jkguidaven deleted the remove/a4a/dead-codes branch March 12, 2026 07:04
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants