Repository navigation
fix(widgets): respect the id prop on TimelineWidget and TooltipWidget - #11099
Merged
Merged
Conversation
Both classes declared an `id` class field, which runs after the base Widget constructor and overwrote the id it read from props. Move the default id into defaultProps instead, as the other widgets do. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn
[Medium impact] This PR appears safe to merge; custom IDs now work without changing the defaults. SummaryFixes
Reviews (2) · Last reviewed commit: "fix(widgets): respect the id prop on Tim..." · Reviewed by Greptile |
This was referenced Nov 12, 2026
29 of 30 tasks
chrisgervang
added a commit
that referenced
this pull request
Nov 24, 2026
…#11099) Both classes declared an `id` class field, which runs after the base Widget constructor and overwrote the id it read from props. Move the default id into defaultProps instead, as the other widgets do. Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn Co-authored-by: Claude <[email protected]> (cherry picked from commit 62f4fac)
Collaborator
Author
|
Released in deck.gl 9.4.2. |
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.
Background
new TimelineWidget({id: 'playback'}).idis'timeline'. Both widgets declare anidclass field, which runs after the baseWidgetconstructor and overwrites the id it read from props. A second timeline therefore can't get its own id. I checked the other widgets: none declaresidas a class field.Change List
TimelineWidget: removed theidclass field. ItsdefaultProps.idwas already'timeline'.TooltipWidget: moved'default-tooltip'from the class field intodefaultProps.Generated by Claude Code
Note
Low Risk
Low risk bug fix that ensures custom widget IDs are respected without altering default behavior.
Overview
Fixes an issue where
TimelineWidgetandTooltipWidgetignored user-providedidprops.Previously, class field initializers ran after the base
Widgetconstructor and overwrote any passedidwith hardcoded defaults. Theidclass fields have been removed in favor ofdefaultProps, allowing custom IDs while keeping the default values unchanged.Reviewed by Cursor Bugbot for commit d0b6ccc. Bugbot is set up for automated code reviews on this repo. Configure here.