mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
A "Roadmap" view for organizing/summarizing cards by version or release milestone in a timeline layout, similar in spirit to a ProductPlan-style release roadmap chart. Structurally this is the existing Frappe Gantt view grouped by the VALUE of a board custom field (a "Version"/"Release"-style text or dropdown field) instead of one flat list of cards: a dropdown lets the user pick which custom field to group by (defaulting to the first text/dropdown field, or a clear empty-state message when the board has none), each distinct value renders as its own row, and every row is its own small Frappe Gantt timeline built from the SAME cardsToTasks()/loadGanttLib() code the plain Gantt views already use, plotted over the same startAt/dueAt/endAt card dates - no new charting library, no custom-field creation UI, this view only consumes fields the board already has. client/components/boards/roadmapView.js reuses client/components/gantt/frappeGantt.js's loadGanttLib/cardsToTasks/ popupDetailsHtml verbatim, and models/lib/chartCalculations.js's computeCardsByCustomFieldGroup does the pure "group cards by a custom field's value" fold (mirroring computeCardsByAssigneeGroup's shape: a card with no value falls into a "no value" sentinel group, sorted last). Registered in client/features/boards.js like every other board view. Extends tests/boardViewMenu.test.cjs's VIEWS array for the end-to-end menu/helper/template/stylesheet wiring, and adds unit tests (positive, negative and sort-order) for computeCardsByCustomFieldGroup and its translateGroupLabel handling in tests/chartCalculations.test.cjs. Thanks to datenwort and xet7 ! Closes #627,
34 lines
700 B
CSS
34 lines
700 B
CSS
/* Roadmap board view (#627) - one Frappe Gantt row per custom-field value.
|
|
* .gantt-view / .frappe-gantt-container base styling is already provided by
|
|
* client/components/gantt/gantt.css and frappeGantt.css (loaded globally by
|
|
* client/features/gantt.js); this file only adds the field-picker and
|
|
* per-row layout that are specific to this view. */
|
|
|
|
.roadmap-field-picker {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin: 8px 0 16px;
|
|
}
|
|
|
|
.roadmap-field-picker-label {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.roadmap-row {
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.roadmap-row-heading {
|
|
margin: 0 0 6px;
|
|
}
|
|
|
|
.roadmap-gantt-container {
|
|
min-height: 60px;
|
|
}
|
|
|
|
.roadmap-empty {
|
|
opacity: 0.7;
|
|
padding: 12px 0;
|
|
}
|