Skip to content

Conversation

@abhinandan13jan
Copy link
Contributor

@abhinandan13jan abhinandan13jan commented Jan 8, 2020

Addresses - https://issues.redhat.com/browse/ODC-2454

Renames & Reorders existing filters in Dev Catalog
P.S: Helm is not added as it will be added in a later PR #3850
Screencast from 01-10-2020 04_41_17 PM

@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 Jan 8, 2020
@openshift-ci-robot openshift-ci-robot added the component/core Related to console core functionality label Jan 8, 2020
@abhinandan13jan abhinandan13jan changed the title [WIP]feat(dev-catalog): Adjust filters as per developer needs feat(dev-catalog): Adjust filters as per developer needs Jan 8, 2020
@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 Jan 8, 2020
@abhinandan13jan abhinandan13jan changed the title feat(dev-catalog): Adjust filters as per developer needs [WIP] feat(dev-catalog): Adjust filters as per developer needs Jan 8, 2020
@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/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 8, 2020
@abhinandan13jan abhinandan13jan changed the title [WIP] feat(dev-catalog): Adjust filters as per developer needs feat(dev-catalog): Adjust filters as per developer needs Jan 8, 2020
@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 Jan 8, 2020
@andrewballantyne
Copy link
Contributor

/kind feature

@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 8, 2020
@abhinandan13jan abhinandan13jan changed the title feat(dev-catalog): Adjust filters as per developer needs [WIP] feat(dev-catalog): Adjust filters as per developer needs Jan 8, 2020
@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 8, 2020
@abhinandan13jan abhinandan13jan changed the title [WIP] feat(dev-catalog): Adjust filters as per developer needs feat(dev-catalog): Adjust filters as per developer needs Jan 9, 2020
@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 Jan 9, 2020
@rohitkrai03
Copy link
Contributor

@abhinandan13jan Your PR seems to have broken the logic for the badges in each card. It was working previously and is there in the design docs of your story as well. But you screencast doesn't have that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you changing kind -> type?

Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have a use case that fits this type of change? The current acceptance criteria for the story doesn't seem like it needs this change at the moment.

Copy link
Contributor

Choose a reason for hiding this comment

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

I do not get this change? Why was this necessary? The filters worked out previously as intended even without these changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

The changes here also broke the badge feature. Now there are no badges being shown on the card.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

filterGroup has now been changed to type instead of kind. The ability of a type is to hold more than one kind wherever required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The badges work perfectly with the latest changes

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any badges in the screencast that you've shared with the PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Plus, i don't see the point of grouping multiple kinds into a type for filters. In the end it just needs to filter the items in catalog with ability to have multiple filters selected at once. That was already working perfectly fine whichout these changes. Am not sure if am missing something else here. That's why i added comments to the story as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that is true. But this adheres to the initial discussion regarding the implementation. The changes can be reverted, if UX confirms that there is no need for grouping of the kinds in the near future. Anyway I'll make the changes go away in that case.

Copy link
Contributor

@rohitkrai03 rohitkrai03 Jan 10, 2020

Choose a reason for hiding this comment

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

I just want to understand from an implementation point of view what benefits we are getting by grouping kinds here. UX may be thinking it in a way that all unmanaged service are in one group and I agree that's logical but purely from implementation and code changes what will be the benefits?

Copy link
Contributor

Choose a reason for hiding this comment

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

From a flat data structure you're making it into a nested object struture. And then making the changes to the filtering logic to accomodate the change in data structure. Plus there is no actual grouping of kinds happening here. That doesn't seem right to me.

Copy link
Contributor Author

@abhinandan13jan abhinandan13jan Jan 10, 2020

Choose a reason for hiding this comment

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

The existing data structure used for the filters is neither a flat, nor a linear one. It comprises a single layer nesting of objects by filterGroups. For adding flexibility of having multiple kinds per key in a filterGroup, I simply added another layer of objects by nesting the same existing structure of data, which I referred to as grouping.

However, this has been reverted now to one kind per filter.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do not add the helm filter here as there is no helm integration till now. My PR adds the filter for that - #3850

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could remove this. But the filters in the referenced PR wouldn't work with type integration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This works perfectly with the existing item structure. Hence, if the items with kind HelmChart are added, it will fit in without the need to make any changes in the filters.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see a point adding a filter that doesn't have any item in it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just part of the UX for accommodating future needs, IMO.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, I think those future needs should be handled by the future story that adds that feature in future. That is actually part of the acceptance criteria for the Helm stories and not part of this one. Even thought the mockups show that in this one as well. We can clarify this with UX.
cc: @serenamarie125

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've put out Helm from the filters

Copy link
Contributor

Choose a reason for hiding this comment

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

This is wrong because Helm charts are not based on ImageStreams

Copy link
Contributor Author

Choose a reason for hiding this comment

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

forgot to update the name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed all kind groupings

@abhinandan13jan abhinandan13jan force-pushed the dev-catalog-filter branch 3 times, most recently from 27a4c84 to 7bea248 Compare January 10, 2020 11:22
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 10, 2020
@abhinandan13jan abhinandan13jan changed the title feat(dev-catalog): Adjust filters as per developer needs feat(dev-catalog): Rename & Reorder existing filters in Dev Catalog Jan 10, 2020
@abhinandan13jan
Copy link
Contributor Author

@rohitkrai03 Please re-review, I have removed all grouping logics. The PR currently Renames & Reorders existing filters in Dev Catalog

@christianvogt
Copy link
Contributor

The patternfly catalog, along with operator hub use title case for the Type. I understand that the mock ups show TYPE with a different style. But to stay consistent with Operator Hub I suggest we keep it as Type for now.

Copy link
Contributor

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

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

You're also failing tests in frontend/__tests__/components/catalog.spec.tsx as they checked specific order of the type filters and what the count would be.

Copy link
Contributor

@serenamarie125 serenamarie125 left a comment

Choose a reason for hiding this comment

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

From a UX perspective, the TYPE filters and card badges look as designed. Nice work!

@andrewballantyne
Copy link
Contributor

From a UX perspective, the TYPE filters and card badges look as designed. Nice work!

The patternfly catalog, along with operator hub use title case for the Type. I understand that the mock ups show TYPE with a different style. But to stay consistent with Operator Hub I suggest we keep it as Type for now.

@christianvogt and @serenamarie125 I think you're in conflict with your statements.

@serenamarie125
Copy link
Contributor

@christianvogt I didn't see that comment - the style of TYPE should definitely match what it is on OperatorHub, although I'm not sure you changed that

Copy link
Contributor

Choose a reason for hiding this comment

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

@serenamarie125 this change makes the two pages unbalanced is what @christianvogt is saying.

Today (before this change) this is the two views:

Screen Shot 2020-01-10 at 3 18 33 PM
Screen Shot 2020-01-10 at 3 18 58 PM

So changing it to all capitals makes it not match the Operator Hub (and the colour / spacing is different than the designs)

@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 11, 2020
@abhinandan13jan
Copy link
Contributor Author

abhinandan13jan commented Jan 11, 2020

@christianvogt changed TYPE -> Type,
@andrewballantyne Fixed tests

@christianvogt
Copy link
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 11, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinandan13jan, christianvogt, serenamarie125

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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 11, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 9f09cc6 into openshift:master Jan 11, 2020
@spadgett spadgett added this to the v4.4 milestone Jan 14, 2020
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/core Related to console core functionality kind/feature Categorizes issue or PR as related to a new feature. 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.

9 participants