Feat/style input box #162

Merged
duan_j merged 13 commits from feat/style-input-box into main 2026-08-24 19:26:49 +02:00
Owner

make input box change color (orange = pending) and clear the color after enter
update banner to have colored text so it shows on both white/black backgrounds

make input box change color (orange = pending) and clear the color after enter update banner to have colored text so it shows on both white/black backgrounds
duan_j force-pushed feat/style-input-box from 93fddd7a1b to 11a3487c00 2026-08-22 02:54:56 +02:00 Compare

Coverage report (automated)

Total line + branch coverage: 50%
Diff coverage vs main: 100% (minimum 80%)

Full report: coverage artifact on this run.

Coverage report (automated) Total line + branch coverage: 50% Diff coverage vs main: 100% (minimum 80%) Full report: coverage artifact on this run.
duan_j force-pushed feat/style-input-box from 194ab82322 to 3354745648 2026-08-24 13:40:05 +02:00 Compare
duan_j force-pushed feat/style-input-box from 3354745648 to a75eac264e 2026-08-24 13:40:27 +02:00 Compare
duan_j force-pushed feat/style-input-box from a75eac264e to cf68a4c34c 2026-08-24 18:45:05 +02:00 Compare
duan_j added 13 commits 2026-08-24 19:24:31 +02:00
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Values inside the Experiment configuration banner now show the same
pending color as the motor move boxes while the typed text differs from
the applied value; Enter (or focus-out) commits as before and clears it.
Opt-in via NumberLineEdit(track_pending=True) because MotorMoveGroup
owns the movestate property on its registered boxes; reuses the existing
movestate QSS, so no new styling. The Set Energy spinbox marks pending
until Change Energy is clicked, since its apply gate is the button.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Both Set Energy rows allowed 1-30 keV, an arbitrary spinbox default;
nothing downstream validates the request (daq.change_energy forwards
straight to bec). Shared ENERGY_MIN/MAX_KEV constants now bound both
spins to 4-20 keV with a tooltip flagging the range as pending
Beamline Scientist confirmation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The energy setpoint applies via the Change Energy button, not Enter, so
it gets the full motor state machine instead of the typing-pending
color: neutral tracks the readback, a user edit stages pending (and is
the only thing that enables the button), the click turns moving, and
readback arrival within tol returns to neutral. New SpinMoveState in
motor_move_group.py adapts the pattern to a QDoubleSpinBox+button pair
(colors ride the movestate QSS via the spin's internal QLineEdit);
replaces the hand-rolled pending-until-click in the exp-config row and
covers the Beamline setup row that had no color at all. The server's
0.0 detector-unavailable energy is kept out of the readback feed so it
cannot clamp the spin to the range minimum.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The movestate property sat on the spinbox's inner QLineEdit, which both
themes deliberately paint transparent (QAbstractSpinBox QLineEdit rule)
- the state machine worked but no color ever showed, and the tests only
asserted the property, not the paint. The property now lives on the
spinbox itself with QAbstractSpinBox[movestate=...] added to both
themes' rules, verified by a pixel-sampling regression test that grabs
the rendered widget through the real stylesheet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
so it shows on white/black background
x=20 sits on a digit glyph with CI's Linux fonts, so the assert compared
an antialiased glyph blend against the pure background. The padding area
(border 1px + padding 6px) can never contain text on any font.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0147jE48bQUTm9AqNQApT6b2
test: no need to test energy 0 and update tolerance
CI / lint (pull_request) Successful in 53s
CI / test (3.11) (pull_request) Successful in 58s
CI / test (3.13) (pull_request) Successful in 59s
CI / test (3.12) (pull_request) Successful in 1m3s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m12s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m14s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m18s
CI / test-with-coverage (pull_request) Successful in 1m29s
CI / coverage-analysis (pull_request) Successful in 3s
CI / lint (push) Successful in 34s
Docs build and publish / docker (push) Successful in 17s
CI / test (3.11) (push) Canceled after 37s
CI / test (3.12) (push) Canceled after 36s
CI / test (3.13) (push) Canceled after 32s
CI / test-with-beamline-plugins (pxi_bec) (push) Canceled after 31s
CI / test-with-beamline-plugins (pxii_bec) (push) Canceled after 27s
CI / test-with-beamline-plugins (pxiii_bec) (push) Canceled after 26s
CI / test-with-coverage (push) Canceled after 22s
CI / coverage-analysis (push) Canceled after 0s
Build and Publish / release (push) Successful in 20s
a19cbf1081
test: update test...
duan_j force-pushed feat/style-input-box from 14c7c1605a to a19cbf1081 2026-08-24 19:24:31 +02:00 Compare
duan_j merged commit a19cbf1081 into main 2026-08-24 19:26:49 +02:00
duan_j deleted branch feat/style-input-box 2026-08-24 19:26:49 +02:00
Sign in to join this conversation.