Skip to content

Conversation

RaduCristianPopescu
Copy link

All Submissions:

Changes proposed in this Pull Request:

Added clarity for ‘visits’ metric with helper text and renewal info
CleanShot 2025-09-23 at 17 51 48@2x

Closes https://github.com/Codeinwp/optimole-service/issues/1544

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds helper text and tooltip functionality to clarify the 'visits' metric in the Optimole dashboard. It provides users with better understanding of how visits are counted and when their quota resets.

  • Adds tooltip with explanation of what constitutes a visit and renewal date information
  • Displays renewal date next to the usage percentage
  • Introduces new translatable strings for the tooltip content and renewal date format

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
inc/admin.php Adds new translatable strings for tooltip title, description, and renewal date format
assets/src/dashboard/parts/connected/dashboard/index.js Implements tooltip UI component with visit explanation and adds renewal date display

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +145 to +154
const renewalDate = useMemo( () => {
const timestamp = userData.renews_on;

if ( ! timestamp ) {
return 'N/A';
}

const date = new Date( timestamp * 1000 );
return date.toLocaleDateString( undefined, { year: 'numeric', month: 'short', day: 'numeric' });
}, [ userData.renews_on ]);
Copy link
Preview

Copilot AI Sep 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded 'N/A' fallback should be a translatable string since this text will be displayed to users and the codebase appears to use internationalization throughout.

Copilot uses AI. Check for mistakes.

@pirate-bot
Copy link
Collaborator

pirate-bot commented Sep 23, 2025

Plugin build for 73ea28e is ready 🛎️!

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