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 9 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
Closes #1896

  • 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.

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.


<!-- 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

@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.

@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.

oliver-sanders and others added 8 commits October 11, 2024 11:47
* 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.
* Remove the "c" prefix from prerequisite expressions and task aliases.
* This matches `cylc show`.
Co-authored-by: Tim Pillinger <[email protected]>
Co-authored-by: Ronnie Dutta <[email protected]>
@oliver-sanders
Copy link
Member Author

oliver-sanders commented Oct 11, 2024

The cylc-flow blocker to this has not been resolved, however, I have come up with a workaround: cylc/cylc-flow#6403

I have also added an output completion expression (closes #1896) so this should now be more or less a direct analogue of cylc show with a similar display interface.

info

@MetRonnie
Copy link
Member

MetRonnie commented Oct 16, 2024

Have you/are you considering a client-side workaround (i.e. in the onUpdated method of the InfoCallback) rather than cylc/cylc-flow#6403 (still in draft)?

Other feedback: to me, these look like bullet points rather than yes/no indicators. (Tested on Windows, FF & Chrome)

image

@oliver-sanders
Copy link
Member Author

Have you/are you considering a client-side workaround

It's possible, but it would require iterating over the received delta and the fix would only apply to the info view and not to other views which might want this information (e.g. the tree view currently uses it).

I think the long-term fix should be cylc-flow end so would rather stick any bodges / workarounds there if possible. Happy to undraft the hack PR, was hoping we could come up with a more global fix.

@hjoliver
Copy link
Member

hjoliver commented Nov 5, 2024

Unblocked by merge of cylc/cylc-flow#6403 ... I think

@hjoliver hjoliver removed the blocked label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

info view: add completion expression info
5 participants