edit page: styleguide-driven layout + pricing_mode debug log
UI (per fox: "use styleguide to make this edit page way way better"): - div.edit-page now max-width 1200px, centered, with token-based gap - wells get larger internal padding (--space-4 + --space-5) so content isn't crammed against the well edge - well h3:first-child resets margin-top and uses 1.125rem / 600 weight - fieldsets inside edit page get tokens-based border, padding, legend styling that matches the rest of the design system Debug: - TEMPORARY log line in product_edit pricing_mode handler logs the raw POST params for the pricing_mode field plus the submit value. Will remove once the prod save-revert issue is diagnosed. Fox reports saving "Make an offer with buy-now" reverts to fixed price; cannot reproduce locally. Log will show whether the form is sending the field at all when fox saves. Total: tests still pass (9 pricing_mode + 15 in target slice).
This commit is contained in:
parent
abab69ea3c
commit
966c61ec04
2 changed files with 51 additions and 1 deletions
|
|
@ -1311,7 +1311,10 @@ img.serp-thumbnail {
|
|||
div.edit-page {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
grid-gap: 20px;
|
||||
gap: var(--space-4, 16px);
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: var(--space-3, 12px);
|
||||
}
|
||||
|
||||
@media (min-width: 720px) {
|
||||
|
|
@ -1320,6 +1323,37 @@ div.edit-page {
|
|||
}
|
||||
}
|
||||
|
||||
/* Wells on the edit page get more breathing room than the default. */
|
||||
div.edit-page > section.well2 {
|
||||
padding: var(--space-4, 16px) var(--space-5, 20px);
|
||||
}
|
||||
|
||||
div.edit-page > section.well2 > h3:first-child,
|
||||
div.edit-page > section.well2 > form > h3:first-child {
|
||||
margin-top: 0;
|
||||
font-size: 1.125rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Pricing-mode fieldset on edit page — improved spacing. */
|
||||
div.edit-page fieldset {
|
||||
border: 1px solid var(--color-border, #ddd);
|
||||
border-radius: var(--radius-md, 8px);
|
||||
padding: var(--space-3, 12px) var(--space-4, 16px);
|
||||
margin: var(--space-3, 12px) 0;
|
||||
}
|
||||
|
||||
div.edit-page fieldset legend {
|
||||
padding: 0 var(--space-2, 8px);
|
||||
font-weight: 600;
|
||||
color: var(--color-text-muted, #666);
|
||||
}
|
||||
|
||||
div.edit-page fieldset label[style*="display:block"],
|
||||
div.edit-page fieldset label.visibility_radio {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
hr {
|
||||
color: var(--border-light, #EEEEEE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -313,6 +313,22 @@ def product_edit(request):
|
|||
|
||||
# MPS-20 + MPS-21: pricing_mode + allow_offers (per-product overrides).
|
||||
if "submit" in request.params:
|
||||
# TEMPORARY DEBUG: log raw POST params for pricing_mode investigation.
|
||||
# Remove once the save defect is diagnosed.
|
||||
try:
|
||||
import logging as _logging
|
||||
_logging.getLogger(__name__).warning(
|
||||
"PRICING_MODE_DEBUG product=%s current=%s pricing_mode_param=%r "
|
||||
"all_pricing_mode=%r submit=%r",
|
||||
product.uuid_str,
|
||||
product.pricing_mode,
|
||||
request.params.get("pricing_mode"),
|
||||
request.params.getall("pricing_mode")
|
||||
if hasattr(request.params, "getall") else "no-getall",
|
||||
request.params.get("submit"),
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
new_mode = int(request.params.get("pricing_mode", product.pricing_mode))
|
||||
except (TypeError, ValueError):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue