fix(PipelineRunList) - Make Pipeline Run List to be consistent and add dev preview badge. - #2819
Conversation
|
/approve |
andrewballantyne
left a comment
There was a problem hiding this comment.
There are some duplication issues at play here.
There was a problem hiding this comment.
I am not sure about just selecting Succeeded... I've reached out to UX. Personally I don't like it, so I want to make sure it's intentional and desired we mimic the logic from the pipeline -> pipeline-run page.
There was a problem hiding this comment.
There was a problem hiding this comment.
@abhinandan13jan I've got confirmation that we want all of them selected. Could you make this change to this page as well as the Pipeline's PipelineRun Page? Ideally, making use of the same data-object between the two.
There was a problem hiding this comment.
Updated this
There was a problem hiding this comment.
We are duplicating filters. frontend/packages/dev-console/src/components/pipelines/PipelineRuns.tsx has the same filters.
There was a problem hiding this comment.
Making sure, the same filter is used in both places
There was a problem hiding this comment.
I think we need to start making concerted efforts to avoid any id or reference value being a magic string. It's not great for maintenance moving forward. I'd like to see an enum be used for the filter ids and in a common file that can be used for other filters that match this design.
For instance - there is similar logic found here: frontend/packages/dev-console/src/components/pipelines/PipelineAugmentRuns.tsx
There was a problem hiding this comment.
Using enums now
|
/assign @andrewballantyne |
4061560 to
5e6fcf6
Compare
There was a problem hiding this comment.
There was a problem hiding this comment.
@abhinandan13jan you changed the label. Could you undo that?
There was a problem hiding this comment.
Perhaps what we can do here is make a map instead of an enum. We could us the ListFilterIds as keys in the map so show they are related. Also, ListFilterStatuses is probably better named listFilterLabels as they are labels.
Something like:
export const listFilterLabels = {
[ListFilterIds.Running]: 'Running',
[ListFilterIds.Failed]: 'Failed',
[ListFilterIds.Succeeded]: 'Complete', // this was the old label noted in a previous comment
};
There was a problem hiding this comment.
RunFilters could probably be named runFilters as it's not a class/component.
| export const RunFilters = [ | |
| export const runFilters = [ |
There was a problem hiding this comment.
I believe enums are supposed to be singular.
| export enum ListFilterIds { | |
| export enum ListFilterId { |
5e6fcf6 to
a2cb6a8
Compare
There was a problem hiding this comment.
The order is not consistent. Perhaps we make items a variable somewhere else? We'd want the filter items to be in the same order throughout the pipelines otherwise the user instinctively won't be able to click on filters without stopping to read what order they happen to be in on a given page.
There was a problem hiding this comment.
Sorry I missed this on my previous review passes.
There was a problem hiding this comment.
Updated to have a consistent order throughout
a2cb6a8 to
78c7dea
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinandan13jan, andrewballantyne, rohitkrai03 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinandan13jan, andrewballantyne, rohitkrai03 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test e2e-aws |
|
/test e2e-aws |
Addresses
https://jira.coreos.com/browse/ODC-1925
https://jira.coreos.com/browse/ODC-1924