Skip to content

Add productcomments summary template - #1089

Open
mgielecinski wants to merge 3 commits into
PrestaShop:2.xfrom
mgielecinski:productcomments/add-grade-summary
Open

Add productcomments summary template#1089
mgielecinski wants to merge 3 commits into
PrestaShop:2.xfrom
mgielecinski:productcomments/add-grade-summary

Conversation

@mgielecinski

Copy link
Copy Markdown
Contributor
Questions Answers
Description? This PR provides template changes to the productcomments module for this contribution PrestaShop/productcomments#222
Type? new feature
BC breaks? yes
Deprecations? no
Fixed ticket?
Sponsor company
How to test?
obraz

@github-project-automation github-project-automation Bot moved this to Ready for review in PR Dashboard Aug 7, 2026

@tblivet tblivet 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.

Thanks @mgielecinski for this, it's a really nice addition to the product page 👌

I have a set of small changes, mostly theme consistency (keeping the section-title component, rem instead of px, logical properties) plus a guard so the summary degrades cleanly on older versions of the module.

Most of them are easier to read as a diff than to explain. Want me to push them to your branch, or open a PR against productcomments/add-grade-summary so you can review first?

If you'd rather handle it yourself, I'll detail everything in a review instead 👍

@tblivet tblivet added this to the v2.1.1 milestone Aug 13, 2026
@mgielecinski
mgielecinski requested a review from tblivet August 13, 2026 18:29
@mgielecinski

Copy link
Copy Markdown
Contributor Author

Hi @tblivet
I tried to improve everything you mentioned in your previous message. If I missed something or there's still something that needs to be fixed, I'd be very grateful if you could push the corrections.
Thanks ❤️

Hlavtox
Hlavtox previously approved these changes Aug 13, 2026
@ps-jarvis ps-jarvis added the Waiting for QA Status: Action required, Waiting for test feedback label Aug 13, 2026
@ps-jarvis ps-jarvis moved this from Ready for review to To be tested in PR Dashboard Aug 13, 2026
@ps-jarvis

Copy link
Copy Markdown

This pull request seems to contain new translation strings. I have summarized them below to ease up review:

  • Modules.Productcomments.Shop
    • /5.0

(Note: this is an automated message, but answering it will reach a real human)

@tblivet

tblivet commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Thanks @mgielecinski for addressing most of the feedback 🙏
I've just pushed a few styles improvements 👍

@mgielecinski

Copy link
Copy Markdown
Contributor Author

It looks ok with and without the summary 👍
Thank you @tblivet for improving this contribution! 🚀 ❤️

@tblivet

tblivet commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Hi 👋 this report is an AI-generated QA review, currently in a testing phase.

--

QA: 🟢 approved — but tested with productcomments#222 applied, since all the new markup is gated on isset($summary). Do not merge before #222: alone, this PR is inert (verified — legacy layout intact, empty state fine, no errors).

Env: PS 9.3.0, PHP 8.1.33, hummingbird 2.1.0, Chromium headless at 1280×900 and 390×844. Seeded 12 approved reviews (5×5, 4×3, 3×2, 2×1, 1×1 — avg 3.8).

Verified in the browser:

  • breakdown renders 5→1, one line per rating
  • per-rating counts sum to the stated total
  • 3.8 matches the seeded reviews, shown /5.0
  • all five bars proportional within 2% of count/total (measured geometry, not read off the style attribute)
  • review button moves into the section header
  • product with no reviews → empty state, no breakdown
  • 390px keeps bar widths, no sideways scroll
  • 0 console errors and 0 failed requests, with and without the dependency

Not a blocker here, but worth knowing before both ship: grades average across criteria, so they can be 4.5, and #222 does $summary[(int) $grade] = [...] over a float GROUP BY — buckets overwrite. Adding one 4.5 review to the twelve gave "Based on 13 reviews" with counts summing to 10 and the 4-star row at 1. Reported on #222.

Nits: {l s='/5.0'} is a translatable string with no words in it (#222 hardcodes the same text, so the two disagree); the per-rating counts are aria-hidden, so screen readers get percentages and never the counts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Waiting for Author Waiting for QA Status: Action required, Waiting for test feedback

Projects

Status: To be tested

Development

Successfully merging this pull request may close these issues.

4 participants