Remove the dead tree 'loadfail' handler in browser.js, which calls a non-existent tree.isSelected()
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- javascript
- 领域
- frontend
调研方向
从 web/pgadmin/browser/static/js/browser.js 开始:找到 onLoadFailNode 函数(约第 1265-1278 行)及其在 pgadmin-browser:tree:loadfail 上的注册(约第 198 行)。在 web/pgadmin/static/js/tree/tree.js 中确认不存在 isSelected 方法,并确认没有任何地方触发 loadfail。完成的标准是:删除这个无效的处理函数及其注册;若保留主密码逻辑,则改用 self.tree.selected() 重写;并且浏览器加载时没有错误。
由索引模型根据 Issue 内容生成。
描述
onLoadFailNode in web/pgadmin/browser/static/js/browser.js (around lines 1265-1278) calls self.tree.isSelected(_nodeData), but the current Tree class (web/pgadmin/static/js/tree/tree.js) has no isSelected method, so it would throw a TypeError if it ever ran.
It is never reached in practice: the handler is registered for pgadmin-browser:tree:loadfail (browser.js around line 198), and nothing emits a loadfail event since the move away from aciTree; load failures are now handled in tree_nodes.ts. There is no user-visible effect today, so this is a clean-up: remove the handler and its registration (or, if the master-password handling in it is still wanted, rewrite it using self.tree.selected() and emit the event from the load failure path).
- 主要语言
- Python
- 星标
- 3.9k
- 派生
- 908
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 38
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pgadmin-org/pgadmin4 的其他 Issue
-
Feature
难度 2/5 1-3 小时 新手友好度 78/100
pgadmin-org/pgadmin4#10426 · 3 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Bug
难度 2/5 1-3 小时 新手友好度 75/100
pgadmin-org/pgadmin4#10361 ·
维护者通常 1 天内回复
-
Feature
难度 2/5 1-3 小时 新手友好度 68/100
pgadmin-org/pgadmin4#10272 · 5 条评论 ·
维护者通常 1 天内回复
-
Feature
难度 2/5 1-3 小时 新手友好度 76/100
pgadmin-org/pgadmin4#10157 · 1 条评论 ·
维护者通常 1 天内回复
-
Feature
难度 3/5 1-2 天 新手友好度 45/100
pgadmin-org/pgadmin4#10615 · 2 条评论 ·
维护者通常 1 天内回复
查看 pgadmin-org/pgadmin4 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
EchoTools/nevr-runtime#651 ·
维护者通常 1 天内回复
-
bug frontend rt sev-3
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
noontide-co/mainbranch#1211 · 1 条评论 ·
维护者通常 1 天内回复
-
[1.x Bug] run-operation --sql reports success but rolls back writes on transaction-capable adapters未关闭triage
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复