(core) Revealing hidden pages with visible children.

Summary:
When a page is hidden, all its nested pages are shown as children of
a different page that happens to be before (as in pagePos) that page.

This diff shows those pages as CENSORED.

Test Plan: Updated

Reviewers: alexmojaki

Reviewed By: alexmojaki

Subscribers: alexmojaki

Differential Revision: https://phab.getgrist.com/D3670
This commit is contained in:
Jarosław Sadziński
2022-10-28 10:04:59 +02:00
parent b263d83122
commit 7c9cb9843e
9 changed files with 295 additions and 25 deletions

View File

@@ -298,7 +298,7 @@ export class TreeViewComponent extends Disposable {
let headerElement: HTMLElement;
let labelElement: HTMLElement;
let handleElement: HTMLElement;
let handleElement: HTMLElement|null = null;
let offsetElement: HTMLElement;
let arrowElement: HTMLElement;
@@ -329,13 +329,14 @@ export class TreeViewComponent extends Disposable {
),
delayedMouseDrag(this._startDrag.bind(this), this._options.dragStartDelay),
),
css.itemLabelRight(
treeItem.hidden ? null : css.itemLabelRight(
handleElement = css.centeredIcon('DragDrop',
dom.style('top', (use) => use(deltaY) + 'px'),
testId('handle'),
dom.hide(this._options.isReadonly),
),
mouseDrag((startEvent, elem) => this._startDrag(startEvent))),
mouseDrag((startEvent, elem) => this._startDrag(startEvent))
),
),
...args
);