Skip to content
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 priorities to quickstarts within bundles #227

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

randomnetcat
Copy link
Contributor

@randomnetcat randomnetcat commented Aug 7, 2024

Companion PR to RedHatInsights/learning-resources#65.

This makes a few changes:

  • Add a priority field to the relationship between a quickstart and a tag, which can only be set on a bundle tag.
  • When quickstarts for a single bundle is requested, sort the returned quickstarts in ascending order of priority (defaulting to 1000). Note that this doesn't handle the case of multiple tags because the ordering that should be used would be unclear (and because the learning-resources UI only cares about single bundles (https://github.com/RedHatInsights/learning-resources/blob/cf6fc78ad7ddeed19576e4b0eaee318c9b0fbb92/src/hooks/useQuickStarts.ts#L94-L96).
  • When seeding quickstarts, add all bundle priorities in a new bundle_priority metadata tag, so that the learning-resources UI has a chance to examine them (see the linked PR).

Priorities are set by adding them to metadata.yml, e.g.:

kind: QuickStarts # kind must always be "QuickStarts"
name: rbac-configuring-access
tags: # If you want to use more granular filtering add tags to the quickstart
  - kind: bundle
    value: settings
  - kind: bundle
    value: iam
    priority: 1100

@randomnetcat randomnetcat changed the title Sort quickstarts by priority Add priorities to quickstarts within bundles Aug 8, 2024
@randomnetcat randomnetcat requested a review from a team August 8, 2024 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant