[19.0][REF] base_tier_validation: rewrite tier_review_widget collapse with native <details> #44
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 508 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.373
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #44"
general
weight: 0.35
bofiltd
Summary
Replace the OWL-driven panel/card collapse machinery in the embedded Reviews widget with the native HTML5
<details>/<summary>element. Browser handles open/close state, keyboard accessibility, and the disclosure triangle; no JavaScript needed.What goes away
onToggleCollapsehandler (~13 lines walkingev.currentTarget.closest(".panel-heading")then togglingstyle.displaymanually).useStateimport andthis.state.collapseboolean.<a class="o_info_btn" data-toggle="..." t-on-click="...">shim and the explicit<div id="collapse1" class="collapse">wrapper..panel-group,.panel-heading,.panel-title,.panel-bodyall dropped — none of these classes exist in Bootstrap 5 which Odoo 19 ships).What replaces it
<details class="o_tier_review_details" open="open"><summary>Reviews</summary><div class="o_tier_review_body">...</div></details>. Theopenattribute defaults to expanded, matching the previous default.summary::before { content: "\f0d7" }, rotates-90°when the<details>is closed.summary::-webkit-details-marker { display: none }so we don't render two triangles.Net effect
| | Before | After |
|---|---:|---:|
| JS | ~30 LOC | 13 LOC |
| SCSS | 12 selectors (Bootstrap 3 + custom) | 5 selectors (Odoo namespaced) |
| Accessibility |
<a href="#">shim, click-only | Native<details>, Space/Enter, screen-reader-aware |Same UX (click Reviews heading to toggle, defaults to open).
Table
Horizontal space is scarce in this table, so:
Forward module
base_tier_validation_forwardextends this table with an xpath ontable-condensed, which is nowtable-sm. The xpath no longer matched, and the web client refused to render documents under review (Element ... cannot be located). The xpath no longer depends on the table's classes.Tests
Hoot tests mount the widget on mock data and check the Comment and Requested by columns, the requester next to the heading and the status badges. In
base_tier_validation_forward, a test checks that a forwarded review is highlighted and that the requesters then stay in a column. A Python test in each module runs them, so OCA CI covers them.Test plan
account.moveunder tier validation). The Reviews section is open by default with the caret pointing down.<a>shim.)base_tier_validation_forwardinstalled, forward a review: the document opens and the row is highlighted.