Remove dead no-parent-event prop from the date picker - #218
Conversation
0996738 to
c4b254c
Compare
|
|
All three are fair — and one of them turns this from a "fix" into a judgement call that's yours to make. 1. "We typically do not test these small details?" — Correct, you don't. Grepping 2. "Who even introduced no-parent-event? Git blame time." — 🫵 You did. 3. "Plausible a dev uses no-parent-event for their own shenanigans? → remove in 4.0" — the honest analysisWhere it sits: it's on Does anything depend on it today? No:
So the only "shenanigan" surface is: someone writing CSS/JS targeting Your call — I'd frame it as three picks:
TL;DR: git-blame says it's yours ( |
DateInput applied .props('no-parent-event') to the inner QDate, but
Quasar 2.18.5's QDate has no such prop (noParentEvent belongs to the
anchor-props mixin behind QMenu/QTooltip). It was an inert no-op
attribute; removing it changes no behavior (open/close is driven by the
parent QMenu).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c4b254c to
c1cc06a
Compare
|
Per your call: merge as cleanup. Dropped the off-convention test (amended to a clean 1-line diff), body updated to "pytests not necessary". Marking ready + auto-merge on green. |
|
Correction: fork-merge brings no merit — the destination is upstream. Graduated → zauberzeug#6177. Closing this fork PR. |
Motivation
DateInputapplies.props('no-parent-event')to the innerQDatepicker. Quasar 2.18.5'sQDatehas nono-parent-eventprop —noParentEventbelongs to the anchor-props mixin that backsQMenu/QTooltip/QPopupProxy, notQDate. So the prop is a dead no-op: Vue passes it through as an inert root DOM attribute that Quasar never reads.Introduced in
#4815(commitb8b75b20). For contrast, the only placeno-parent-eventwas ever load-bearing was on a QMenu (the 202383951acb"remove no-parent-event hack") — a different structural position from this childQDate.Implementation
Drop
.props('no-parent-event')from theQDateonly. The wrappingQMenucorrectly never carried it (the calendar button should open the menu on its parent click). No behavior change — open / close / select is driven by the parentQMenu, not this inert child attribute.Evidence: Quasar bundle grep + independent review
nicegui/static/quasar.umd.js(Quasar v2.18.5),noParentEventis defined only inside the anchor-props mixin (consumed byconfigureAnchorEl).QDate's prop set (useDatetimeProps+useFormProps+useDarkProps+modelValue/multiple/range/…) does not include it.ui.menu()does not setno-parent-event, so the button correctly opens the picker — removing the child's attribute can't change that..js/.vue/.cssreadingno-parent-event.test_defaults/test_element_filtercheck prop values).Local gates:
pre-commit✓ ·mypy ./nicegui✓ ·pylint ./nicegui10.00/10 ✓Progress