Skip to content

fix(widgets): respect the id prop on TimelineWidget and TooltipWidget - #11099

Merged
chrisgervang merged 1 commit into
masterfrom
chr/widgets-timeline-id
Nov 16, 2026
Merged

chrisgervang merged 1 commit into
masterfrom
chr/widgets-timeline-id

Conversation

@chrisgervang

@chrisgervang chrisgervang commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

Background

new TimelineWidget({id: 'playback'}).id is 'timeline'. Both widgets declare an id class field, which runs after the base Widget constructor and overwrites the id it read from props. A second timeline therefore can't get its own id. I checked the other widgets: none declares id as a class field.

Change List

  • TimelineWidget: removed the id class field. Its defaultProps.id was already 'timeline'.
  • TooltipWidget: moved 'default-tooltip' from the class field into defaultProps.
  • Unit tests: the id prop is respected, and the defaults are unchanged.

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 TimelineWidget and TooltipWidget ignored user-provided id props.

Previously, class field initializers ran after the base Widget constructor and overwrote any passed id with hardcoded defaults. The id class fields have been removed in favor of defaultProps, 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.

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
@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; custom IDs now work without changing the defaults.

Summary

Fixes TimelineWidget and TooltipWidget so supplied id values are no longer overwritten.

  • TimelineWidget and TooltipWidget keep caller-provided IDs.

Reviews (2) · Last reviewed commit: "fix(widgets): respect the id prop on Tim..." · Reviewed by Greptile

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 83.327% (-0.001%) from 83.328% — chr/widgets-timeline-id into master

@chrisgervang
chrisgervang added this pull request to the merge queue Nov 16, 2026
Merged via the queue into master with commit 62f4fac Nov 16, 2026
9 checks passed
@chrisgervang
chrisgervang deleted the chr/widgets-timeline-id branch November 16, 2026 22:40
@chrisgervang chrisgervang mentioned this pull request Nov 22, 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)
@chrisgervang

Copy link
Copy Markdown
Collaborator Author

Released in deck.gl 9.4.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants