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

Order OVA finder alphabetically #2793

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Order OVA finder alphabetically #2793

merged 1 commit into from
Oct 4, 2024

Conversation

ChrisBAshton
Copy link
Contributor

Trello: https://trello.com/c/tB7aFZQB/2981-add-alphabetical-sorting-for-ova-finder

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.

Copy link
Contributor

@minhngocd minhngocd left a comment

Choose a reason for hiding this comment

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

The default order property seems deprecated according to the finder.json schema

    "finder_default_order": {
      "description": "DEPRECATED: Use “sort” property",
      "type": "string"
    },

The sort property seems to be the preferred option:

"finder_sort": {
      "description": "These are the options for sorting the finder",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "key",
          "name"
        ],
        "additionalProperties": false,
        "properties": {
          "default": {
            "description": "Indicates if this should be the default sort option",
            "type": "boolean"
          },
          "key": {
            "description": "Rummager field name, with an optional preceding “-” to sort in descending order",
            "type": "string"
          },
          "name": {
            "description": "Label for the sort option",
            "type": "string"
          }
        }

so i guess something like

"sort": [
      {
        "key": "title",
        "name": "A-Z",
        "default": true
      }
]

@ChrisBAshton
Copy link
Contributor Author

@minhngocd I tried deploying the non-deprecated version (#2794) but it didn't work.

I think given none of the other finders use the sort key, and that there are five other live finders using the default_order key, let's just merge this one as-is and come back to it later.

@ChrisBAshton ChrisBAshton merged commit d58093c into main Oct 4, 2024
21 checks passed
@ChrisBAshton ChrisBAshton deleted the order-alphabetically branch October 4, 2024 14:49
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.

2 participants