NSPanel Documentation ◆ Icon overview GitHub Deutsch

Navigation Flow

This tab draws the navigation of a panel as a graph: every page is a node, every connection between two pages a line. It shows at a glance whether the pages hang together as intended, and where each page comes from. Since 2.0.0 the tab is also an editor: with the tick box Edit navigation, prev, next, home and parent are dragged in the graph instead of being filled in field by field in the tab PageConfig.

The Navigation Flow with legend and graph

Contents:

1. What the tab shows

The graph shows what the adapter really built at its last start — not the content of the form. Per panel it shows:

The tab needs a running instance. At the top right it says Adapter online or Adapter offline; if the adapter does not answer within three seconds, "No data - Adapter might be offline or no panel configured." appears instead of the graph.

2. Header: filters and buttons

Control Effect
Panel selection (below the legend) Chooses the panel whose navigation is shown. The browser remembers the choice and restores it on the next visit.
Show system pages Shows or hides the internal pages (///…). The unlock page ///unlock always stays visible. Pages that turn up when it is switched on are placed around the nodes that already stand.
Show states Shows the state and channel nodes. They stand in an outer column on the right at the height of their page and move no page.
Show home links to main Switched off, the home lines pointing at main disappear — in large configurations almost every page has one and they cover everything else. They stay visible on the page just clicked and on pages with unsaved changes. The state is remembered per panel.
Edit navigation Switches the edit mode on, see section 6. The tick box stays disabled as long as there is no navigation data or the panel reports no topic.
Refresh Fetches the navigation data from the adapter again. Changes to links that are not saved yet are kept.
Auto layout (main button) Places only nodes without a saved position, next to the page that leads to them. All other nodes stay where they are. If there is nothing to place, a message says "All nodes already have a position".
▾ next to the button Menu with Place nodes without a position (the same as the main button) and Rearrange everything….
Rearrange everything… Rearranges every visible node (a tree starting at the main page, with many pages in several bands next to each other). ⚠️ This overwrites all positions set by hand — so the admin asks first ("Reorder navigation?", Cancel — keep order / Reorder — apply layout).

The three display tick boxes are display filters only and change nothing in the configuration.

On tablets and phones a note next to the panel selection points out that buttons from other flows need a double tap.

3. Reading the legend

The colour of a line says how two pages are linked:

Line Meaning
violet, arrow at both ends prev and next — the connection holds in both directions
turquoise next (next page)
blue-violet prev (previous page)
yellow, dashed home (jump to the start page)
red parent (parent page)
green, dashed target page of a page item (short press)
orange, dashed target page on a long press
blue-grey, thin dotted state or channel the page uses

The border of a node says where the page comes from: without colour from the configuration script of the panel, violet from the global script configuration, green from the admin configuration, yellow a system page or the default start page, blue-grey dashed a state node (not a page).

On top of that there are marks on a node:

Mark Meaning
Lock Page generated by the adapter from a page item (a popup, for example). Its navigation cannot be changed.
Pencil Script page whose navigation is overridden in the admin (see section 8).
Pencil in the warning colour The same page, but the script now delivers other links than it did at the time of the change.
Dashed outer border with a dot The links of this page were changed and are not saved yet.
Closed eye The page is Hidden and therefore locked on the panel while Hide pages is on there (see Hide pages). The tooltip: Locked (hidden): only reachable on the panel while “Hide pages” is off.

The origin answers the frequent question "why does the panel look different from what the script describes". With an equal name the admin page does not automatically win, though: a script page of the same panel keeps its name as long as the admin page is not the start page, the instance option for precedence is not set and the page pushed aside does not come from the global script or from the script of another panel — otherwise the adapter logs "Page with name … already exists, skipping!" and the admin page is dropped. The rule with all its exceptions is on Pages.

4. Arranging and collapsing

5. Page details on the right

A click on a node opens a panel on the right and highlights all lines of that page. For a page it holds the name, the headline (as long as it is a fixed one and not read from a state), the card type, the screensaver behaviour, the paging settings and the number of page items. If the page belongs to the admin configuration, the button Open page configuration leads straight into the tab PageConfig on that page; moved nodes are saved beforehand.

A state or channel node shows State info or Channel info instead: the id, the headlines, in which role and with which item type the page uses it, whether the value is shown instead of the icon, and the icons — if an icon itself comes from a state, the panel shows the current value together with the note which state it comes from. A click on the free area closes the panel.

6. Editing the navigation

The tick box Edit navigation turns the graph into an editor.

The edit mode with the handles on the nodes

What changes in the picture. Every editable page shows four enlarged source handles, and every page additionally shows the four target handles so that a connection can be dropped on it. Two-way prev/next connections are no longer drawn as one violet double-arrow line in edit mode, but as two separate lines: here every line stands for exactly one entry of the configuration.

Setting a link. Drag the source handle onto the target page. Which handle is dragged decides the link:

Handle on the node Link
top centre prev
bottom centre next
top left home
bottom left parent

Dropping also works on the area of the target node — nobody has to hit the small handle. A page cannot link to itself. The end of an existing, editable line can be dragged to another page; dragged into empty space, the line stays as it was.

Removing a link. A click on the line opens a menu at the pointer position. It lists all links between the two pages in both directions — a.next = b and b.prev = a lie on top of each other. Every entry that stands in the configuration can be removed (Remove prev: a → b).

The menu of a line in edit mode

Three cases in which nothing works:

If, according to the current, not yet saved configuration, the page is not assigned to the chosen panel at all, the warning "This page is not assigned to this panel in the current configuration - check the assignment in the page configuration tab" appears at the bottom. The graph then still shows the page from the last adapter start.

Where the change is written: for an admin page into its panel assignment (the same place the tab PageConfig edits with four select fields) — so the two ways are interchangeable. For a script page into a list of overrides of its own, see section 8.

7. Scope for pages assigned to all panels

If an admin page takes its navigation from the assignment (all), there is no row of its own for the panel shown that the change would fit into. The admin therefore asks ("Page is assigned to all panels"):

The choice is remembered per page and panel for the session; the next link of the same page is written without asking.

On a chart or power page taken over from the old admin tables that still takes its navigation from the script, this ends with the first link set here: from then on the navigation from the admin holds. See Migration.

8. Overriding script pages

Pages from the configuration script (the panel's own or the global one) can be relinked here too. The script stays untouched: the change is stored as an override in the instance configuration and laid over the script navigation by the adapter at every start — so it also survives sending the script again. Such pages carry a pencil in the graph.

Every override additionally remembers which links the script delivered at the time of the change. If it now delivers others, the override counts as stale: the pencil turns to the warning colour, and when the panel is loaded or changed the admin asks ("Script navigation changed"). The dialog compares three columns per page — Script at the time of the change, Script now, Your change — and offers four ways that hold jointly for all pages listed:

Button Effect
Merge Links that were changed by hand stay; all others follow the script.
Keep my change The links stay unchanged; the new script state is only remembered as the new basis (the warning disappears).
Take over the script The override is dropped, the page follows the script again. On a panel with the tick box Panel uses no script (NSPanelsetting) this button is not offered.
Later Closes the dialog without a decision. It is not asked again in this session.

The dialog "Script navigation changed" with the comparison table

An override can also be taken back one by one: the menu of a line holds Restore script navigation of "…" for that.

A stale override is applied nevertheless — so the panel runs with what was set here until the question is decided.

9. Saving and restart

Two things are saved separately:

After saving, the adapter restarts. The tab notices this itself, shows "Adapter is restarting, the view will be refreshed …" and reads the navigation again after three seconds, then every two seconds for at most one minute. The old view stays in the meantime. As soon as the new data reflects a change, the page loses its mark; if marks are left over, another read attempt follows automatically.

What the adapter still changes while building

Whoever does not recognise the lines afterwards finds the reason here:

Pitfalls


Source of this page: doc/en/naviFlow.md · Project on GitHub

  Back to top