Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to the Rivian Tire Guide plugin will be documented in this f

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

## [1.22.0] - 2026-03-01

### Changed
- **Share image: show tire size on top-rated callout** — The top-rated tire now displays the size in parentheses (e.g. "Michelin Defender LTX M/S (275/65R18)") so tires with the same name but different sizes can be distinguished.
- **Share image: show Avg Efficiency out of 100** — The Avg Efficiency stat card now renders as "72 / 100" instead of just "72" for clearer context.

## [1.21.1] - 2026-03-01

### Fixed
Expand Down
5 changes: 3 additions & 2 deletions admin/js/admin-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
var stats = [
{ label: 'Total Tires', value: String(data.totalTires) },
{ label: 'Avg Price', value: '$' + (data.avgPrice > 0 ? Math.round(data.avgPrice).toLocaleString() : '—') },
{ label: 'Avg Efficiency', value: String(data.avgEfficiency) },
{ label: 'Avg Efficiency', value: data.avgEfficiency + ' / 100' },
{ label: 'Community Reviews', value: String(data.totalReviews) },
];

Expand Down Expand Up @@ -393,7 +393,8 @@

ctx.fillStyle = colors.textHeading;
ctx.font = 'bold 16px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
ctx.fillText(data.topTire, 195, calloutY + 30);
var tireLabel = data.topTire + (data.topSize ? ' (' + data.topSize + ')' : '');
ctx.fillText(tireLabel, 195, calloutY + 30);

if (data.topRating) {
ctx.fillStyle = colors.accent;
Expand Down
2 changes: 1 addition & 1 deletion admin/js/admin-scripts.min.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions admin/views/share-image.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
// Top rated tire.
$top_tire = '';
$top_rating = '';
$top_size = '';
if ( ! empty( $stats['top_rated'] ) ) {
$top = $stats['top_rated'][0];
$top_tire = $top['brand'] . ' ' . $top['model'];
$top = $stats['top_rated'][0];
$top_tire = $top['brand'] . ' ' . $top['model'];
$top_rating = $top['avg_rating'];
$top_size = $top['size'] ?? '';
}

$site_name = get_bloginfo( 'name' );
Expand Down Expand Up @@ -114,6 +116,7 @@
categories: <?php echo wp_json_encode( $categories ); ?>,
brands: <?php echo wp_json_encode( $brands ); ?>,
topTire: <?php echo wp_json_encode( $top_tire ); ?>,
topSize: <?php echo wp_json_encode( $top_size ); ?>,
topRating: <?php echo wp_json_encode( $top_rating ); ?>,
};
</script>
2 changes: 1 addition & 1 deletion includes/class-rtg-database.php
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ public static function get_dashboard_stats() {

// Top rated tires (top 5 by average rating, min 1 rating).
$stats['top_rated'] = $wpdb->get_results(
"SELECT t.tire_id, t.brand, t.model, t.image,
"SELECT t.tire_id, t.brand, t.model, t.size, t.image,
ROUND(AVG(r.rating), 1) as avg_rating,
COUNT(r.id) as rating_count
FROM {$ratings_table} r
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rivian-tire-guide",
"version": "1.21.1",
"version": "1.22.0",
"private": true,
"description": "Interactive tire guide for Rivian vehicles — WordPress plugin",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions rivian-tire-guide.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Rivian Tire Guide
* Description: Interactive tire guide for Rivian vehicles with filtering, comparison, and ratings.
* Version: 1.21.1
* Version: 1.22.0
* Author: RivianTrackr
* Text Domain: rivian-tire-guide
* Requires at least: 5.8
Expand All @@ -13,7 +13,7 @@
exit;
}

define( 'RTG_VERSION', '1.21.1' );
define( 'RTG_VERSION', '1.22.0' );
define( 'RTG_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'RTG_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'RTG_PLUGIN_FILE', __FILE__ );
Expand Down
Loading