In Cylc 7, we used meta-description to include baseline troubleshooting steps on every task. This was accessible both via command line (cylc show) and in the GUI. The current Cylc 8 web interface doesn’t appear to have any mechanism to show the meta-description or to provide the meta-URL link.
Will that be added soon? Is it already there and I’m just not seeing it?
Yes, we plan to do that, and the Cylc 8 UI will be far more capable in this respect than the old one.
opened 04:54PM - 21 Jul 22 UTC
design
**Cylc 7**
Cylc supports task metadata e.g:
```ini
[runtime]
[[mytas… k]]
[[[meta]]]
# the standard metadata fields used by some cylc commands
title = My Task
url = https://...
description = """
Lorel ipsum ...
"""
# you can create custom fields too
system = xyz
group = abc
```
Cylc 7 made minimal use of task metadata, namely in commands like `cylc show` but some metadata was also used in the GUI.
**Cylc 8**
Cylc 8 has greater potential here. Earlier design sketches had an info "pane", "tounge" or "panel" which was intended to show the `[meta]` info for the selected task (or the workflow itself as workflows also support `[meta]`). The GUI has moved on since then, the Lumino tab system is now the natural place for displays, I think dividing the screen beyond this would be unhelpful.
So here's my suggestion, we implement a "metadata view" (or "info" view). This view gives you a text box to type in the name of the task (we should be able to make this a combo box with all task names pre-loaded). Once you've selected a task it displays the `[meta]`. For convenience we can create a shortcut from the task menu which opens a new "info" view pre-initalised at the specified task. We should also consider adding the "title" field to the task menu.
**Sketch**
Here we have an info view showing some basic metadata. The task menu has been opened for the task "baz" on the right. The "title" has been added to the top of the menu along with an info button which is the shortcut for opening the info tab on the left.
![task-metadata](https://user-images.githubusercontent.com/16705946/180265593-38044e73-68cf-4fe3-8311-e8707ffb8558.png)
**Metadata & Formats**
Some sites are already making use of the "URL" field. In [at least] one case, using HTML pages generated from markdown. We can make this much easier (rendering markdown in a web app is trivial).
* Suggest rendering `[meta]` items as markdown by default.
> This part is more cylc-flow / cylc-rose focused but bringing it up here for context
Many tasks already have extensive documentation in the form of Rose application metadata. There is an existing Rose config to ReST generator which is used by the Rose documentation.
* Consider adding a `[meta]_markup_format` config to allow this to be configurable in the future?
* Or should this be a marker in the content itself e.g. `#markdown`, `#rest`, ...?
* Consider a cylc-rose plugin to drag in Rose application metadata where available.
**Workflows & Documentation**
Workflows can have `[meta]` too. We might want to add an option for viewing the workflow metadata here too (and possibly a shortcut for it in the workflow toolbar).
Cylc has documentation too! We might want to add an option view viewing it here!
**Additional context**
Once discussed / agreed this should be quite quick to implement.
* List of task names can be obtained by listing taskdefs (called `Tasks` in the schema).
* Metadata can be obtained from the taskdef.
**Pull requests welcome!**
<!-- This is an Open Source project - please consider contributing code yourself
(please read `CONTRIBUTING.md` before starting any work though). -->
Relatively easy, but it hasn’t risen to a top priority quite yet. Might be a good one for someone at your site to help out with?
Relatively easy for the existing Cylc devs sure… I’m looking at it and I see I have a lot to catch up on with webdev… SCSS refresher, Vue, GraphQL, tests, your APIs and potentially Tornado… The documentation on the cylc-ui repo is excellent though, so that will help.
There’s a bit of a learning curve, but once you’ve got a template that works it’s relativity easy to hack around with the HTML/JS/CSS to get what you want out of it. You don’t need expertise in all the technologies used.
If you’re interested in taking a look, I can provide a template with the cylc-ui boiler-plate filled in. It would need a query and some HTML/CSS/JS for selecting the task to view and presenting the returned data.
To work out the query, start a workflow, launch the GUI and open the “GraphiQL” explorer (from the sidebar). From here you can have a poke around the schema to find out what data is available. I expect you’ll want a query something like this to get the required data:
workflows {
id
taskProxies {
id
task {
meta {
title
description
URL
}
}
}
}
The cylc-ui boilerplate wasn’t especially obvious for this view (somewhat different to the others).
Added a template view here with all the cylc-ui boilerplate sorted:
opened 04:54PM - 21 Jul 22 UTC
design
**Cylc 7**
Cylc supports task metadata e.g:
```ini
[runtime]
[[mytas… k]]
[[[meta]]]
# the standard metadata fields used by some cylc commands
title = My Task
url = https://...
description = """
Lorel ipsum ...
"""
# you can create custom fields too
system = xyz
group = abc
```
Cylc 7 made minimal use of task metadata, namely in commands like `cylc show` but some metadata was also used in the GUI.
**Cylc 8**
Cylc 8 has greater potential here. Earlier design sketches had an info "pane", "tounge" or "panel" which was intended to show the `[meta]` info for the selected task (or the workflow itself as workflows also support `[meta]`). The GUI has moved on since then, the Lumino tab system is now the natural place for displays, I think dividing the screen beyond this would be unhelpful.
So here's my suggestion, we implement a "metadata view" (or "info" view). This view gives you a text box to type in the name of the task (we should be able to make this a combo box with all task names pre-loaded). Once you've selected a task it displays the `[meta]`. For convenience we can create a shortcut from the task menu which opens a new "info" view pre-initalised at the specified task. We should also consider adding the "title" field to the task menu.
**Sketch**
Here we have an info view showing some basic metadata. The task menu has been opened for the task "baz" on the right. The "title" has been added to the top of the menu along with an info button which is the shortcut for opening the info tab on the left.
![task-metadata](https://user-images.githubusercontent.com/16705946/180265593-38044e73-68cf-4fe3-8311-e8707ffb8558.png)
**Metadata & Formats**
Some sites are already making use of the "URL" field. In [at least] one case, using HTML pages generated from markdown. We can make this much easier (rendering markdown in a web app is trivial).
* Suggest rendering `[meta]` items as markdown by default.
> This part is more cylc-flow / cylc-rose focused but bringing it up here for context
Many tasks already have extensive documentation in the form of Rose application metadata. There is an existing Rose config to ReST generator which is used by the Rose documentation.
* Consider adding a `[meta]_markup_format` config to allow this to be configurable in the future?
* Or should this be a marker in the content itself e.g. `#markdown`, `#rest`, ...?
* Consider a cylc-rose plugin to drag in Rose application metadata where available.
**Workflows & Documentation**
Workflows can have `[meta]` too. We might want to add an option for viewing the workflow metadata here too (and possibly a shortcut for it in the workflow toolbar).
Cylc has documentation too! We might want to add an option view viewing it here!
**Additional context**
Once discussed / agreed this should be quite quick to implement.
* List of task names can be obtained by listing taskdefs (called `Tasks` in the schema).
* Metadata can be obtained from the taskdef.
**Pull requests welcome!**
<!-- This is an Open Source project - please consider contributing code yourself
(please read `CONTRIBUTING.md` before starting any work though). -->
Needs HTML/CSS/JS/Tests filling in.
2 Likes
Awesome. Thanks! It was indeed very easy to get going. Just needed the code and Yarn to spin up the dummy instance. Very nice!
3 Likes