Skip to content

feat: helper text for 'visits' metric#966

Merged
selul merged 2 commits into
developmentfrom
feat/monthly_visit
Sep 30, 2025
Merged

feat: helper text for 'visits' metric#966
selul merged 2 commits into
developmentfrom
feat/monthly_visit

Conversation

@RaduCristianPopescu

Copy link
Copy Markdown
Contributor

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?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 ]);

Copilot AI Sep 23, 2025

Copy link

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.
Comment thread assets/src/dashboard/parts/connected/dashboard/index.js Outdated
@pirate-bot

pirate-bot commented Sep 23, 2025

Copy link
Copy Markdown
Collaborator

Plugin build for 73ea28e is ready 🛎️!

@selul selul merged commit b5564ee into development Sep 30, 2025
11 of 12 checks passed
@selul selul deleted the feat/monthly_visit branch September 30, 2025 13:56
@pirate-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 4.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants