Skip to content

fix(PipelineRunList) - Make Pipeline Run List to be consistent and add dev preview badge. - #2819

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
abhinandan13jan:prun-devbadge
Oct 10, 2019
Merged

fix(PipelineRunList) - Make Pipeline Run List to be consistent and add dev preview badge.#2819
openshift-merge-robot merged 1 commit into
openshift:masterfrom
abhinandan13jan:prun-devbadge

Conversation

@abhinandan13jan

Copy link
Copy Markdown
Contributor

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 24, 2019
@openshift-ci-robot openshift-ci-robot added the component/dev-console Related to dev-console label Sep 24, 2019
@abhinandan13jan abhinandan13jan changed the title [WIP]fix(PipelineRunList) - Make Pipeline Run List to be consistent and add dev preview badge. fix(PipelineRunList) - Make Pipeline Run List to be consistent and add dev preview badge. Oct 1, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 1, 2019
@rohitkrai03

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 1, 2019

@andrewballantyne andrewballantyne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There are some duplication issues at play here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

cc @serenamarie125

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated this

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We are duplicating filters. frontend/packages/dev-console/src/components/pipelines/PipelineRuns.tsx has the same filters.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Making sure, the same filter is used in both places

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Using enums now

@andrewballantyne

Copy link
Copy Markdown
Contributor

/assign @andrewballantyne

@andrewballantyne andrewballantyne Oct 9, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we actually get rid of this page? #2917 will cover adding this badge generically without the need for an additional file.

Doh - nvm, we need this page for the filters. Whomever gets in last (this PR or #2917) will need to merge in the getBadgeFromType logic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@abhinandan13jan you changed the label. Could you undo that?

@andrewballantyne andrewballantyne Oct 9, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
};

@andrewballantyne andrewballantyne Oct 9, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

RunFilters could probably be named runFilters as it's not a class/component.

Suggested change
export const RunFilters = [
export const runFilters = [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I believe enums are supposed to be singular.

Suggested change
export enum ListFilterIds {
export enum ListFilterId {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry I missed this on my previous review passes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated to have a consistent order throughout

@andrewballantyne

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 10, 2019
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1 similar comment
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@andrewballantyne

Copy link
Copy Markdown
Contributor

/test e2e-aws

@andrewballantyne

Copy link
Copy Markdown
Contributor

/test e2e-aws

@openshift-merge-robot
openshift-merge-robot merged commit f5b20d1 into openshift:master Oct 10, 2019
@spadgett spadgett added this to the v4.3 milestone Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/dev-console Related to dev-console lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants