Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 12, 2025

Proposed changes:

This PR reverts all changes that were initially made to implement NL-243 in the Jetpack repository. After investigation, it was determined that the subscriber import modal exists in Calypso (wordpress.com/subscribers), not in the Jetpack codebase.

Reverted changes:

  • Removed ImportSubscribersModal component and related files
  • Restored admin.jsx to original "Hello world" placeholder state
  • Reverted dependency changes to package.json
  • Removed changelog entry

Reason for revert:
The import modal accessible from wordpress.com/subscribers/#add-subscribers is a Calypso component. The implementation for NL-243 should be done in the Calypso repository instead.

Files reverted to original state:

  • _inc/admin.jsx - restored
  • _inc/style.module.scss - restored
  • _inc/test/admin.tsx - restored
  • package.json - restored
  • webpack.config.js - restored

Files removed:

  • _inc/admin.tsx
  • _inc/components/import-subscribers-modal.tsx
  • _inc/components/import-subscribers-modal.scss
  • changelog/add-nl-243-import-limit-context

This PR can be closed as the work should be done in Calypso instead.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

https://linear.app/a8c/issue/NL-243

Does this pull request change what data or activity we track or use?

No.

Testing instructions:

Verify that the subscribers-dashboard package has been restored to its original state:

  1. Check that projects/packages/subscribers-dashboard/_inc/admin.jsx contains only the "Hello world" placeholder
  2. Verify no import-subscribers-modal files exist in the _inc/components/ directory
  3. Confirm package.json dependencies match the original state (no @wordpress/components or @automattic/jetpack-script-data added)
  4. Verify no changelog entry exists for NL-243

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits December 12, 2025 12:45
- Created ImportSubscribersModal component with CSV upload functionality
- Added plan detection logic to show different messages for free vs paid plans
- Free plan: Shows 100 subscriber limit with upgrade link
- Paid plan: Shows 10,000 subscriber manual review message
- Updated admin interface with "Add Subscribers" button
- Added proper styling for modal and page layout
- Updated tests to match new component structure

Co-authored-by: robertbpugh <[email protected]>
- Fixed missing sprintf import in import-subscribers-modal.tsx
- Cleaned up unused imports in admin.tsx
- Added changelog entry for the feature

Co-authored-by: robertbpugh <[email protected]>
- Remove .tsx extension from import statement per TypeScript best practices
- Remove console.log statement and improve TODO comment
- Enhance plan detection logic with explicit allowlist of free plan slugs

Co-authored-by: robertbpugh <[email protected]>
Copilot AI changed the title [WIP] Add import limit context to the import modal Add import limit messaging to subscriber import modal (NL-243) Dec 12, 2025
Copilot AI requested a review from robertbpugh December 12, 2025 12:52
@robertbpugh
Copy link
Contributor

@copilot Why did you "Created ImportSubscribersModal component" - Wouldn't you have edited the existing modal?

Copy link
Contributor Author

Copilot AI commented Dec 12, 2025

@copilot Why did you "Created ImportSubscribersModal component" - Wouldn't you have edited the existing modal?

I created a new component because there was no existing import modal in the subscribers-dashboard package. Before my changes, the package only had a "Hello world" placeholder in admin.jsx.

If there's an existing modal that should be edited instead (perhaps in Calypso or another location), could you point me to it? The issue mentioned "the modal accessible from wordpress.com/subscribers" which suggests it might be in a different codebase. I couldn't find any existing subscriber import modal in the Jetpack repository to edit.

@robertbpugh
Copy link
Contributor

@copilot This doesn't seem right. Can you check Calypso for the modal?

Copy link
Contributor Author

Copilot AI commented Dec 12, 2025

@copilot This doesn't seem right. Can you check Calypso for the modal?

You're correct. After investigating, I found that the "Import subscribers" feature links to wordpress.com/subscribers/{site}#add-subscribers, which indicates the modal exists in Calypso, not in this Jetpack repository.

The changes for NL-243 should be made in the Calypso repository instead. The import modal accessible from wordpress.com/subscribers is a Calypso component.

Should I revert all changes from this PR since they were implemented in the wrong codebase?

@robertbpugh
Copy link
Contributor

@copilot Yes, revert everything and implement in Calypso.

Reverting all Jetpack changes as the subscriber import modal exists in Calypso, not in the Jetpack repository. The changes for NL-243 should be implemented in the Calypso codebase instead.

Co-authored-by: robertbpugh <[email protected]>
Copy link
Contributor Author

Copilot AI commented Dec 12, 2025

@copilot Yes, revert everything and implement in Calypso.

All changes reverted in commit 09199cb. The subscribers-dashboard package is back to its original state with just the "Hello world" placeholder. The implementation for NL-243 should be done in the Calypso repository where the actual import modal exists.

Copilot AI changed the title Add import limit messaging to subscriber import modal (NL-243) Revert NL-243 changes - implementation belongs in Calypso Dec 12, 2025
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