Skip to content

fix: remove deprecated keyboard option from vis-timeline#826

Open
fanxing11 wants to merge 1 commit into
ActivityWatch:masterfrom
fanxing11:fix/remove-deprecated-keyboard-option
Open

fix: remove deprecated keyboard option from vis-timeline#826
fanxing11 wants to merge 1 commit into
ActivityWatch:masterfrom
fanxing11:fix/remove-deprecated-keyboard-option

Conversation

@fanxing11
Copy link
Copy Markdown

vis-timeline v7 dropped the keyboard configuration option (it was part of the original vis.js library). Passing it triggers a console warning:

Unknown option detected: "keyboard". Did you mean "end"?

This shows up as an error in the Raw Data view — reported in ActivityWatch/aw-server-rust#603.

The fix just removes the keyboard block from VisTimeline.vue options. horizontalScroll is kept since it's still a valid vis-timeline v7 option.

vis-timeline v7 removed the `keyboard` configuration option that
existed in the original vis.js library. Passing it triggers a
console warning:

  Unknown option detected: "keyboard". Did you mean "end"?

This also causes an error in the Raw Data view (see
ActivityWatch/aw-server-rust#603).

The `horizontalScroll` option is retained since it is still
supported in vis-timeline v7.
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 20, 2026

Greptile Summary

Removes the keyboard configuration block from VisTimeline.vue to eliminate the "Unknown option detected: keyboard" console warning produced by vis-timeline v7, which dropped that option from its predecessor vis.js. horizontalScroll is retained as it remains valid in v7.

  • The deleted block (keyboard: { enabled: true, speed: { x: 10, y: 0, zoom: 0.02 } }) was silently ignored by vis-timeline v7, so its removal has no functional impact on keyboard navigation behavior.
  • The inline comment is updated from "Keyboard & scroll navigation" to "Horizontal scroll navigation" to accurately reflect what remains.

Confidence Score: 5/5

Safe to merge — removes a four-line option block that vis-timeline v7 already ignores, eliminating a spurious console warning with no change in runtime behaviour.

The change is a strict removal of a configuration key that vis-timeline v7 no longer recognises. Because the library was already silently ignoring the block, no keyboard-navigation behaviour changes between the before and after states. The comment is also updated to stay accurate.

No files require special attention.

Important Files Changed

Filename Overview
src/visualizations/VisTimeline.vue Removes the deprecated keyboard vis-timeline option that triggered a console warning in v7; keeps horizontalScroll unchanged and updates the adjacent comment to reflect the remaining option.

Sequence Diagram

sequenceDiagram
    participant Vue as VisTimeline.vue
    participant vt as vis-timeline v7

    Note over Vue,vt: Before fix
    Vue->>vt: "new Timeline(el, [], [], { horizontalScroll, keyboard: {...} })"
    vt-->>Vue: ⚠️ Console warning: "Unknown option detected: keyboard"

    Note over Vue,vt: After fix
    Vue->>vt: "new Timeline(el, [], [], { horizontalScroll })"
    vt-->>Vue: ✅ No warning, timeline initialises cleanly
Loading

Reviews (1): Last reviewed commit: "fix: remove deprecated keyboard option f..." | Re-trigger Greptile

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.

1 participant