Skip to content

[IMP] web_timeline: optional dependency arrows toggle - #3621

Draft
nghorbani wants to merge 1 commit into
OCA:19.0from
nghorbani:19.0-web_timeline-dependency-arrows-toggle
Draft

[IMP] web_timeline: optional dependency arrows toggle#3621
nghorbani wants to merge 1 commit into
OCA:19.0from
nghorbani:19.0-web_timeline-dependency-arrows-toggle

Conversation

@nghorbani

Copy link
Copy Markdown

Module

web_timeline

What

Dependency arrows are drawn whenever a timeline view sets dependency_arrow.
On charts with many links they clutter the view and there is no way to hide
them.

This adds a Dependencies toggle button to the timeline toolbar. It appears
only when dependency_arrow is configured, is active by default (arrows shown),
and hides / redraws the arrows on click. Existing views are unchanged: the
default behaviour is still "arrows shown".

Implementation

  • timeline_renderer.esm.js: a reactive showDependencies state
    (default Boolean(dependency_arrow)) now gates draw_canvas();
    _onToggleDependenciesClicked() flips it and redraws.
  • timeline_renderer.xml: the toolbar button, rendered via
    t-if="dependency_arrow".
  • QUnit tests: button is absent without dependency_arrow; present and toggles
    its state when configured.
  • USAGE readme updated; version bumped to 19.0.1.1.0.

Notes

Marked as draft. This was developed on a Windows machine where I could not
run the module's Hoot/QUnit suite, the full pre-commit stack (prettier
@prettier/plugin-xml, eslint), or oca-gen-addon-readme locally, so
README.rst still needs regenerating from the readme/ fragments and CI should
validate formatting and tests. Happy to push fixups once CI reports.

Dependency arrows were always drawn when the view sets dependency_arrow, which clutters charts with many links. Add a Dependencies button to the timeline toolbar that shows/hides the arrows at runtime; they stay on by default so existing views are unchanged. Covered by QUnit tests; version bumped to 19.0.1.1.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants