trenz-gmbh / trenz-docs

An SPA wiki made by TRENZ
MIT License
3 stars 0 forks source link

Get rid of 'Overview' #4

Closed chucker closed 2 years ago

chucker commented 2 years ago
ricardoboss commented 2 years ago

What happens when clicking the title and no overview is available?

Three options:

chucker commented 2 years ago

What happens when clicking the title and no overview is available?

ADO shows a… weird message:

image

But ADO also expands/collapses when clicking the title.

So maybe we should always expand/collapse, but simply show an empty page if there's no content.

keep the current behavior (show 404)

I think that's bad. It has "the user did something wrong" vibes.

So, now I'm leaning towards:

ricardoboss commented 2 years ago

Personally, I'm not a fan of always expand/collapse, because then the button suddenly has two functions: open the overview page and expand/collapse. What if I have already expanded the subtree and want to view the overview again without collapsing the subtree?

I think two distinct actions should have two distinct buttons.

chucker commented 2 years ago

I definitely don’t like the current 404 behavior, in any case.

ricardoboss commented 2 years ago

I second that too

ricardoboss commented 2 years ago

We agreed to implement a very similar navigation tree as Azure DevOps has:

if the node is expanded and the node is currently active
  collapse the children
else if the node is expanded and not currently active
  if the node has content            // our custom logic, ADO shows a 'this is a folder message'
    navigate to the node
else if the node is not expanded and currently active
  expand the children
else
  if the node has content
    navigate to the node
  expand the children

The API only needs to tell the frontend whether a specific node has content or not.