This commit is contained in:
gsinghpal
2026-05-10 10:25:12 -04:00
parent 6c6a59ceef
commit 6b7b44264a
59 changed files with 2461 additions and 324 deletions

View File

@@ -223,10 +223,42 @@ $rid-warn : var(--fp-rid-warn, #{$_fp-rid-warn-hex});
// ---------- Target / hint helpers ------------------------------------------
// Target pill — surfaces the recipe-author's target_min / target_max
// (the "spec") so the operator knows what they're aiming for BEFORE
// they enter readings. Reads as a small inline badge with bullseye
// icon, separated visually from the body / hint copy.
.o_fp_ri_target {
margin: 0 0 8px 0;
display: inline-flex;
align-items: center;
gap: 6px;
margin: 0 0 10px 0;
padding: 4px 10px;
background-color: rgba(46, 125, 107, .10);
border: 1px solid rgba(46, 125, 107, .25);
border-radius: 999px;
font-size: 0.8125rem;
color: $rid-ink-mute;
color: $rid-ok;
.fa-bullseye { color: $rid-ok; }
.o_fp_ri_target_label {
text-transform: uppercase;
letter-spacing: .04em;
font-size: 0.7rem;
font-weight: 600;
opacity: .85;
}
.o_fp_ri_target_value {
color: $rid-ink;
font-variant-numeric: tabular-nums;
}
.o_fp_ri_target_unit {
margin-left: 2px;
color: $rid-ink-mute;
font-size: 0.75rem;
}
}
.o_fp_ri_hint {
margin: 0 0 8px 0;
@@ -236,6 +268,69 @@ $rid-warn : var(--fp-rid-warn, #{$_fp-rid-warn-hex});
}
// =============================================================================
// Instructions block — recipe author's narrative text + image gallery,
// rendered above the prompt cards so the operator reads context BEFORE
// entering values. Hidden by the t-if when neither piece is authored.
// =============================================================================
.o_fp_ri_instructions {
margin-bottom: 14px;
padding: 14px 16px;
background-color: $rid-card;
border: 1px solid $rid-border;
border-left: 4px solid $rid-border-focus;
border-radius: 6px;
color: $rid-ink;
box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
.o_fp_ri_instructions_text {
font-size: .95rem;
line-height: 1.5;
margin-bottom: 10px;
// Reset the rich-text fragments coming out of the HTML field
// so they render predictably inside the dialog frame.
:first-child { margin-top: 0; }
:last-child { margin-bottom: 0; }
img { max-width: 100%; height: auto; border-radius: 4px; }
}
.o_fp_ri_instructions_gallery {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 8px;
}
.o_fp_ri_instructions_thumb {
display: inline-block;
width: 96px;
height: 96px;
border: 1px solid $rid-border;
border-radius: 4px;
overflow: hidden;
background-color: $rid-page;
cursor: zoom-in;
transition: transform .12s ease, border-color .12s ease,
box-shadow .12s ease;
&:hover {
transform: scale(1.04);
border-color: $rid-border-focus;
box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
}
}
// =============================================================================
// Card body — inputs per type
// =============================================================================
@@ -512,3 +607,197 @@ $rid-warn : var(--fp-rid-warn, #{$_fp-rid-warn-hex});
grid-template-columns: repeat(2, 1fr);
}
}
// =============================================================================
// Pass / Fail — distinct two-button widget
//
// A bare boolean toggle hid the question's intent ("PASS or FAIL?" → "Yes
// or No?"). Two clearly-coloured buttons mirror the language the operator
// already speaks: green PASS, red FAIL. Active button fills with the
// outcome colour; inactive stays outlined.
// =============================================================================
.o_fp_ri_passfail {
display: flex;
gap: 12px;
.o_fp_ri_pf_btn {
flex: 1;
min-height: 52px;
padding: 10px 16px;
font-size: 1rem;
font-weight: 700;
letter-spacing: .04em;
border-radius: 6px;
background: transparent;
cursor: pointer;
transition: background-color .12s ease, color .12s ease,
border-color .12s ease, transform .04s ease;
&:active {
transform: scale(0.985);
}
.fa {
font-size: 1.05em;
}
}
.o_fp_ri_pf_pass {
border: 1.5px solid $rid-ok;
color: $rid-ok;
&:hover { background-color: rgba(25, 135, 84, .08); }
&.o_fp_ri_pf_active {
background-color: $rid-ok;
color: #ffffff;
border-color: $rid-ok;
box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
}
.o_fp_ri_pf_fail {
border: 1.5px solid $rid-required;
color: $rid-required;
&:hover { background-color: rgba(220, 53, 69, .08); }
&.o_fp_ri_pf_active {
background-color: $rid-required;
color: #ffffff;
border-color: $rid-required;
box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
}
}
// =============================================================================
// Signature — clearly-affordance'd input so operators know it's an
// initial / signature, not free text.
// =============================================================================
.o_fp_ri_signature {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 12px;
background: $rid-input;
border: 1px solid $rid-border;
border-radius: 6px;
transition: border-color .15s ease, box-shadow .15s ease;
&:focus-within {
border-color: $rid-border-focus;
box-shadow: 0 0 0 .15rem rgba(113, 75, 103, .15);
}
.o_fp_ri_signature_icon {
font-size: 1.1rem;
color: $rid-ink-mute;
}
.o_fp_ri_input_signature {
flex: 1;
border: 0;
background: transparent;
padding: 6px 0;
font-family: "Courier New", "Lucida Console", monospace;
font-size: 1rem;
letter-spacing: .08em;
text-transform: uppercase;
color: $rid-ink;
&:focus {
outline: none;
box-shadow: none;
}
}
}
// =============================================================================
// Selection — empty-state hint when recipe author didn't authoring options
// =============================================================================
.o_fp_ri_select_empty {
padding: 10px 12px;
border: 1px dashed $rid-border-strong;
border-radius: 6px;
background-color: $rid-page;
color: $rid-ink-mute;
font-size: .9rem;
.fa-info-circle {
color: $rid-warn;
}
.o_fp_ri_input_text {
width: 100%;
}
}
// =============================================================================
// Dual-entry numeric — Min Reading + Max Reading side-by-side
//
// Fires when the recipe author authored both target_min AND target_max on
// a numeric prompt (signal: this measurement is a range, not a point).
// Operator records the lowest and highest reading from their inspection
// pass. The hint below verifies BOTH bounds are within spec.
// =============================================================================
.o_fp_ri_dual {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
align-items: start;
.o_fp_ri_dual_field {
display: flex;
flex-direction: column;
gap: 4px;
margin: 0;
}
.o_fp_ri_dual_label {
font-size: .75rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: .05em;
color: $rid-ink-mute;
}
.o_fp_ri_dual_hint {
grid-column: 1 / -1;
margin-top: -4px;
}
}
// =============================================================================
// PASS/FAIL suggestion banner — fires when a pass_fail prompt has both a
// target range and the operator has entered Min/Max readings. Shows the
// suggested verdict so the operator knows what the system thinks before
// they tap PASS or FAIL.
// =============================================================================
.o_fp_ri_pf_suggest {
margin: 8px 0 6px;
padding: 8px 12px;
border-radius: 6px;
font-size: .9rem;
border: 1px solid transparent;
&.o_fp_ri_pf_suggest_pass {
background-color: rgba(25, 135, 84, .10);
border-color: rgba(25, 135, 84, .35);
color: $rid-ok;
}
&.o_fp_ri_pf_suggest_fail {
background-color: rgba(220, 53, 69, .10);
border-color: rgba(220, 53, 69, .35);
color: $rid-required;
}
}