-
Notifications
You must be signed in to change notification settings - Fork 27
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
Auto-flatten single-child directories in GScan sidebar #1416
Conversation
ReviewInitial testing looks good Is it OK (probably tangential) that the task state LEDs dissapear under the edge of the GScan if the sidebar isn't wide enough? The do reappear if you resize the bar. I have not yet checked this on master, but will do so once I've finished this review and am happy to put the branch I'm reviewing away. Possible BugIf I change # global.cylc
[install]
max depth = 8 Workflows installed at a depth > 4 don't show at all! |
They do for me |
Co-authored-by: Aaron David Cole <[email protected]>
Flatten them instead of automatically collapsing them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good (was a fun diff to unravel).
Workflow collapsing looks good, haven't tested deeply yet, will give that a go shortly.
I did spot one issue where the workflow icons stopped being clickable after state change.
Also, another one, but I'm not sure if it's related to this PR. The counter doesn't make a whole lot of sense to me:
This is made more pronounced by the collated totals for a workflow installation hierarchy as the counters don't appear to be summed?
A possible enhancement to the state total summing which would be really handy if it's easy to squeeze into this PR. Keep the collapsed summary open when the node is expanded. I.E. always show the aggregate state totals.
:startTime="(latestJob(node) || {}).startedTime" | ||
<slot v-bind="{ isExpanded }"> | ||
<!-- the node value --> | ||
<!-- TODO: revisit these node.type values that can be replaced by constants later (and in other components too). --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea what this TODO means?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it means
-v-if="node.type === 'cycle'"
+v-if="node.type === CYCLE"
<div | ||
:class="nodeDataClass" | ||
:style="nodeDataStyle" | ||
> | ||
<template v-if="node.type === 'cycle'"> | ||
<!-- NOTE: cycle point nodes don't have any data associated with them | ||
at present so we must use the root family node for the task icon. | ||
We don't use this for the v-cylc-object as that would set the node | ||
type to family. --> | ||
<Task | ||
v-cylc-object="node" | ||
v-if="node.familyTree?.length" | ||
:key="node.id" | ||
:task="node.familyTree[0].node" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the TreeView specific code go into a TreeViewTreeItem component similar to how the GScanView specific code when into GScanTreeItem component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it but decided to hold off. Performance-wise, I don't think this is too much of a problem because there is not likely to be too many workflows in GScan compared to cycle points/families/tasks in the Tree view which could be hundreds. (Having said that, we did see that one case of run249!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, it probably should go there, but there's no pressure to do so ATM?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want me to open an issue for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do, I was mostly just trying to understand the motive for the changes.
@@ -16,7 +16,7 @@ | |||
*/ | |||
|
|||
/** query used for the graphiql test */ | |||
const query = `query App { | |||
const query = `query Workflow { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how this works but when you run this query in the Cypress window you get the response from the field with the matching name at src/services/mock/json/index.cjs
. (But you get an empty response if running the query in the normal browser 🤷♂️.) Because I changed App
to be an array of workflows, the result of this query seems to be the last workflow in the array. But I didn't change Workflow
so it still returns workflow one
Fixed btw (in 4404fc0 I think) |
…ves a child of many-child workflow-parts
I think this is the case you are talking about - a single-child workflow-part that is itself a child of a many-child workflow-part? Fixed in 90c92dd |
Binding `:class` on the component that the `v-cylc-object` directive is applied to interfered with adding the `c-interactive` class in the directive. So I have changed it to a data attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Tried to break locally.
- Read the code.
Closes #865
Closes #1417
Partially addresses #952
Supersedes #1175 & #1406
This is @AaronDCole's #1175 squash rebased onto master plus some tidying up and optimisation and fixes for a couple of small issues.
Update:
TreeItem
component: computed properties that are only relevant for GScan #1417Check List
CONTRIBUTING.md
and added my name as a Code Contributor.CHANGES.md
entry included if this is a change that can affect users?.?.x
branch.