Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

UI metadata files. Screen

abratashev edited this page Feb 4, 2020 · 2 revisions

Screen

Screen is a navigation container that contains view elements.

image

Screen metadata stored on screen.json file.

Example of screen.json file

{
  "name": "example",
  "title": "Example screen",
  "primaryViewName": "oneWidgetView",
  "primaryViews": [
    "oneWidgetView"
  ],
  "navigation": {
    "menu": [
      {
        "title": "Some group",
        "child": [
          {"viewName": "firstView"},
          {"viewName": "secondView"}
        ]
      }, {
	     "_comment": "other navigation elements here"
      }
    ]
  }
}

this document contain following fields:

  • name - Unique name of Screen, must match with file name (i.e. example.screen.json)
  • title - Name of screen in navigation menu. Part of interface, that user can see.
  • primaryViewName - Name of view that opens when user click on screen in navigation bar.
  • primaryViews - if user don't have permission to open view in primaryViewName field (for example because it does not specify in responsibilities), you can specify array of views in this field. The first view available to the user will be chosen.
  • navigation - List of views and group of views with a tree structure. Determines how the user menu will look like. See https://github.com/tesler-platform/tesler/wiki/UI-metadata-files.-Screen.-Navigation