Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
173 changes: 173 additions & 0 deletions web_timeline_gantt_ux/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=====================
Web Timeline Gantt UX
=====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:192450072665c15bc0ea32e1da8e392c8bd6c7e1cb1dbcaa42afbd55684cc121
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
:target: https://github.com/OCA/web/tree/19.0/web_timeline_gantt_ux
:alt: OCA/web
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/web-19-0/web-19-0-web_timeline_gantt_ux
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=19.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module layers an Enterprise-style Gantt UX on top of
``web_timeline`` views, opt-in per view and implemented purely with
``patch()``: ``web_timeline`` itself is not modified and views that do
not opt in keep stock look and behavior.

|Overview|

Features:

- **Row per record** under collapsible group header bands with record
counts; collapse state persists to localStorage. Record names render
on the bars and overflow narrow pills (Enterprise-style labels); the
sidebar carries only the group bands.
- **Light theme via CSS design tokens**: the view's ``colors=`` rules
render as harmonized pills, weekends and the today column are shaded,
today's axis label becomes a pill, and the window stays anchored: the
view never re-zooms after an edit.
- **Dependency arrows** drawn as Bezier curves from predecessor end to
successor start, with hover tooltips.

|Dependency chains and fan-out|

- **Drag-to-link**: hover a bar and drag the circular handle at its end
onto another bar to create the dependency. Client-side validation
rejects self/duplicate/reverse links; a dashed pending arrow shows
while the write is in flight; the success toast offers Undo;
per-record gating via an ``allow_task_dependencies``-style related
field is respected when the model exposes one.

|Link handle|

- **Arrow removal**: click an arrow (or focus it and press Delete) and
confirm.
- **Dependency-aware moves**: dragging a bar whose record has dependents
asks whether the downstream chain shifts by the same delta, the record
moves alone, or the move is cancelled (the bar snaps back).
Multi-select drags get a single prompt.

|Status colors|

.. |Overview| image:: https://raw.githubusercontent.com/OCA/web/19.0/web_timeline_gantt_ux/static/description/gallery_overview.png
.. |Dependency chains and fan-out| image:: https://raw.githubusercontent.com/OCA/web/19.0/web_timeline_gantt_ux/static/description/gallery_fanout.png
.. |Link handle| image:: https://raw.githubusercontent.com/OCA/web/19.0/web_timeline_gantt_ux/static/description/gallery_handle.png
.. |Status colors| image:: https://raw.githubusercontent.com/OCA/web/19.0/web_timeline_gantt_ux/static/description/gallery_status_colors.png

**Table of contents**

.. contents::
:local:

Usage
=====

Opt a timeline view in with a single arch attribute (optionally with
status colors that the theme harmonizes):

.. code:: xml

<timeline
date_start="planned_date_start"
date_stop="planned_date_end"
default_group_by="project_id"
dependency_arrow="depend_on_ids"
colors="#ffffff: user_ids == []; #a8dbc0: state == '1_done'; #f0b9b3: state == '1_canceled'"
gantt_ux="true"
/>

Everything else is automatic:

- One row per record, grouped under collapsible bands of the
``default_group_by`` field. Click a band to collapse or expand it;
click a row to open the record.
- Drag a bar to reschedule (snaps to whole days); if other records
depend on it, a dialog asks whether to shift them along.
- To create a dependency, hover the predecessor bar and drag the circle
at its right end onto the successor. To remove one, click its arrow
and confirm.

Views without ``gantt_ux="true"`` keep stock ``web_timeline`` behavior.

Known issues / Roadmap
======================

- Two-click linking (select source, click target) as a
keyboard-accessible alternative to the pointer drag.
- Touch support for the hover-born link handles.
- Dark theme variant (the token block makes this a one-block addition).
- Dependency-aware moves currently shift only records loaded in the
current search domain.
- Many2many group-by uses the first value only (matches stock
``web_timeline`` item behavior).

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_timeline_gantt_ux%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Cubert GmbH

Contributors
------------

- Nima Ghorbani <ghorbani@cubert-gmbh.de>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-nghorbani| image:: https://github.com/nghorbani.png?size=40px
:target: https://github.com/nghorbani
:alt: nghorbani

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-nghorbani|

This module is part of the `OCA/web <https://github.com/OCA/web/tree/19.0/web_timeline_gantt_ux>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Empty file.
37 changes: 37 additions & 0 deletions web_timeline_gantt_ux/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Web Timeline Gantt UX",
"summary": "Enterprise-style Gantt layout, theme and interactive dependency"
" editing for web_timeline views (opt-in per view via gantt_ux)",
"version": "19.0.1.0.0",
"development_status": "Beta",
"category": "web",
"author": "Cubert GmbH, Odoo Community Association (OCA)",
"maintainers": ["nghorbani"],
"website": "https://github.com/OCA/web",
"license": "AGPL-3",
"depends": ["web_timeline"],
"installable": True,
"assets": {
"web.assets_backend": [
"web_timeline_gantt_ux/static/src/core/bezier.esm.js",
"web_timeline_gantt_ux/static/src/core/arch_parser_patch.esm.js",
"web_timeline_gantt_ux/static/src/gantt_layout/gantt_theme.scss",
"web_timeline_gantt_ux/static/src/gantt_layout/model_patch.esm.js",
"web_timeline_gantt_ux/static/src/gantt_layout/canvas_patch.esm.js",
"web_timeline_gantt_ux/static/src/gantt_layout/canvas_defs.xml",
"web_timeline_gantt_ux/static/src/gantt_layout/renderer_layout_patch.esm.js",
"web_timeline_gantt_ux/static/src/gantt_layout/controller_layout_patch.esm.js",
"web_timeline_gantt_ux/static/src/dependency_edit/dependency_edit.scss",
"web_timeline_gantt_ux/static/src/dependency_edit/dependency_link_dragger.esm.js",
"web_timeline_gantt_ux/static/src/dependency_edit/renderer_dep_patch.esm.js",
"web_timeline_gantt_ux/static/src/dependency_edit/controller_dep_patch.esm.js",
"web_timeline_gantt_ux/static/src/dependency_edit/move_cascade.esm.js",
"web_timeline_gantt_ux/static/src/dependency_edit/move_cascade_dialog.xml",
"web_timeline_gantt_ux/static/src/dependency_edit/move_cascade_patch.esm.js",
],
"web.assets_unit_tests": [
"web_timeline_gantt_ux/static/tests/**/*.test.js",
],
},
}
3 changes: 3 additions & 0 deletions web_timeline_gantt_ux/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
1 change: 1 addition & 0 deletions web_timeline_gantt_ux/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Nima Ghorbani \<ghorbani@cubert-gmbh.de\>
39 changes: 39 additions & 0 deletions web_timeline_gantt_ux/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
This module layers an Enterprise-style Gantt UX on top of `web_timeline`
views, opt-in per view and implemented purely with `patch()`: `web_timeline`
itself is not modified and views that do not opt in keep stock look and
behavior.

![Overview](../static/description/gallery_overview.png)

Features:

- **Row per record** under collapsible group header bands with record counts;
collapse state persists to localStorage. Record names render on the bars
and overflow narrow pills (Enterprise-style labels); the sidebar carries
only the group bands.
- **Light theme via CSS design tokens**: the view's `colors=` rules render as
harmonized pills, weekends and the today column are shaded, today's axis
label becomes a pill, and the window stays anchored: the view never
re-zooms after an edit.
- **Dependency arrows** drawn as Bezier curves from predecessor end to
successor start, with hover tooltips.

![Dependency chains and fan-out](../static/description/gallery_fanout.png)

- **Drag-to-link**: hover a bar and drag the circular handle at its end onto
another bar to create the dependency. Client-side validation rejects
self/duplicate/reverse links; a dashed pending arrow shows while the write
is in flight; the success toast offers Undo; per-record gating via an
`allow_task_dependencies`-style related field is respected when the model
exposes one.

![Link handle](../static/description/gallery_handle.png)

- **Arrow removal**: click an arrow (or focus it and press Delete) and
confirm.
- **Dependency-aware moves**: dragging a bar whose record has dependents asks
whether the downstream chain shifts by the same delta, the record moves
alone, or the move is cancelled (the bar snaps back). Multi-select drags
get a single prompt.

![Status colors](../static/description/gallery_status_colors.png)
8 changes: 8 additions & 0 deletions web_timeline_gantt_ux/readme/ROADMAP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- Two-click linking (select source, click target) as a keyboard-accessible
alternative to the pointer drag.
- Touch support for the hover-born link handles.
- Dark theme variant (the token block makes this a one-block addition).
- Dependency-aware moves currently shift only records loaded in the current
search domain.
- Many2many group-by uses the first value only (matches stock `web_timeline`
item behavior).
26 changes: 26 additions & 0 deletions web_timeline_gantt_ux/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Opt a timeline view in with a single arch attribute (optionally with status
colors that the theme harmonizes):

```xml
<timeline
date_start="planned_date_start"
date_stop="planned_date_end"
default_group_by="project_id"
dependency_arrow="depend_on_ids"
colors="#ffffff: user_ids == []; #a8dbc0: state == '1_done'; #f0b9b3: state == '1_canceled'"
gantt_ux="true"
/>
```

Everything else is automatic:

- One row per record, grouped under collapsible bands of the
`default_group_by` field. Click a band to collapse or expand it; click a
row to open the record.
- Drag a bar to reschedule (snaps to whole days); if other records depend on
it, a dialog asks whether to shift them along.
- To create a dependency, hover the predecessor bar and drag the circle at
its right end onto the successor. To remove one, click its arrow and
confirm.

Views without `gantt_ux="true"` keep stock `web_timeline` behavior.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web_timeline_gantt_ux/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading