project_inputs.html uses undefined file variable for dropdown IDs, lacks visual tag badges, and has empty delete labels

未关闭 适合新手
#2,354 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Rucha0901 已经在做这个了。

开始于 2026年11月19日。

  • #2355 来自 @Rucha0901 —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
82/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
django, python
领域
frontend

调研方向

从 scanpipe/templates/scanpipe/panels/project_inputs.html 开始,检查 issue 中描述的下拉菜单 ID、标签显示和删除按钮的 data-label。查看输入源如何提供标识符、标签、文件名和下载 URL,然后更新模板,使 ID 唯一、已有标签可见,并在删除标签缺失时回退使用 URL。在包含多个输入、一个带标签的输入以及一个尚未获取的 URL 输入的项目详情页上确认每项行为。

由索引模型根据 Issue 内容生成。

描述

Describe the bug

The Project Inputs panel (scanpipe/templates/scanpipe/panels/project_inputs.html) contains template bugs:

  1. Uses undefined file.filename|slugify on lines 9 and 11, resulting in duplicate id="dropdown-input-" across input items.
  2. input_source.tag is never displayed visually in the inputs list.
  3. Delete button data-label is empty for un-downloaded URLs where filename is not yet set.
System configuration
  • Which version of ScanCode.io are you running? main
  • Are you running the app using Docker? No
  • On which OS? macOS
  • What inputs are you using? URL / file inputs
  • Which pipeline are you running? N/A
To Reproduce

Steps to reproduce the behavior:

  1. Open a project detail page with input sources.
  2. Inspect input dropdown elements; see duplicate id="dropdown-input-".
  3. Set a tag on an input source; observe it is not displayed in the list.
  4. Add an input source by URL without fetching and click delete; see empty label in the confirmation dialog.
Expected behavior
  • Dropdown IDs and aria-controls should be unique per input.
  • Input source tag badges should be displayed visually when present.
  • Delete confirmation modal should fall back to download URL when filename is empty.
主要语言
Python
星标
226
派生
222
平均合并
1 天 5 小时
30 天内合并 PR
32

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aboutcode-org/scancode.io 的其他 Issue

查看 aboutcode-org/scancode.io 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。