Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata view: introduce a minimal task metadata view #1886

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Aug 8, 2024

Addresses #582

  • Bare bones task metadata view.
  • Display task metadata, prerequisites and outputs.
  • Display / functionality improvements and support for other information to follow in future PRs.

Screenshot from 2024-08-08 15-44-54

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included if this is a change that can affect users
  • Cylc-Doc - bumped changes entry to a PR (view is likely to change further before release)
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

@oliver-sanders oliver-sanders added this to the 2.6.0 milestone Aug 8, 2024
@oliver-sanders oliver-sanders self-assigned this Aug 8, 2024
@hjoliver
Copy link
Member

hjoliver commented Aug 9, 2024

Ping @ScottWales @ColemanTom (you were wanting this for viewing prerequisites etc.)

@ScottWales
Copy link

Great! thanks for this

@oliver-sanders
Copy link
Member Author

oliver-sanders commented Aug 12, 2024

Added offline-data and tests.

Many, many enhancements and features left to add to this view, but will leave it at basic metadata, prereqs and outputs for this PR. The main work here is getting the template for the view in place (it's quite different to other views).

Further enhancements will slot into this template fairly easily provided the required data is present (and accurate) in the schema.

* Bare bones task metadata view.
* Display task metadata, prerequisites and outputs.
* Support for viewing task configuration, broadcasts, etc to follow in
  future PRs.
* Support for markup (e.g. markdown & reStructured text) to arrive in
  future PRs (pending a decision on how to configure the markup
  language).
* Added offline data.
* Added component tests to cover component display.
* Added e2e test to cover opening view, expansion state and data
  provision.
src/components/cylc/Info.vue Outdated Show resolved Hide resolved
v-model="panelExpansionModel"
>
<!-- The metadata -->
<v-expansion-panel class="metadata-panel">
Copy link
Member

@wxtim wxtim Aug 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO most users will be coming here for the pre-reqs and outputs and not the metadata - these should go first and probably not be collapsed.

Could they go in neighbouring Columns?

Happy to spin this out into an issue and not block this PR.

e.g.:

| Prerequisites |                | Outputs     |
| list of       |   task icon    |             |
------------------------------------------------
| Metadata                                     |   

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Columns aren't an option (or at least aren't always an option) because they won't work in narrow widths.

We can't expand all of the sections by default as there will be a lot of them, from prerequisites, to completion expression satisfaction, to runtime configuration and broadcasts. Prereqs are important, but so are all the other sections.

We could start with nothing expanded, but I thought the title, description and URL (often used to link to documentation) are notably important and deserve to be displayed at all times. Important messages like "do not re-run this task" or "if it fails, try re-running in shortstep mode" will be prominent as a result.

Copy link
Member

@wxtim wxtim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Manually tested
  • Read PR content

I've made some comments, none of which should block the PR going in if they cost any effort to implement.

* Remove the "c" prefix from prerequisite expressions and task aliases.
* This matches `cylc show`.

<!-- The prereqs -->
<v-expansion-panel class="prerequisites-panel">
<v-expansion-panel-title color="blue-grey-lighten-2">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is inconsistent with the others

Suggested change
<v-expansion-panel-title color="blue-grey-lighten-2">
<v-expansion-panel-title color="blue-grey-lighten-1">

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On purpose.

There will be other sections in the near future. I tried adding a few extras and it ended up as a giant block of "blue-grey" which didn't make it especially obvious that these are individual sections that can be expanded.

I thought it was clearer if the sections were striped ("lighten-1", "lighten-2", "lighten-1", ...).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me it doesn't really indicate clickability, it looks like it's selected or has keyboard focus or something. Not too important

Co-authored-by: Tim Pillinger <[email protected]>
Co-authored-by: Ronnie Dutta <[email protected]>
}
},

computed: {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Funny, now that I am used to using setup composition API, having separate sections for computed, methods etc seems rather arbitrary)

@oliver-sanders
Copy link
Member Author

oliver-sanders commented Aug 16, 2024

Unfortunately, this work may be blocked by cylc/cylc-flow#6307 which also imposes some back-compatibility constraints :(

I can hack it for outputs, but I'm not sure I can hack it for prerequisites.


// prefixes a tick or cross before the entry
.condition:before {
content: '☐';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oliver-sanders#113

Had a little play about - I like mdiProgressHelper as an icon to indicate outputs that haven't been completed yet

image

Copy link
Member Author

@oliver-sanders oliver-sanders Aug 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasonable, might be tempting to do it with native unicode though?

I had changed to content; ' ' locally.

@oliver-sanders
Copy link
Member Author

oliver-sanders commented Aug 16, 2024

We could overcome the block by moving from a delta subscription to a regular subscription.

However, this would request the complete data for the task on every change which would get expensive.


// for user-defined text where whitespace should be preserved
.markup {
white-space: pre;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To allow to text to wrap instead of overflowing

Suggested change
white-space: pre;
white-space: pre-wrap;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants