qiqi
|
bf15030799
|
perf(gallery): 1.8.3 拖动停靠栏时重排节流(宽度变化 <4px 不重排、合并到一帧)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 40s
用户反馈拖动图库面板很卡。原因是面板宽度的 ResizeObserver 每帧触发 renderGrid:整格 clear + 重建全部卡片、
重新挂事件、重新 paint 缩略图,一张卡就十来个 DOM 节点,几十张就是几百节点/帧。
改动(plugins/gallery/main.js + styles.css):
- measure():宽度变化不足 4px 不重排;重排用 requestAnimationFrame 合并,一帧最多一次
- 缩略图 img 加 decoding=async(解码移出主线程,减少拖动时的掉帧)
- .iwb-history-item 加 contain: layout style(把布局/样式计算限制在卡片内部)
试过「复用 DOM 节点(缓存卡片,重排只移动不重建)」但会让 e2e 里的图库面板加载失败,已回退,
先把节流 + contain + async decode 这组低风险优化发出去。
|
2026-11-28 02:02:42 +08:00 |
|
qiqi
|
89d8f5ddef
|
fix(gallery): 1.8.2 列宽按「真正滚动容器」的可用宽度算,最右一列不再被裁
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m34s
现象:图库 4 列排布时最右一列被窗口裁掉(用户截图)。
原因:renderGrid 用 wrap.clientWidth(面板全宽)当可用宽度,而实际滚动容器右侧还有滚动条与内边距,
列宽按全宽均分后总宽超出可视区,最右一列被裁。
改动(plugins/gallery/main.js):
- 新增 usableW():沿 scrollerOf() 找到真正滚动的容器,取其 clientWidth 减去左右 padding 与 4px 余量
- renderGrid / measure 都改用 usableW(),并且每次都采用实测值(不再因为差值 ≤1 而沿旧值)
- colW 改为 floor,避免四舍五入后 n 列总宽超出容器
|
2026-11-28 01:44:12 +08:00 |
|
qiqi
|
6c598e3898
|
fix(gallery): 1.8.1 回退懒加载(1.8.0 让大量卡片永远停在「加载中…」),双击改事件委托
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 45s
用户反馈 1.8.0 之后:图库加载不完、双击打不开、卡片被窗口裁掉。
- 懒加载撤销:IntersectionObserver 在停靠栏里不稳定 —— 部分卡片(尤其右列)永远收不到 intersecting,
一直停在「加载中…」,没有 <img> 也就没有点击/双击目标。改回同步取缩略图(同 1.7.5 行为)。
- 双击改为在 grid 上事件委托(按 data-name 处理),不再依赖某张 <img> 存活;
即使卡片被重绘替换,双击仍能打开预览。
- pick() 里补一次 measure():面板被拖窄后列数会停在旧值上,卡片被窗口裁掉(1.8.0 取消整格重绘后失去了这个副作用修复)。
- 保留 1.8.0 的两个改进:选中只改 class(不整格重绘、不跳顶)、重排前后恢复 scrollTop。
|
2026-11-28 01:37:45 +08:00 |
|
qiqi
|
31ffde68ce
|
feat(gallery): 图库插件 1.8.0 —— 懒加载缩略图、选中不跳顶、双击稳定
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 53s
用户反馈三个问题,都能在代码里对上:
1) 加载不及时:renderGrid 一次性为所有条目发 IPC 取缩略图(每张一次 invoke)
2) 点选后自动回到顶部:pick() → render() → renderGrid() 整个网格 clear + 重建,滚动容器内容被换掉
3) 双击打不开:第一次点击触发整格重建,正在双击的 <img> 被销毁,dblclick 再也落不到同一个元素上
(鼠标 hover 动效只是让它更明显,根因是重绘把节点换了)
改动(plugins/gallery/main.js):
- 缩略图按可见性懒加载:IntersectionObserver(上下预取 300px),前 30 张仍同步取(首屏/e2e)
- pick() 只就地切换选中 class 与勾选角标(syncSelection),不再整格重绘 ⇒ 滚动位置不动、双击元素不换
- render() 重排前后保存/恢复滚动容器的 scrollTop(刷新、显示更多、改列宽时不跳顶)
- 卡片加 data-name,选中态查找用 querySelectorAll 一次完成
- 版本 1.8.0,manifest 与 plugins/index.json 的哈希同步
|
2026-11-28 01:30:04 +08:00 |
|
qiqi
|
82927cb53e
|
release: v3.26.97 配色/选中态/标注落盘/粘贴/收藏五修
|
2026-11-26 06:56:05 +08:00 |
|
qiqi
|
7b43002f6b
|
release: v3.26.88 图库落盘 P0(状态可见+一键补存)
|
2026-11-25 22:57:30 +08:00 |
|
qiqi
|
a4c5ccad0e
|
release: v3.26.85 动效 token + 下载浮层(图库/输出节点)
|
2026-11-25 22:44:45 +08:00 |
|
qiqi
|
7f6a44512a
|
chore(plugins): 同步 gallery 1.7.2(图片卡片去插入仅留下载)+ album/browser 文案同步
Verify (Gitea) / gate (build · unit · facts) (push) Canceled after 1m2s
|
2026-11-25 18:48:55 +08:00 |
|
qiqi
|
d7404fe720
|
chore(plugins): 同步 gallery 1.7.1(底栏三个图标加大)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 57s
- 刷新 / 打开本地目录 / 设置:SVG 14 → 18(--iwb-icon-lg),描边 1.6,
按钮命中区 20×20 → 28×28,工具组 gap 0 → 4,设置浮层 bottom 34 → 40。
- 浮层层级按 §3.6 从裸 z-index:30 收进 --iwb-z-ctx-menu(91),过 token-lint。
- 市场包 gallery-1.7.1.zip、market 索引/首页、下载站索引与页面同步;
公网回读版本 1.7.1 且 zip sha256 与索引一致。lint:tokens / test:tokens / test:facts 全过。
|
2026-11-25 14:16:36 +08:00 |
|
qiqi
|
9b78535791
|
feat(gallery): v3.26.61 出图即入图库 + 插入落地本地副本(能标注)
用户报障:① 生图后图库不显示上游传来的图 ② 图库多个入口插入的是链接,画布不能标注。
用户裁定 B6 = 复制:多占空间可以接受,要求不丢数据。
出图即见
- handleCompletedJob 每张完成即 archiveEntryNow(串行队列 + 等缩略图),不再只在整轮结束写一次
- 宿主新增 IWBPluginGallery.emit / onChanged;图库插件订阅后 260ms 防抖重拉
(此前只有「面板可见且距上次拉取 >5s」一个入口,生成时面板一直可见 ⇒ 永远不刷)
插入能标注
- insertOutputsToCanvas 取源改本地字节优先:原图档 → 清单 data → 缩略图 → 按需抓远程
(桌面端走 Rust 请求不受 CORS)→ 按档缩尺寸 → {__blob} 引用(字节落 images/canvas/)
- 抓不到才保留原链接,节点 data.srcUrl 留痕 + toast 提示「可能无法标注」;图库拖入同一收口
- getNodeImage 候选补 data.localRef(远程参考图本地缓存字段):此前漏读它 ⇒ 缓存命中过,
标注插件仍只看到 http 链接并判「远程图片不支持标注」,这是报障②的直接成因
批量插入不再叠图
- 旧实现循环里每张各自 findSpot,而 findSpot 只看已提交节点 ⇒ 同批全落一处;
改为一次 commit + 4 列栅格铺开
gallery 1.7.0
- 格子「插入」补 insertK(此前忽略插入尺寸档,与右键/顶部不一致)
- 插入补「插入中…」状态;删除改为等宿主删完再重拉(固定 250ms 会拉到未删完的清单)
结构
- 新增 src/gallery-sync.js(约 200 行),app.js 只 attach 装配;新增 tests/gallery-sync-test.js(11 项)
- 行数棘轮 9095 → 9115:+13 行是注入表与 commit 分发(闭包组件内 state),+6 行是纠错注释;
同时新增一个 src 模块 ⇒ 占比棘轮反而下降。理由已写入棘轮文件
口径纠错(用户要求把旧的不准确描述改掉)
- 图库/缩略图/原图档在桌面端是 images/thumbs、images/gallery 文件,不是 IndexedDB
- 1K 插入档降的是长边像素不是体积(PNG 源仍无损,1024 复杂图 ~500KB~1MB)
- docs/plans/gallery-insert-perf-v324.md 加时效注记(网页版时期口径)
|
2026-11-24 17:11:01 +08:00 |
|
qiqi
|
2f8f355716
|
feat(plugins): 分享/导入分享、单节点收藏走提示词库、组内解组、图库打开目录与删除字节、插件设置页 token 化
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 2m1s
|
2026-11-24 10:39:25 +08:00 |
|
qiqi
|
9a94563bc4
|
chore(plugins): gallery 1.6.11 市场同步
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 27s
|
2026-11-24 07:09:27 +08:00 |
|
qiqi
|
8ef453b3b4
|
chore(plugins): gallery/grouplib 尺寸 token 迁移 + 插件尺度基线归零
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 56s
|
2026-11-23 20:15:45 +08:00 |
|
qiqi
|
178cda830a
|
chore(plugins): 同步 gallery 1.6.9 微任务绘制修复
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m32s
|
2026-11-22 00:09:13 +08:00 |
|
qiqi
|
540eed04cc
|
fix(plugins): gallery 1.6.9 缩略图共享/坏图兜底;顶栏更浅 v3.26.19
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m33s
|
2026-11-21 23:50:36 +08:00 |
|
qiqi
|
96e8cc2d7d
|
fix(plugins): gallery 1.6.9 缩略图缓存共享(重排不重复取图)+ 顶栏更浅
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 43s
|
2026-11-21 23:48:14 +08:00 |
|
qiqi
|
2082ced720
|
fix(plugins): gallery 1.6.7 首帧后多次重测宽度(可见即重排)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 46s
|
2026-11-21 23:44:36 +08:00 |
|
qiqi
|
f35ecb1790
|
chore(plugins): gallery 1.6.6 列宽铺满 + 外层宽度测量
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 2m49s
|
2026-11-21 23:28:11 +08:00 |
|
qiqi
|
6435d9e4c3
|
style(dock): 选中态 11%/悬停 4%;图库 1.6.4 首屏与边距 v3.26.16
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 1m8s
|
2026-11-21 23:23:22 +08:00 |
|
qiqi
|
99496a530e
|
chore(plugin): 同步 gallery 1.6.3(图幅新增极小 64 档)+ 布局回归断言
- plugins/gallery:main.js/manifest.json 升到 1.6.3,index.json 哈希同步
- ux 测试:选「极小」列宽须为 64px 且列数多于默认
- 市场已发布(纯插件,客户端仍 3.25.57,无需重装)
|
2026-11-20 17:13:41 +08:00 |
|
qiqi
|
318a7a2980
|
chore(plugin): 同步 gallery 1.6.2(图幅列宽上限)+ 布局回归
|
2026-11-20 15:02:47 +08:00 |
|
qiqi
|
440c4d6590
|
chore(plugin): 同步 gallery 1.6.1(移除搜索框)
|
2026-11-20 14:56:47 +08:00 |
|
qiqi
|
f8ecb2cfba
|
feat(plugin): 同步 gallery 1.6.0(搜索/失败统计/右键菜单/多选拖拽)+ 交互回归
|
2026-11-20 14:20:53 +08:00 |
|
qiqi
|
bd138b7a7e
|
chore(plugin): 同步 gallery 1.5.1 / grouplib 1.0.2 + 回归(胶囊滚动容器、.iwb-hint 作用域)
|
2026-11-20 13:32:00 +08:00 |
|
qiqi
|
a4aaa547a7
|
feat(plugin): 目录插件支持自带 styles.css(sync 拷贝+manifest.style);gallery 1.5.0 上架
|
2026-11-20 12:59:09 +08:00 |
|