Improve Blocked Words UX and Real-Time Engine Filtering
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 领域
- mobile-dev
调研方向
Start by tracing the suggestion-chip long-press and delete-state handling, including the postDelayed timeout and DICTIONARY_USER_TYPED restriction. Then read the engine's raw-input filtering and dictionary reload paths, along with how blacklist .txt files are loaded. Done means only one word's delete control is active until dismissed, typed words can be blacklisted, and blacklisted words are suppressed from both raw input and suggestions.
由索引模型根据 Issue 内容生成。
描述
Current Limitations
- UX Constraints: The delete (bin) icon on suggestion chips disappears automatically after a 3-second timeout (
postDelayed), and it is completely disabled for raw user-typed words (DICTIONARY_USER_TYPED). - Real-time Filtering: Blacklisted words can still appear during active typing because the filter only applies to dictionary suggestions, not the raw input stream.
Proposed Solutions
1. UI & State Management Improvements
- Remove the 3-second timeout (
postDelayed). Ensure that only one word can be in delete mode at a time—long-pressing a new word must instantly clear the bin icon from the previous word. Let the delete state persist until the user taps the bin or interacts elsewhere. - Track a single active delete view state so long-pressing a new word automatically resets the previous one.
- Remove the restriction on
DICTIONARY_USER_TYPEDso users can delete and blacklist any word they type.
2. Engine-Level Filtering with Zero Performance Impact (Caching)
- To prevent heavy file I/O or lag on every keystroke, load the blacklist
.txtfiles into an in-memoryHashSetupon initialization or dictionary reload. - Perform real-time checks against this in-memory
Set(microseconds lookup time). This ensures blacklisted words are completely suppressed from both raw typing and suggestions without adding any performance overhead or lag to the core engine.
- 主要语言
- Kotlin
- 星标
- 1k
- 派生
- 59
- 平均合并
- 13 小时 11 分钟
- 30 天内合并 PR
- 47
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
LeanBitLab/LeanType 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
LeanBitLab/LeanType#713 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
LeanBitLab/LeanType#423 · 1 条评论 ·
维护者通常 1 天内回复
-
Crush Report未关闭
难度 3/5 1-2 天 新手友好度 20/100
LeanBitLab/LeanType#715 ·
维护者通常 1 天内回复
-
Text Expander/cursor-handling bug可能已有人在做 @LeanBitLab 于 2 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 62/100
LeanBitLab/LeanType#703 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
enhancement
难度 3/5 1-2 天 新手友好度 45/100
LeanBitLab/LeanType#699 ·
维护者通常 1 天内回复
查看 LeanBitLab/LeanType 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
apache/cassandra-easy-stress#112 ·
-
afk-ok area:data-quality importer size:S
难度 2/5 1-3 小时 新手友好度 75/100
enorm-labs/event-junkie#3767 ·
维护者通常 1 天内回复
-
resource-submission validation-passed
难度 1/5 1 小时以内 新手友好度 84/100
hesreallyhim/awesome-claude-code#3201 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
software-mansion/starknet-jvm#641 ·
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
leboncoin/spark-android#2342 ·
维护者通常 1 天内回复