-
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
Add search and filter functionalities to GScan #499
Conversation
Codecov Report
@@ Coverage Diff @@
## master #499 +/- ##
==========================================
- Coverage 63.29% 62.75% -0.54%
==========================================
Files 44 42 -2
Lines 970 964 -6
Branches 59 57 -2
==========================================
- Hits 614 605 -9
- Misses 338 340 +2
- Partials 18 19 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Tests are broken for now, but it would be better to get a pre-review of the new functionality before I spend some time fixing them. I have not included workflow host nor Cylc version, as I think I would need to iterate the workflows and collect their hosts and versions. Not sure if there are plans to add this in GraphQL (don't think so? But we can add it later). @cylc/core would anyone be willing to play and see what needs changing, what I missed, any bugs, etc, please? 😬 |
BTW, I tried to add the magnifier icon, as in the design sketch. Unfortunately Material Design puts the icon out of the text field. There might be some way to move the magnify icon inside the text field to match the sketch, but that would probably require some further investigation (i.e. read source code of vuetify in TypeScript, and docs, more than 1/2 hours work at least). Also tried the But my goal was to be as close to the design sketch as possible. |
Looks good @kinow ; I'll try to take a closer look tomorrow. I think the other selection criteria can be added later (and will presumably require updating the GraphQL schema and the workflow data sent by the UIS). |
The good news is that we will kill off a few of those task states pre-release. Are you filtering for task state or job state? (there are only 5 job states). |
workflow state, and task state. The UI displays each state in the enum If the intersection is not empty, the workflow stays in the UI. |
Yep those are task states, however job states are just a subset of task states:
(should probably stick that in an enum along with task states at some point) Because GScan is displaying jobs (squares) it would make more sense to filter by job states rather than task states (circles). Since SoD I think task states will always reflect the most recent job state (as I think this may need a rethink at some point in the future, we have talked about displaying tasks rather than jobs in GScan too. |
2e14ba1
to
901750a
Compare
Rebased, resolved conflicts, and tested again. Ready for a pre-review. If the UI elements, and the functionality are OK, I will add the unit/e2e tests, and then it should be ready for the final review 👍 |
@oliver-sanders ah, good catch! I was intentionally applying task states to only running workflows. Removed that That's because GraphQL |
@hjoliver if you have time later, would you mind taking a look at the way the WIP search/filter are working here, please? If you find no issues with how it works, I will add the test/changelog and mark as ready for review :) Thanks! |
There's an explanation for that. When you come back, the UI takes some ms/seconds to re-apply the filter. The filter is using the task states. By default it shows every workflow that has any task state. Offline/stopped workflows won't have any states, unless you have executed them at least once since the UIS was started. Thinking about it, I am keen to leave that filter disabled by default, and show everything, every workflow regardless of the task state. I think that makes more sense. If you want to limit by task state, then you have to choose the states and filter. |
Ah, makes sense.
Agreed.
This might change once the UIS (possibly via |
With so many task states (albeit fewer of them by the time we release 8.0) can we have a select-all/deselect-all option? |
By coincidence, I am working on this at this right moment! 😬 Just trying to align the checkbox next to the filter name, then will push the new commits. |
448af7f
to
48ca645
Compare
Codecov Report
@@ Coverage Diff @@
## master #499 +/- ##
==========================================
+ Coverage 83.92% 84.06% +0.13%
==========================================
Files 58 58
Lines 1045 1073 +28
Branches 74 77 +3
==========================================
+ Hits 877 902 +25
- Misses 146 149 +3
Partials 22 22
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
src/components/cylc/gscan/GScan.vue
Outdated
</v-list> | ||
</v-card> | ||
</v-menu> | ||
</div> |
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.
These filters are not looking really nice here and in the Tree component or view. Have added a post-it to take a better look, see if we can unify or find a better way to organize them. If so, will create a follow-up issue 👍
/** | ||
* The filtered workflows. This is the result of applying the filters | ||
* on the workflows prop. | ||
* @type {[ |
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.
This is GH UI. Valid JS & jsdoc.
Done @hjoliver Tested locally. It looked intuitive to me. First implementation was selecting all only if none was selected. That was a bit strange to use. Also tried using a checkbox to the right of the text (i.e. "workflow states" [ ]). But aligning that Then realized that it could just be another checkbox, aligned with the other check boxes. It became "easier to read"? Not sure if that makes sense, but I found the final product good enough 😬 Could you take another look, please, @hjoliver ? Thanks |
Looks good in your gif - I'll try it myself later, after getting the xtrigger PR tests workings.... |
Not sure if Codecov hasn't updated, but it's showing in its UI +0.14% (unit+e2e combined): https://app.codecov.io/gh/cylc/cylc-ui/compare/499 |
0323553
to
7cc65ab
Compare
Rebased, conflicts fixed. |
7cc65ab
to
253e827
Compare
This branch has a problem sorting workflows. The problem has been fixed on #537 , I've added the fix here, but would have to add the updated tests too, so reverted the change. When reviewing, take a look at the search and filter functionality only 👍 unless that PR is merged first and this is rebased. |
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.
🎆
Search and filter look good to me.
253e827
to
ad1f688
Compare
Rebased fixing conflicts, but now unit tests failing 😥 |
Tests fixed. Did a quick manual testing, everything looks to be in order 👍 |
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.
Nice, looks great @kinow 👍 tested as working well.
Thanks @hjoliver !!! 🍾 |
These changes close #337
Improves the
GScan
component addingRequirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.