Skip to content

Add tags from filter_categories#206

Closed
drewbutlerbb4 wants to merge 3 commits intoclaimed-framework:mainfrom
drewbutlerbb4:filter-tags
Closed

Add tags from filter_categories#206
drewbutlerbb4 wants to merge 3 commits intoclaimed-framework:mainfrom
drewbutlerbb4:filter-tags

Conversation

@drewbutlerbb4
Copy link
Contributor

Adds the tags from asset.filter_categories into the Featured Page cards.
Signed-off-by: Andrew-Butler Andrew.Butler@ibm.com

Screen Shot 2021-09-09 at 9 32 13 AM

Signed-off-by: Andrew-Butler <Andrew.Butler@ibm.com>
@mlx-bot
Copy link
Collaborator

mlx-bot commented Sep 9, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: drewbutlerbb4

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

@drewbutlerbb4
Copy link
Contributor Author

@ckadner the default for tags is to not have any tags if you think there should be a default tag I can add one.

const description = firstSentence(props.description || 'Component for your Pipelines.')

const tags = tag.includes(',') ? tag.split(',') : [tag]
const tags = Object.keys(asset.filter_categories).map((key: any) => asset.filter_categories[key])
Copy link
Contributor

Choose a reason for hiding this comment

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

does this work if the object has no filter_categories? i.e. pipelines don't have 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.

Ah I thought we made the filter_categories tag mandatory for all assets, but I forgot that pipelines are different. I'll fix that.

Copy link
Contributor

Choose a reason for hiding this comment

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

@drewbutlerbb4 -- could you modify the code to allow for missing filter_categories so we can merge this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ckadner -- This is an unfinished draft, in a meeting we discussed this and decided it was not ready to merge. With the addition of a variable number and length of tags, the individual cards can get bugged. Long tags can cause portions of the card to become invisible this is especially noticeable for Models (which have a logo for the model type).

If your opinion since the meeting has changed then I can fix to allow for missing filter_categories and merge this. But we will need to add a follow-up issue for the card bug.

Copy link
Contributor

@ckadner ckadner Oct 18, 2021

Choose a reason for hiding this comment

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

This PR comment was about a functional change to make sure the code works in the absence of the filter_categories for pipelines.

My take-away from earlier meetings was, that this PR was to wait for other priorities at the time, and to limit the number of filter_categories label values to 3 (or 5) based on experiments.

In the future I (/we) should add conclusions from meetings to the issues or pull requests right away to avoid confusions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ckadner, sure I have updated as you have requested.

@ckadner
Copy link
Contributor

ckadner commented Sep 9, 2021

@ckadner the default for tags is to not have any tags if you think there should be a default tag I can add one.

no, no default tags

Signed-off-by: Andrew-Butler <Andrew.Butler@ibm.com>
@drewbutlerbb4 drewbutlerbb4 marked this pull request as ready for review October 22, 2021 18:55
Signed-off-by: Andrew-Butler <Andrew.Butler@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants