Remove dead done prop from carousel slides - #6184
Merged
Merged
Conversation
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>
`Carousel._handle_value_change` was copy-pasted from `Stepper`, writing a `:done` prop onto every slide on each value change. `QStepperStep` has a `done` prop, but `QCarouselSlide` does not, so the loop only polluted each slide's DOM with a stray, silently-ignored attribute. Removing the override leaves the base `ValueElement._handle_value_change` (model-value sync) untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6 tasks
evnchn
marked this pull request as ready for review
July 25, 2026 06:17
falkoschindler
self-requested a review
July 26, 2026 20:37
The carousel no longer sets a `:done` prop on its slides, and QCarouselSlide has no such prop, so there is no observable behavior to guard. The test asserted on `slide._props`, which no merged test in the suite does. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
falkoschindler
approved these changes
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Carousel._handle_value_changesets a:doneprop on every slide on each value change, but Quasar'sQCarouselSlidehas nodoneprop — it's a dead no-op (copy-pasted fromStepper, wheredoneis a realQStepprop).Minimal reproduction (
nicegui/elements/carousel.py:43):→
True(a stray:doneattribute Quasar ignores)Implementation
Remove the dead
_handle_value_changeoverride. The baseValueElement._handle_value_changestill syncsmodel-value, so selection behaviour is unchanged.Dead-code provenance (git blame) & third-party safety
ui.carousel— Falko Schindler, decdf97 (2023-07-16). Thedoneloop is copy-pasted fromStepper(wheredoneis a realQStepprop);QCarouselSlidehas never had one. So this is author-copy-paste-error, not a feature obsoleted by later changes.:donewrite trigger a re-render that surfaces recently-added user content?):slide.props(':done=…')does callslide.update()when the done-state flips — butupdate()flushes only that slide element's own props (the inert:doneattribute); it does not re-render children. Recently-added user content is surfaced independently: NiceGUI auto-enqueues the parent's update whenever a child is created (element.py:85,87→enqueue_update(parent_slot.parent)). So removing this override cannot hide user content — confirmed by tracing the update path.Verification
slide._props; per Prefer behavior tests over tests coupled to implementation details #6219 that is a test coupled to internals rather than to behaviour, so it was dropped../nicegui· pylint 10.00/10 · pytest — all green.Progress