Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented May 1, 2025

Sort API node templates by specifying a set of template categories that should have their individual templates sorted by name alphabetically. This ensure that, for API node templates, there is no favoritism or bias in how the templates are ordered. For the existing template categories, maintain the current ordering (allow to be re-arranged by changing the index.json).

Resolves Comfy-Org/workflow_templates#45

┆Issue is synchronized with this Notion page by Unito

@christian-byrne christian-byrne requested a review from a team as a code owner May 1, 2025 23:08
} from '@/types/workflowTemplateTypes'
import { normalizeI18nKey } from '@/utils/formatUtil'

const SHOULD_SORT_CATEGORIES = new Set(['Image API', 'Video API'])
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you leave a comment here that explains why only 2 categories are sorted?

@christian-byrne christian-byrne requested a review from huchenlei May 1, 2025 23:49
@christian-byrne
Copy link
Contributor Author

Test failed because screenshot was not generated yet:

    Error: A snapshot doesn't exist at /home/runner/work/ComfyUI_frontend/ComfyUI_frontend/ComfyUI_frontend/browser_tests/tests/loadWorkflowInMedia.spec.ts-snapshots/workflow-svg-chromium-linux.png, writing actual.

Should be fixed by #3724

@huchenlei huchenlei merged commit 1cbc0fc into main May 2, 2025
9 of 10 checks passed
@huchenlei huchenlei deleted the alphabetical-sort-api-template branch May 2, 2025 01:30
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.

[Feature Request]: Make API templates alphabetical

3 participants