Comfy-Org / Comfy-Org/ComfyUI_frontend
Investigate & fix SubgraphBreadcrumbItem blueprint tag: localization and visibility
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Summary
The `Tag` element in `src/components/breadcrumb/SubgraphBreadcrumbItem.vue` that renders a "Blueprint" label has two pre-existing concerns that need investigation and resolution:
1. **Hard-coded string**: The tag's `value` prop is a hard-coded `"Blueprint"` string rather than a localized string via `vue-i18n` (`t()`). This violates the project's coding guideline to use `vue-i18n` for all user-facing strings configured in `src/locales/en/main.json`.
2. **Tag may never be visible**: The tag is conditionally rendered with `v-if="item.isBlueprint"`. It is unclear whether `item.isBlueprint` is ever set to a truthy value in practice, meaning this UI element may be dead/unreachable code.
## Tasks
- [ ] Investigate whether `item.isBlueprint` is ever truthy in the current codebase (i.e., whether this code path can be reached)
- [ ] If reachable, replace the hard-coded `"Blueprint"` value with a localized string via `t('subgraphBreadcrumb.blueprint')` and add the key to `src/locales/en/main.json`
- [ ] If unreachable, consider removing the dead code or adding the plumbing needed to support blueprint items in the breadcrumb
## References
- PR: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11472
- Review comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/11472#discussion_r3110923549
- Requested by: @pythongosssss
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11473-Investigate-fix-SubgraphBreadcrumbItem-blueprint-tag-localization-and-visibility-3486d73d365081d29f36f0e906192b8d) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.