Open azeghers opened 4 years ago
Blocks #602
Good finding, I was able to reproduce it on current master
👍
Blocks #602
We discovered that #602 is not blocked entirely by this issue. We can tackle this separately.
This issue seems to stem from the fact that the annotations column and its cells aren't treated like the rest of the table cells.
For instance, its coordinates are stored as "2:annotation" instead of "2:4".
This results in helper functions returning NaN
, or selecting the wrong cell because multiple cells share the same id.
My suggestions would be the following :
-Since the context menu needs to be reachable from any cell, give rows a rowId
. It would make more sense than feeding it singular cell ids that are shared throughout the row.
-Treat the annotations column like the rest of the table, with a single, distinct id per cell and valid coordinates.
-The root objects shouldn't have collections of cells by type (input, output), but instead store whole rows and cols, and have a type attribute. This would make the visualization of the neighbor cells more intuitive.
Is this something that needs to be tackled earlier aka adding the "ready" label? @nikku
@azeghers mentions an important thing that we should talk about it in our weekly tomorrow.
The quirk is, that extensions can plug-in rows (and columns) and we need to find a way to handle that situation.
To evaluate the urgency on this bug, I'd look back and understand when it was introduced. Is it an old one or did we just recently break this behavior?
The bug was introduced via my context menu PR. Camunda Modeler 4.2 does not include it yet.
This issue will sit in the backlog until the bug is reported by users.
Findings :
export function getSelectableNodeById(elementId, container) {
const cells = queryAll(`[data-element-id="${ cssEscape(elementId) }"]`, container);
return cells[cells.length - 1];
}
Describe the Bug
In the decision table, pressing enter focuses the row below the currently selected cell, and if it's the last row, creates a new one and focuses it. But in the "Annotations" column, pressing enter from any selected row will just add a new one at the bottom and not change focus
Steps to Reproduce
Steps to reproduce the behavior:
Expected Behavior
The cursor falls to the next cell below, and if there isn't one, a new row is added and focused.
Actual Behavior
The cursor stays in the selected cell and a new row is systematically appended at the end of the table.
Environment